Skip to content

A simple example of the inputUnion fork for graphql using apollo

Notifications You must be signed in to change notification settings

acao/apollo-graphql-input-union-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

apollo-graphql-input-union

A simple example of the inputUnion fork for graphql using apollo

usage

  1. clone this repo
  2. yarn
  3. yarn start
  4. make a query like this in the playground:
query($cat: Pet, $dog: Pet) {
  cat: pet(input: $cat)
  dog: pet(input: $dog)
}

using variables like:

{ 
  "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

About

A simple example of the inputUnion fork for graphql using apollo

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published