/authentication-with-graphql-and-jwt

This is a demo project which is explained in detail in this blog post: How to authenticate using GraphQL and JWT

Primary LanguageJavaScript

How to install and run the project

This project uses npm. To install and start the GraphQL server run following commands.

npm install
npm start

Visit http://localhost:4000/graphql and try out following mutation and query.

mutation {
  login(email: "jen@barber.com", password: "qwerty") {
    firstName
    lastName
  }
}

and

query{
  currentUser{
    firstName
    lastName
  }
}