See the screenshot below. The problem is easily solved by quoting the problematic members.

We ran into the same issue. We were able to use the workaround enumAsTypes: true, but this is not optimal since the angular language service does not provide syntax checking for literal union types in the template part of components. While it does support syntax checking for enums.
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 1536x1536 and 2048x2048. @borremosch I can spin up an example site but it's basically the schema provided by https://www.wpgraphql.com/
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 @graphql-codegen/[email protected]
Most helpful comment
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.