This is a GraphQL API that uses Query and Mutation concepts. This has been developed by @hammadahmedpk.
- Clone the Repository
- Go inside the root directory and perform
npm install
- Run the Project using
npx nodemon index.js
- Go to route:
localhost:3004/graphql
- Use the GUI to test the API
-
Use the following query to create a user
-
mutation{ createUser (firstName: "John", lastName: "Doe", email: "[email protected]", password: "john"){ firstName lastName } }
-
Use the following query to get all the users with firstName and lastName
-
Do notice the last user if you used the Mutation Query First :D
-
query { getAllUsers { firstName lastName id } }