Runs @graphql-codegen generation as soon as you hit save on any gql
or graphql
file.
Keep in mind it will only run when your node_modules contains @graphql-codegen/cli
package.
"graphql-codegen.fileExtensionsDeclaringGraphQLDocuments"
: change which file extensions are watched for saves. Defaults tographql
andgql
. If you just use these files to define your mutations you don't need to configure anything."graphql-codegen.filePathToWatch"
: allow users to specify a multimatch patters that file paths should match before running codegen. This is important as users could specify a more broad file (egts
) that could exist in both paths relevant to graphql generation and paths that are not. Defaults tonull
, so watches everything."graphql-codegen.configFilePath"
: allow users to specify a path to the codegen configuration file. Defaults tocodegen.yml
.
This extension uses codegen from your node_moodules inside the folder you are working on, so you will never get a mismatching output to what your CLI would give you. Also it is faster. VilvaAthibanPB's always executes all of the codegens. This extensions only executes codegens that match the last saved file.
Should support all major OSes.
Testing is done manually until some basic specs are added.
Extension is tested with @graphql-codegen/cli version 1.21.x. Other versions might not work as expected. If you hit any problems with other versions, please report them. The aim is to support as broad range of CLI versions as possible.
Since this runs the codegen behind the scenes you cannot see the output. You get notified of success/error with a vscode information message like this: