-
-
Notifications
You must be signed in to change notification settings - Fork 42
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
"GraphQL Document Validation failed" prevents other build tools to fix the problem in dev mode #315
Comments
Don't stop `nuxt dev` if a GraphQl validation error happens. Allow other build tools to fix the problem later on.
Same error in situation when a *.gql file contain more than one request. If the file has been splitted into files which one request=one file, that error gone. Parse gql file with more than one request effects the error |
@leaderit If your concern is, that multiple requests in a single .gql file should be supported, you'll be better served raising your issue in the GraphQL code generation project https://the-guild.dev/graphql/codegen. This nuxt module just uses the codegen features and has no influence in it. In your case, I'd rather guess that there is an error in your .gql file with multiple requests because I didn't have had any problems with multiple requests in one single file. |
I'd also really appreciate this, as it would allow for hot-reloading to continue to work even if errors have been typed. This could also just be a configuration flag |
Environment
Darwin
v18.13.0
3.1.0
2.0.0
[email protected]
vite
modules
,runtimeConfig
,css
,components
,postcss
,vite
[email protected]
-
Describe the bug
When starting
nuxt dev
the process stops/fails if any gql file has an invalid query.This may happen if the schema changes meanwhile.
Error Message:
This would prevent any rebuild or regeneration of the gql file later during the startup.
Expected behaviour
In
dev is true
just log the error and continue.In
dev is false
stop process to prevent build success.Reproduction
No response
Additional context
No response
Logs
The text was updated successfully, but these errors were encountered: