Syntax error when installing graphiql package
Which packages are impacted by your issue?
@graphql-codegen/cli
Describe the bug
Running yarn codegen after installing graphiql package throws syntax error:
Expected Name, found "}".
if graphiql package is removed, everything works fine.
codegen.ts file
I can't figure out what is causing this. Probably some nested dependency issues?
Your Example Website or App
codesandbox : here might have to fork it to try the terminal
Steps to Reproduce the Bug or Issue
open terminal Run yarn codegen
Expected behavior
I expect it to throw no issues
Screenshots or Videos
No response
Platform
- OS: masOS
- NodeJS: 20
graphqlversion: 16.8.1@graphql-codegen/*version(s): 5.0.0
Codegen Config File
const config: CodegenConfig = {
schema: {
'':
{
headers: {
authorization: token ? Bearer ${token} : '',
},
},
},
documents: '**/*.graphql',
config: {
skipDocumentsValidation: true,
},
generates: {
'./src/types/graphql.ts': {
plugins: ['typescript', 'typescript-operations', 'typed-document-node'],
config: {
documentMode: 'documentNode',
},
},
},
};
Additional context
No response
I think the link to the reproduction doesn't work, can you fix it?
I think the link to the reproduction doesn't work, can you fix it?
@Urigo can you try this https://codesandbox.io/p/devbox/fragrant-bird-6n72vc