How to use express-graphql with nodeJs
$ npm install
$ nodemon server.js
Go to http://localhost:8888/graphql
http://graphql.org/
https://www.npmjs.com/package/express-graphql
query {
users {
name
}
}
query {
user(id:"9") {
name,
address {
street
suite
city
zipcode
}
}
}
mutation {
addUser(id:"15", name:"John Doe") {
id,
name
}
}
mutation {
updateUser(id:"15", name:"Jane Doe", username:"Jane", phone:"154-956") {
name
}
}
For persistent data (specially for mutation), use mongodb or whatever.