You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I took one of my input GQL files and deleted a closing brace, then re-ran apollo client:codegen. I expected it to produce an error.
Actual outcome:
It succeeded just as if I had no error, except it skipped outputting a .graphql.swift file corresponding to the input file I modified.
How to reproduce the issue:
Take an existing project with multiple graphql input files
Edit one of the files and delete a closing brace somewhere. I did it at the end of a query, but I also tried deleting an interior brace and got the same behavior.
Run apollo client:codegen $outputDir --includes="*.graphql" --localSchemaFile=schema.json --target=swift
Versions
I've reproduced with both apollo/2.21.0 darwin-x64 node-v10.19.0 and a freshly-installed apollo/2.27.0 darwin-x64 node-v10.19.0.
The text was updated successfully, but these errors were encountered:
Validation errors such as missing fields emit an error properly. My assumption is parsing errors are just being silently skipped, but I didn't attempt to introduce any other parse errors, just the missing brace.
I believe#1899 should fix this! we were intentionally not erroring on syntax errors when setting up the project. I'm not 100% sure why we weren't, but I'm hesitant to change that now. Instead, I'm adding an error in the codegen command itself that should catch those errors.
Intended outcome:
I took one of my input GQL files and deleted a closing brace, then re-ran
apollo client:codegen
. I expected it to produce an error.Actual outcome:
It succeeded just as if I had no error, except it skipped outputting a
.graphql.swift
file corresponding to the input file I modified.How to reproduce the issue:
apollo client:codegen $outputDir --includes="*.graphql" --localSchemaFile=schema.json --target=swift
Versions
I've reproduced with both
apollo/2.21.0 darwin-x64 node-v10.19.0
and a freshly-installedapollo/2.27.0 darwin-x64 node-v10.19.0
.The text was updated successfully, but these errors were encountered: