๐ซ๐ Building GraphQL for NodeJS
$ npm i
$ npm start
- Query, aliases and fragments
query getCat($catId: Int!) {
cat(id: $catId) {
id
name
color
}
}
query getCatWithFagments($catId1: Int!, $catId2: Int!) {
cat1: cat(id: $catId1) {
...catFields
},
cat2: cat(id: $catId2) {
...catFields
}
}
fragment catFields on Cat {
id
name
color
}
- Mutation
mutation updateCatColor($id: Int!, $newColor: String!) {
updateCatColor(id: $id, newColor: $newColor) {
...catFields
}
}
fragment catFields on Cat {
id
name
color
}
๐ Awesome
Thanks goes to these wonderful people (emoji key):
Cuong Duy Nguyen ๐ป ๐ |
This project follows the all-contributors specification. Contributions of any kind welcome!
MIT ยฉ cuongw