classyserve / graphql-user

A simple node/express/graphql project with user login/registration mutations.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

graphql-user

A graphql project depicting login/registration mutations

Getting Started

Clone the project repository by running the command below

git clone https://github.com/classyserve/graphql-user.git

After cloning, run:

npm install

Rename .env.example to .env then fill in your database detail and your JWT secret:

NODE_ENV=development
DB_HOST=localhost
DB_USERNAME=root
DB_PASSWORD=
DB_NAME=graphql_blog_cms
JWT_SECRET=somereallylongsecretkey

Then run the migration:

sequelize db:migrate

And finally, start the application:

npm start

Then visit http://localhost:3000/graphiql to see the application in action.

Then try out:

mutation{
    register(firstName: "firstname", lastName: "lastname", email: "emailid", password:"password){
        id, firstName, lastName, email
    }
}

About

A simple node/express/graphql project with user login/registration mutations.


Languages

Language:JavaScript 94.5%Language:Shell 2.9%Language:Dockerfile 2.6%