GraphQL server with Mongoose (MongoDB) and Node.js
Like this? Check out our GraphQL ORM: graffiti
Example GraphQL query:
user(id: "1") {
name
friends {
name
}
}
Example response:
{
"data": {
"user": {
"name": "John Doe",
"friends": [
{
"name": "Friend One"
},
{
"name": "Friend Two"
}]
}
}
}
Example GraphQL mutation:
mutation updateUser($userId: String! $name: String!) {
updateUser(id: $userId name: $name) {
name
}
}
- GraphQL
- MongoDB with Mongoose
- Node/IO.js
- Babel
You need iojs
or >= Node.js
v0.12.x
npm install
npm run seed
npm start
npm run client
npm test