-
Notifications
You must be signed in to change notification settings - Fork 4
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
No error message when types aren't generated because of anonymous GraphQL queries #7
Comments
Yes, all queries need a unique name (compare with apollographql/apollo-tooling#670). I've tried to reproduce the incorrect success message. When I do not name one query it shows me the following Do you have any additional information or a repository to share? |
|
Thanks for the reproduction 👍 I need to check if it's possible to keep the file watchers of apollo and still be compatible with the newest version of gatsby-cli (>=2.8.28). Please keep the issue open |
I've changed the default option watch to false. For people still wanted to use the watch mode the best solution is to set it the following way: As a result you get the error message during build time instead of development. |
I'm working on a TypeScript starter using
gatsby-starter-default
as a base. I followed the steps in this blog post to get TypeScript support, however on the last step — generating the types using this plugin — the types weren't being generated.Running
npm run develop
displayed success messages:Both the schema and config files showed up, but the
__generated__
directories didn't.I tried
node_modules/apollo/bin/run client:codegen -c apollo.config.js --target=typescript --outputFlat gql-types.d.ts
and I got an error:Apollo does not support anonymous operations
, which led me to this comment. Naming the queries fixed the problem.The text was updated successfully, but these errors were encountered: