You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Invariant Violation: GraphQLIRPrinter: Expected value of type TestEnum to be a string, got `1`.
at invariant (/home/freiksenet/Work/gatsby/gatsby/node_modules/fbjs/lib/invariant.js:40:15)
at printLiteral (/home/freiksenet/Work/gatsby/gatsby/node_modules/relay-compiler/lib/GraphQLIRPrinter.js:255:105)
at printValue (/home/freiksenet/Work/gatsby/gatsby/node_modules/relay-compiler/lib/GraphQLIRPrinter.js:243:12)
at /home/freiksenet/Work/gatsby/gatsby/node_modules/relay-compiler/lib/GraphQLIRPrinter.js:212:24
at Array.forEach (<anonymous>)
at printArguments (/home/freiksenet/Work/gatsby/gatsby/node_modules/relay-compiler/lib/GraphQLIRPrinter.js:211:8)
at printField (/home/freiksenet/Work/gatsby/gatsby/node_modules/relay-compiler/lib/GraphQLIRPrinter.js:56:81)
at printSelection (/home/freiksenet/Work/gatsby/gatsby/node_modules/relay-compiler/lib/GraphQLIRPrinter.js:74:11)
The text was updated successfully, but these errors were encountered:
Thanks for reporting this, looks like this is a supported use of GraphQLEnumType in graphql-js, so we should support it. I think the issue is that printLiteral should be calling type.serialize(literalValue) instead of trying to emit a string value. PRs welcome!
Given the schema:
Having literal enum in the query results in error
The text was updated successfully, but these errors were encountered: