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.
Document.graphql file
query ExampleQuery {
company {
ceo
}
roadster {
apoapsis_au
}
}
codegen cli error
✔ Parse Configuration
❯ Generate outputs
✔ Parse Configuration
⚠ Generate outputs
❯ Generate to ./src/types/graphql.ts
✔ Load GraphQL schemas
✖ Syntax Error: Expected Name, found "}".
◼ Generate
error Command failed with exit code 1.
Here is a codesandox for the issue
codesandbox : link
Steps to Reproduce the Issue:
- Open terminal
- Run yarn codegen
- Now remove graphiql packages
- Run yarn codegen
I can’t figure out what is causing this. Probably some nested dependency issues? I need both of these packages as I need a playground for our customers to try our graphql endpoints.
**Code sandbox **: link might have to fork it to use the terminal
New contributor
4
Welcome to Stack Overflow! Please DO NOT attach images of errors. They cannot be copy/pasted, indexed by search engines, and can be blocked by filters. Please read How to Ask and edit your question to add your error as formatted text. For more information, please see the Meta FAQ entry Why not upload images of code/errors when asking a question?, along with this website
2 hours ago
The URL shortener does not work for me. Could you change that to the real link? (Better yet, please also add the code into the question, so that it will still make sense if the links break).
1 hour ago
@halfer codesandbox.io/p/sandbox/fragrant-bird-6n72vc might have to fork it to try the terminal. also, updated the issue
1 hour ago
@Fastnlight removed and updated my issue
1 hour ago