https://github.com/acao/apollo-graphql-input-union-example
A simple example of the inputUnion fork for graphql using apollo
https://github.com/acao/apollo-graphql-input-union-example
Last synced: 3 months ago
JSON representation
A simple example of the inputUnion fork for graphql using apollo
- Host: GitHub
- URL: https://github.com/acao/apollo-graphql-input-union-example
- Owner: acao
- Created: 2019-05-07T16:23:22.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-05-08T16:08:49.000Z (about 6 years ago)
- Last Synced: 2025-01-16T21:37:08.582Z (5 months ago)
- Language: JavaScript
- Size: 319 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# apollo-graphql-input-union
A simple example of the inputUnion fork for graphql using apollo## usage
1. clone this repo
1. `yarn`
1. `yarn start`
1. make a query like this in the playground:```graphql
query($cat: Pet, $dog: Pet) {
cat: pet(input: $cat)
dog: pet(input: $dog)
}
```using variables like:
```json
{
"cat": {
"__inputname": "Cat",
"name": "Pookie",
"purr": true
},
"dog": {
"__inputname": "Dog",
"name": "Fido",
"woof": true
}
}
```the schema explorer won't work in playground
## explanation
Because of how the graphql-js project builds, there really wasnt a way to automatically install the `inputUnion` fork and build it without writing a script, so i just committed it to the repo :/.
Its based on 0.12.3, and the original proposal with `__inputname` while the spec is discussed