-
Clone Repo
git clone https://github.com/SnehalAgrawal/about-react-dummy-graphql-apis.git
-
Jump into the directory
cd about-react-dummy-graphql-apis
-
Install:
npm install
-
Run the app:
npm start
-
To get complete User List
query users { users { name age email address password } }
-
To get Single User Detail
query user { user(email: "newuser@gmail.com") { name age email address password } }
-
To Create User
mutation createUser { createUser( name: "New User" email: "newuser@gmail.com" age: 25 address: "Demo Address" password: "12345" ) }
-
To Update User
mutation updateUser { updateUser( name: "Some Name" email: "newuser@gmail.com" age: 30 address: "Demo1 Address" ) }
-
To Delete User
mutation deleteUser { deleteUser( email: "newuser@gmail.com" ) }
-
To Subscribe Realtime User Creation Event
subscription userAdded { userAdded{ name age email address password } }