https://github.com/cuongndc9/apollo-nodejs
🔥💚 Using Apollo with NodeJS.
https://github.com/cuongndc9/apollo-nodejs
103cuong apollo apollo-nodejs apollo-server apollo-server-express graphql graphql-server mutation
Last synced: 3 months ago
JSON representation
🔥💚 Using Apollo with NodeJS.
- Host: GitHub
- URL: https://github.com/cuongndc9/apollo-nodejs
- Owner: cuongndc9
- License: mit
- Created: 2019-07-24T17:07:19.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2025-03-07T19:25:08.000Z (10 months ago)
- Last Synced: 2025-03-07T19:26:50.460Z (10 months ago)
- Topics: 103cuong, apollo, apollo-nodejs, apollo-server, apollo-server-express, graphql, graphql-server, mutation
- Language: JavaScript
- Homepage:
- Size: 395 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
goodbye coding 👋
# apollo-nodejs
[](#contributors)
🔥💚 Using Apollo with NodeJS
## Quick start
### Install dependencies
```sh
$ yarn
```
### Run this app
```sh
$ yarn start
```
### Client
1. 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
}
```

```
query getCats($color:String) {
cats(color: $color) {
...CatFields
}
}
fragment CatFields on Cat {
name
color
}
```
2. Mutation

```
mutation updateCatColor($id: Int!, $newColor: String!) {
updateCatColor(id: $id, newColor: $newColor) {
...catFields
}
}
fragment catFields on Cat {
id
name
color
}
```
🙌 Awesome
## Contributors
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
## License
MIT © [Cuong Nguyen](https://www.linkedin.com/in/cuong9/)
> "The only way to do great work is to love what you do." - Steve Jobs