Apollo-tooling: Codegen in watch mode does not write generated files after changes

Created on 13 Oct 2019  路  1Comment  路  Source: apollographql/apollo-tooling

Intended outcome:

  • Run apollo:codegen in watch-mode
  • Change a TypeScript file containing a query definition with gql tag
  • Save file
  • Type definitions for that query are updated and written to the according .ts file

Actual outcome:

After saving a file in VS Code that contains a query defintion with gql , apollo:codegen in watch mode writes Change detected, generating types... to the console but the files are not updated. After restarting apollo:codegen the files are correctly re-written (one time).

Command used to run apollo codegen (as script from package.json)

apollo client:codegen --target=typescript --globalTypesFile=src/global-query-types.ts --watch --outputFlat src/querytypes

Versions
Affected version: 2.19.x, in Version 2.18.3 it is working correctly.

馃悶 bug 馃 codegen

Most helpful comment

Interesting 馃 This was _just_ working. I was able to reproduce though, so I'll take a look!

>All comments

Interesting 馃 This was _just_ working. I was able to reproduce though, so I'll take a look!

Was this page helpful?
0 / 5 - 0 ratings