Skip to content
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

Greek Alphabet enum #10177

Open
frederikhors opened this issue Oct 19, 2024 · 0 comments
Open

Greek Alphabet enum #10177

frederikhors opened this issue Oct 19, 2024 · 0 comments

Comments

@frederikhors
Copy link

frederikhors commented Oct 19, 2024

Which packages are impacted by your issue?

@graphql-codegen/core (I think)

Describe the bug

I have this enum in a graphql schema:

enum Versions {
    α
    β
    γ
    δ
    μ
}

running the graphql code generator I get this error:

> graphql-codegen --config graphql.config.yml

[STARTED] Parse Configuration
[SUCCESS] Parse Configuration
[STARTED] Generate outputs
[STARTED] Generate to ./types.ts
[STARTED] Load GraphQL schemas
[FAILED]
[FAILED]         Failed to load schema from ./schema.graphql:
[FAILED]
[FAILED]         Syntax Error: Unexpected character: U+03B1.
[FAILED]         GraphQLError: Syntax Error: Unexpected character: U+03B1.
[FAILED]     at syntaxError (C:\prj\node_modules\[email protected]\node_modules\graphql\error\syntaxError.js:15:10)
[FAILED]     at readNextToken (C:\prj\node_modules\[email protected]\node_modules\graphql\language\lexer.js:420:40)
[FAILED]     at Lexer.lookahead (C:\prj\node_modules\[email protected]\node_modules\graphql\language\lexer.js:84:29)
[FAILED]     at Lexer.advance (C:\prj\node_modules\[email protected]\node_modules\graphql\language\lexer.js:67:38)
[FAILED]     at Parser.advanceLexer (C:\prj\node_modules\[email protected]\node_modules\graphql\language\parser.js:1536:31)
[FAILED]     at Parser.expectToken (C:\prj\node_modules\[email protected]\node_modules\graphql\language\parser.js:1393:12)
[FAILED]     at Parser.parseName (C:\prj\node_modules\[email protected]\node_modules\graphql\language\parser.js:108:24)
[FAILED]     at Parser.parseEnumValueName (C:\prj\node_modules\[email protected]\node_modules\graphql\language\parser.js:1009:17)
[FAILED]     at Parser.parseEnumValueDefinition (C:\prj\node_modules\[email protected]\node_modules\graphql\language\parser.js:981:23)
[FAILED]     at Parser.optionalMany (C:\prj\node_modules\[email protected]\node_modules\graphql\language\parser.js:1492:28)
[FAILED]
[FAILED]         GraphQL Code Generator supports:
[FAILED]           - ES Modules and CommonJS exports (export as default or named export "schema")
[FAILED]           - Introspection JSON File
[FAILED]           - URL of GraphQL endpoint
[FAILED]           - Multiple files with type definitions (glob expression)
[FAILED]           - String in config file
[FAILED]
[FAILED]         Try to use one of above options and run codegen again.

Is there a workaround?

Platform

  • OS: Windows
  • NodeJS: 20.18.0
  • graphql version: 16.9.0
"@graphql-codegen/cli": "5.0.3",
"@graphql-codegen/typed-document-node": "5.0.10",
"@graphql-codegen/typescript": "4.1.0",
"@graphql-codegen/typescript-operations": "4.3.0",
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
@frederikhors and others