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

Added support for enums in inputs #35

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

liamcurry
Copy link

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