PackageTrack

npm ยท #4105 most downloaded on npm

@graphql-codegen/cli

7.3.1dotansimha/graphql-code-generator โ†—

Release timeline

6088 releases since 2019
20192026

Releases

  1. 3.3.04 Apr 2023
    Release notes

    Minor Changes

    Patch Changes

    • Updated dependencies [68bb30e19]
    • Updated dependencies [d84afec09]
    • Updated dependencies [a4fe5006b]
    • Updated dependencies [8e44df58b]
    Open source โ†’
    Additional notes

    Minor Changes

    • #9151 b7dacb21f Thanks @'./user/schema.mappers#UserMapper',! - Add watchPattern config option for generates sections.

      By default, watch mode automatically watches all GraphQL schema and document files. This means when a change is detected, Codegen CLI is run.

      A user may want to run Codegen CLI when non-schema and non-document files are changed. Each generates section now has a watchPattern option to allow more file patterns to be added to the list of patterns to watch.

      In the example below, mappers are exported from schema.mappers.ts files. We want to re-run Codegen if the content of *.mappers.ts files change because they change the generated types file. To solve this, we can add mapper file patterns to watch using the glob pattern used for schema and document files.

      // codegen.ts
      const config: CodegenConfig = {
        schema: 'src/schema/**/*.graphql',
        generates: {
          'src/schema/types.ts': {
            plugins: ['typescript', 'typescript-resolvers'],
            config: {
              mappers: {
      
                Book: './book/schema.mappers#BookMapper',
              },
            }
            watchPattern: 'src/schema/**/*.mappers.ts', // Watches mapper files in `watch` mode. Use an array for multiple patterns e.g. `['src/*.pattern1.ts','src/*.pattern2.ts']`
          },
        },
      };
      

      Then, run Codegen CLI in watch mode:

      pnpm graphql-codegen --watch
      

      Now, updating *.mappers.ts files re-runs Codegen! ๐ŸŽ‰

      Note: watchPattern is only used in watch mode i.e. running CLI with --watch flag.

    Patch Changes

    Open source โ†’
  2. 3.3.0-rc-20230402134456-aa606b2152 Apr 2023pre-release

    Nothing published for this version

  3. 3.3.0-rc-20230401221458-11d74dae31 Apr 2023pre-release

    Nothing published for this version

  4. 3.3.0-rc-20230401002337-29d814ff61 Apr 2023pre-release

    Nothing published for this version

  5. 3.3.0-rc-20230330170759-01f32b57730 Mar 2023pre-release

    Nothing published for this version

  6. 3.3.0-rc-20230330120629-86d11773c30 Mar 2023pre-release

    Nothing published for this version

  7. 3.3.0-rc-20230329144920-7d4c04d6629 Mar 2023pre-release

    Nothing published for this version

  8. 3.3.0-rc-20230328165616-38a5227bf28 Mar 2023pre-release

    Nothing published for this version

  9. 3.3.0-rc-20230328143315-577cf4fd228 Mar 2023pre-release

    Nothing published for this version

  10. 3.3.0-rc-20230328131724-8dd85b16528 Mar 2023pre-release

    Nothing published for this version

  11. 3.3.0-rc-20230327080953-9a566d7b727 Mar 2023pre-release

    Nothing published for this version

  12. 3.3.0-rc-20230325042447-8aff286f225 Mar 2023pre-release

    Nothing published for this version

  13. 3.3.0-rc-20230323162958-a08abc02923 Mar 2023pre-release

    Nothing published for this version

  14. 3.3.0-rc-20230323154235-d223d7c9b23 Mar 2023pre-release

    Nothing published for this version

  15. 3.3.0-rc-20230323153436-97d556d5723 Mar 2023pre-release

    Nothing published for this version

  16. 3.3.0-rc-20230323130935-c928f296d23 Mar 2023pre-release

    Nothing published for this version

  17. 3.3.0-rc-20230321134956-1e17328a321 Mar 2023pre-release

    Nothing published for this version

  18. 3.3.0-rc-20230321103502-4d67ff63c21 Mar 2023pre-release

    Nothing published for this version

  19. 3.3.0-rc-20230320132329-5e109e8f820 Mar 2023pre-release

    Nothing published for this version

  20. 3.3.0-rc-20230319010707-7e7bf022919 Mar 2023pre-release

    Nothing published for this version

  21. 3.3.0-rc-20230319001231-09b6845c119 Mar 2023pre-release

    Nothing published for this version

  22. 3.3.0-alpha-20230403154620-f1ffafde83 Apr 2023pre-release

    Nothing published for this version

  23. 3.3.0-alpha-20230403133216-553afcdae3 Apr 2023pre-release

    Nothing published for this version

  24. 3.3.0-alpha-20230403114914-6e6076d6c3 Apr 2023pre-release

    Nothing published for this version

  25. 3.3.0-alpha-20230402173148-bf8f9245c2 Apr 2023pre-release

    Nothing published for this version

  26. 3.3.0-alpha-20230402134841-83f0fd7be2 Apr 2023pre-release

    Nothing published for this version

  27. 3.3.0-alpha-20230402134715-020e699a42 Apr 2023pre-release

    Nothing published for this version

  28. 3.3.0-alpha-20230402134403-77746fc252 Apr 2023pre-release

    Nothing published for this version

  29. 3.3.0-alpha-20230402082631-5965f35de2 Apr 2023pre-release

    Nothing published for this version

  30. 3.3.0-alpha-20230401201748-47e847bd81 Apr 2023pre-release

    Nothing published for this version

  31. 3.3.0-alpha-20230401093748-4a653efc91 Apr 2023pre-release

    Nothing published for this version

  32. 3.3.0-alpha-20230331210539-f07f8d6a931 Mar 2023pre-release

    Nothing published for this version

  33. 3.3.0-alpha-20230331173459-2045f358231 Mar 2023pre-release

    Nothing published for this version

  34. 3.3.0-alpha-20230331173408-5838bcd7231 Mar 2023pre-release

    Nothing published for this version

  35. 3.3.0-alpha-20230331111946-1ebab83cb31 Mar 2023pre-release

    Nothing published for this version

  36. 3.3.0-alpha-20230331064457-2b657f29531 Mar 2023pre-release

    Nothing published for this version

  37. 3.3.0-alpha-20230330211230-31e3b90c430 Mar 2023pre-release

    Nothing published for this version

  38. 3.3.0-alpha-20230330170711-35035e12d30 Mar 2023pre-release

    Nothing published for this version

  39. 3.3.0-alpha-20230330153545-fab82603030 Mar 2023pre-release

    Nothing published for this version

  40. 3.3.0-alpha-20230330150338-396b1814930 Mar 2023pre-release

    Nothing published for this version

  41. 3.3.0-alpha-20230330145253-7566d423a30 Mar 2023pre-release

    Nothing published for this version

  42. 3.3.0-alpha-20230330142525-09b25a03430 Mar 2023pre-release

    Nothing published for this version

  43. 3.3.0-alpha-20230330112047-da0c5ec1230 Mar 2023pre-release

    Nothing published for this version

  44. 3.3.0-alpha-20230330011434-16fd1523b30 Mar 2023pre-release

    Nothing published for this version

  45. 3.3.0-alpha-20230329183333-dda4daf8f29 Mar 2023pre-release

    Nothing published for this version

  46. 3.3.0-alpha-20230329172630-e434fe0cf29 Mar 2023pre-release

    Nothing published for this version

  47. 3.3.0-alpha-20230329144832-c1d55b71429 Mar 2023pre-release

    Nothing published for this version

  48. 3.3.0-alpha-20230329144220-b873a7fbc29 Mar 2023pre-release

    Nothing published for this version

  49. 3.3.0-alpha-20230329143913-47bec1e2c29 Mar 2023pre-release

    Nothing published for this version

  50. 3.3.0-alpha-20230329100531-e8e2561d729 Mar 2023pre-release

    Nothing published for this version

  51. 3.3.0-alpha-20230329093703-8f0a0181d29 Mar 2023pre-release

    Nothing published for this version

  52. 3.3.0-alpha-20230329092554-66cdc8d6929 Mar 2023pre-release

    Nothing published for this version

  53. 3.3.0-alpha-20230329090736-6a1004ab929 Mar 2023pre-release

    Nothing published for this version

  54. 3.3.0-alpha-20230329090145-b418594b329 Mar 2023pre-release

    Nothing published for this version

  55. 3.3.0-alpha-20230329085743-b61ac9eda29 Mar 2023pre-release

    Nothing published for this version

  56. 3.3.0-alpha-20230329011301-4c656bdce29 Mar 2023pre-release

    Nothing published for this version

  57. 3.3.0-alpha-20230329011046-0b2bf864a29 Mar 2023pre-release

    Nothing published for this version

  58. 3.3.0-alpha-20230329010759-a7c3b733c29 Mar 2023pre-release

    Nothing published for this version

  59. 3.3.0-alpha-20230328190447-41d15c5a528 Mar 2023pre-release

    Nothing published for this version

  60. 3.3.0-alpha-20230328190423-a042e417828 Mar 2023pre-release

    Nothing published for this version