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'd like the ability to validate my codegen'ed types from the CLI for two reasons:
CI!
When I forget to update types on the fly, I'd like to be able to use something like git bisect to find exactly which commit I forgot to update the types in:
git bisect run npx apollo client:codegen \
--config=[config-filename] \
--passthroughCustomScalars \
--outputFlat \
--validate
I can think of two ways to handle this:
[Preferred] Add an option that generates types, compares to all files that will be written instead of actually writing, and then exit with a non-zero exit code if any files are incorrect.
[Stopgap?] Allow output to stdout instead of always writing to a file
For example, allow a - param to signify that we want to write to stdout instead of a real file; possibly only allow such an option when --outputFlat is also specified.
The text was updated successfully, but these errors were encountered:
justinanastos
changed the title
Feature Request: Provide ability to validate types are correct
Feature Request: Add ability to validate types are correct
Dec 14, 2018
I'd like the ability to validate my codegen'ed types from the CLI for two reasons:
CI!
When I forget to update types on the fly, I'd like to be able to use something like
git bisect
to find exactly which commit I forgot to update the types in:I can think of two ways to handle this:
[Preferred] Add an option that generates types, compares to all files that will be written instead of actually writing, and then exit with a non-zero exit code if any files are incorrect.
[Stopgap?] Allow output to stdout instead of always writing to a file
For example, allow a
-
param to signify that we want to write tostdout
instead of a real file; possibly only allow such an option when--outputFlat
is also specified.The text was updated successfully, but these errors were encountered: