The generation logic relied on the schema passed from graphql-codegen. If this was a schema generated based on introspection, the astNode information was lost, so it seems that it was not possible to determine whether each schema was an enum or a scalar.
This issue was reported here:
graphql/graphql-js#1575
Originally posted by @Code-Hex in #386 (comment)