-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enum members should be quoted if numeric #4834
Comments
We ran into the same issue. We were able to use the workaround If a sample is needed we can provide one. |
Could either of you provide your GraphQL schema + plugin options or a Code Sandbox to reproduce the issue? |
Got the same thing, in this case it's the standard WordPress thumbnail sizes which are named |
Great, thanks! I will have a look soon to see if I can reproduce the problem |
@borremosch if you want, you can use https://wp-headless.arden.nl/wp/graphql as an endpoint, should give you the same result. thanks! |
I have submitted a pull request. The leading underscore is removed from the enum identifier when it is PascalCased. This seems to be a design decision in graphql-codegen, so I chose to not bother with removing the leading underscore, and to quote the identifier instead as was suggested. This seems to be more in line with the current enum naming philosophy, and does not introduce any breaking changes. |
Fixed in |
See the screenshot below. The problem is easily solved by quoting the problematic members.
The text was updated successfully, but these errors were encountered: