Skip to content
This repository was archived by the owner on Mar 19, 2019. It is now read-only.

Added support for enums in inputs#35

Open
liamcurry wants to merge 1 commit intojahewson:masterfrom
liamcurry:enum-inputs
Open

Added support for enums in inputs#35
liamcurry wants to merge 1 commit intojahewson:masterfrom
liamcurry:enum-inputs

Conversation

@liamcurry
Copy link
Copy Markdown

Enums are already supported in results, but not as input values. This PR adds support for enums as input values.

For example, with a schema like this:

enum Fruit {
  APPLE
  ORANGE
  PEAR
}

type Query {
   getFruit(fruit: Fruit): String
}

schema {
   query: Query
}

This query should now work:

query getFruit($fruit: Fruit) {
  getFruit(fruit: $fruit)
}

This is working for my small project but please make sure I didn't miss anything. I'm happy to make changes if necessary so please let me know! Thanks.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants