Allow number strings for an Enum Type's possible values
Since the name of the Enum serializes as a string, can the name of an enum value not start with a number (as a string)?
In my case, I was trying to use '031' (to represent '031') as one of the values for a custom Enum Type.
The implementation I'm using allowed it without error, but graphiql failed my schema on the assertValidName check since it only allows underscore and letters.
Can you try using process.env.GRAPHQL_NO_NAME_WARNING
as described here ?
I've come across this too. It sounds like it's a valid bug, as I haven't been able to find anything that says there are limitations around the enum naming convention.
@davidianlandis @dncrews GraphQL require enum values to match [_A-Za-z][_0-9A-Za-z] RegExp:
http://facebook.github.io/graphql/October2016/#sec-Enum-Value
http://facebook.github.io/graphql/October2016/#Name
That means you cant use 031as an enum value.
If you can't change enum value to something valid (e.g._031) you can use String` instead.
if you come across the issue and think the spec group should the decision to not allow purely numerical enum values, please go to https://github.com/graphql/graphql-wg and open either an issue or a new PR.