n1ru4l / graphql-live-query

Realtime GraphQL Live Queries with JavaScript
MIT License
437 stars 36 forks source link

chore(deps): update graphql-codegen (major) #1011

Open renovate[bot] opened 1 year ago

renovate[bot] commented 1 year ago

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
@graphql-codegen/cli (source) 2.16.5 -> 5.0.3 age adoption passing confidence
@graphql-codegen/gql-tag-operations-preset (source) 1.7.4 -> 2.1.0 age adoption passing confidence

Release Notes

dotansimha/graphql-code-generator (@​graphql-codegen/cli) ### [`v5.0.3`](https://redirect.github.com/dotansimha/graphql-code-generator/blob/HEAD/packages/graphql-codegen-cli/CHANGELOG.md#503) [Compare Source](https://redirect.github.com/dotansimha/graphql-code-generator/compare/@graphql-codegen/cli@5.0.2...@graphql-codegen/cli@5.0.3) ##### Patch Changes - [#​10069](https://redirect.github.com/dotansimha/graphql-code-generator/pull/10069) [`8bb34e7`](https://redirect.github.com/dotansimha/graphql-code-generator/commit/8bb34e7cd23a8891313828291c9f2edd6a3b67bc) Thanks [@​renovate](https://redirect.github.com/apps/renovate)! - dependencies updates: - Updated dependency [`@whatwg-node/fetch@^0.9.20` ↗︎](https://www.npmjs.com/package/@​whatwg-node/fetch/v/0.9.20) (from `^0.8.0`, in `dependencies`) - Updated dependency [`graphql-config@^5.1.1` ↗︎](https://www.npmjs.com/package/graphql-config/v/5.1.1) (from `^5.0.2`, in `dependencies`) - [`e0092b5`](https://redirect.github.com/dotansimha/graphql-code-generator/commit/e0092b548f51c95be19c232515cf9a72873e7b83) Thanks [@​ardatan](https://redirect.github.com/ardatan)! - Bump whatwg-node and graphql-config - Updated dependencies \[[`8471a18`](https://redirect.github.com/dotansimha/graphql-code-generator/commit/8471a180cd61dc03dedace87876c5973b09b35f8), [`67e7556`](https://redirect.github.com/dotansimha/graphql-code-generator/commit/67e75561a3e862f26cfbb40e8ec5a08f821f9ddf)]: - [@​graphql-codegen/client-preset](https://redirect.github.com/graphql-codegen/client-preset)[@​4](https://redirect.github.com/4).4.0 ### [`v5.0.2`](https://redirect.github.com/dotansimha/graphql-code-generator/blob/HEAD/packages/graphql-codegen-cli/CHANGELOG.md#502) [Compare Source](https://redirect.github.com/dotansimha/graphql-code-generator/compare/86c82177b0b9ab1853f6c4e6fba17218dafa3d7d...@graphql-codegen/cli@5.0.2) ##### Patch Changes - [#​9813](https://redirect.github.com/dotansimha/graphql-code-generator/pull/9813) [`4e69568`](https://redirect.github.com/dotansimha/graphql-code-generator/commit/4e6956899c96f8954cea8d5bbe32aa35a70cc653) Thanks [@​saihaj](https://redirect.github.com/saihaj)! - bumping for a release - Updated dependencies \[[`4e69568`](https://redirect.github.com/dotansimha/graphql-code-generator/commit/4e6956899c96f8954cea8d5bbe32aa35a70cc653)]: - [@​graphql-codegen/client-preset](https://redirect.github.com/graphql-codegen/client-preset)[@​4](https://redirect.github.com/4).2.2 - [@​graphql-codegen/core](https://redirect.github.com/graphql-codegen/core)[@​4](https://redirect.github.com/4).0.2 - [@​graphql-codegen/plugin-helpers](https://redirect.github.com/graphql-codegen/plugin-helpers)[@​5](https://redirect.github.com/5).0.3 ### [`v5.0.1`](https://redirect.github.com/dotansimha/graphql-code-generator/blob/HEAD/packages/graphql-codegen-cli/CHANGELOG.md#501) [Compare Source](https://redirect.github.com/dotansimha/graphql-code-generator/compare/@graphql-codegen/cli@5.0.0...86c82177b0b9ab1853f6c4e6fba17218dafa3d7d) ##### Patch Changes - [#​9811](https://redirect.github.com/dotansimha/graphql-code-generator/pull/9811) [`d8364e045`](https://redirect.github.com/dotansimha/graphql-code-generator/commit/d8364e045a46ca6e8173583b5108d161c6832975) Thanks [@​saihaj](https://redirect.github.com/saihaj)! - dependencies updates: - Added dependency [`@graphql-codegen/client-preset@^4.1.0` ↗︎](https://www.npmjs.com/package/@​graphql-codegen/client-preset/v/4.1.0) (to `dependencies`) - [#​9811](https://redirect.github.com/dotansimha/graphql-code-generator/pull/9811) [`d8364e045`](https://redirect.github.com/dotansimha/graphql-code-generator/commit/d8364e045a46ca6e8173583b5108d161c6832975) Thanks [@​saihaj](https://redirect.github.com/saihaj)! - ignore events in `.git` directory - [#​9811](https://redirect.github.com/dotansimha/graphql-code-generator/pull/9811) [`d8364e045`](https://redirect.github.com/dotansimha/graphql-code-generator/commit/d8364e045a46ca6e8173583b5108d161c6832975) Thanks [@​saihaj](https://redirect.github.com/saihaj)! - Surface error occurring during import of [@​parcel/watcher](https://redirect.github.com/parcel/watcher) - [#​9811](https://redirect.github.com/dotansimha/graphql-code-generator/pull/9811) [`d8364e045`](https://redirect.github.com/dotansimha/graphql-code-generator/commit/d8364e045a46ca6e8173583b5108d161c6832975) Thanks [@​saihaj](https://redirect.github.com/saihaj)! - Include [@​graphql-codegen/client-preset](https://redirect.github.com/graphql-codegen/client-preset) in [@​graphql-codegen/cli](https://redirect.github.com/graphql-codegen/cli) by default - [#​9811](https://redirect.github.com/dotansimha/graphql-code-generator/pull/9811) [`d8364e045`](https://redirect.github.com/dotansimha/graphql-code-generator/commit/d8364e045a46ca6e8173583b5108d161c6832975) Thanks [@​saihaj](https://redirect.github.com/saihaj)! - fix watcher unable to find highest common directory on Windows - Updated dependencies \[[`d8364e045`](https://redirect.github.com/dotansimha/graphql-code-generator/commit/d8364e045a46ca6e8173583b5108d161c6832975), [`d8364e045`](https://redirect.github.com/dotansimha/graphql-code-generator/commit/d8364e045a46ca6e8173583b5108d161c6832975), [`d8364e045`](https://redirect.github.com/dotansimha/graphql-code-generator/commit/d8364e045a46ca6e8173583b5108d161c6832975), [`d8364e045`](https://redirect.github.com/dotansimha/graphql-code-generator/commit/d8364e045a46ca6e8173583b5108d161c6832975)]: - [@​graphql-codegen/client-preset](https://redirect.github.com/graphql-codegen/client-preset)[@​4](https://redirect.github.com/4).2.0 - [@​graphql-codegen/core](https://redirect.github.com/graphql-codegen/core)[@​4](https://redirect.github.com/4).0.1 - [@​graphql-codegen/plugin-helpers](https://redirect.github.com/graphql-codegen/plugin-helpers)[@​5](https://redirect.github.com/5).0.2 ### [`v5.0.0`](https://redirect.github.com/dotansimha/graphql-code-generator/blob/HEAD/packages/graphql-codegen-cli/CHANGELOG.md#500) [Compare Source](https://redirect.github.com/dotansimha/graphql-code-generator/compare/@graphql-codegen/cli@4.0.1...@graphql-codegen/cli@5.0.0) ##### Major Changes - [#​9506](https://redirect.github.com/dotansimha/graphql-code-generator/pull/9506) [`dd9c7e148`](https://redirect.github.com/dotansimha/graphql-code-generator/commit/dd9c7e14872f48592e530ff0d646449a5cb722b4) Thanks [@​valkum](https://redirect.github.com/valkum)! - Make [@​parcel/watcher](https://redirect.github.com/parcel/watcher) optional ##### Patch Changes - [#​9513](https://redirect.github.com/dotansimha/graphql-code-generator/pull/9513) [`fdd19d24d`](https://redirect.github.com/dotansimha/graphql-code-generator/commit/fdd19d24df21d3257f3e969b79856d18b6f73123) Thanks [@​cichelero](https://redirect.github.com/cichelero)! - Update yaml dependency to 2.3.1 - Updated dependencies \[[`bb1e0e96e`](https://redirect.github.com/dotansimha/graphql-code-generator/commit/bb1e0e96ed9d519684630cd7ea53869b48b4632e)]: - [@​graphql-codegen/plugin-helpers](https://redirect.github.com/graphql-codegen/plugin-helpers)[@​5](https://redirect.github.com/5).0.1 ### [`v4.0.1`](https://redirect.github.com/dotansimha/graphql-code-generator/blob/HEAD/packages/graphql-codegen-cli/CHANGELOG.md#401) [Compare Source](https://redirect.github.com/dotansimha/graphql-code-generator/compare/@graphql-codegen/cli@4.0.0...@graphql-codegen/cli@4.0.1) ##### Patch Changes - [#​9479](https://redirect.github.com/dotansimha/graphql-code-generator/pull/9479) [`0aa444b5d`](https://redirect.github.com/dotansimha/graphql-code-generator/commit/0aa444b5d092565c321643a55fb05c7301e303bf) Thanks [@​gilgardosh](https://redirect.github.com/gilgardosh)! - dependencies updates: - Updated dependency [`graphql-config@^5.0.2` ↗︎](https://www.npmjs.com/package/graphql-config/v/5.0.2) (from `^5.0.1`, in `dependencies`) - [#​9479](https://redirect.github.com/dotansimha/graphql-code-generator/pull/9479) [`0aa444b5d`](https://redirect.github.com/dotansimha/graphql-code-generator/commit/0aa444b5d092565c321643a55fb05c7301e303bf) Thanks [@​gilgardosh](https://redirect.github.com/gilgardosh)! - Update graphql-config to v^5.0.2 ### [`v4.0.0`](https://redirect.github.com/dotansimha/graphql-code-generator/blob/HEAD/packages/graphql-codegen-cli/CHANGELOG.md#400) [Compare Source](https://redirect.github.com/dotansimha/graphql-code-generator/compare/@graphql-codegen/cli@3.3.1...@graphql-codegen/cli@4.0.0) ##### Major Changes - [`bb66c2a31`](https://redirect.github.com/dotansimha/graphql-code-generator/commit/bb66c2a31985c1375912ccd6b2b02933f313c9c0) Thanks [@​n1ru4l](https://redirect.github.com/n1ru4l)! - Require Node.js `>= 16`. Drop support for Node.js 14 ##### Patch Changes - [#​9449](https://redirect.github.com/dotansimha/graphql-code-generator/pull/9449) [`4d9ea1a5a`](https://redirect.github.com/dotansimha/graphql-code-generator/commit/4d9ea1a5a94cd3458c1bd868ce1ab1cb806257f2) Thanks [@​n1ru4l](https://redirect.github.com/n1ru4l)! - dependencies updates: - Updated dependency [`graphql-config@^5.0.0` ↗︎](https://www.npmjs.com/package/graphql-config/v/5.0.0) (from `^4.5.0`, in `dependencies`) - [#​9449](https://redirect.github.com/dotansimha/graphql-code-generator/pull/9449) [`4d9ea1a5a`](https://redirect.github.com/dotansimha/graphql-code-generator/commit/4d9ea1a5a94cd3458c1bd868ce1ab1cb806257f2) Thanks [@​n1ru4l](https://redirect.github.com/n1ru4l)! - dependencies updates: - Updated dependency [`@graphql-tools/apollo-engine-loader@^8.0.0` ↗︎](https://www.npmjs.com/package/@​graphql-tools/apollo-engine-loader/v/8.0.0) (from `^7.3.6`, in `dependencies`) - Updated dependency [`@graphql-tools/code-file-loader@^8.0.0` ↗︎](https://www.npmjs.com/package/@​graphql-tools/code-file-loader/v/8.0.0) (from `^7.3.17`, in `dependencies`) - Updated dependency [`@graphql-tools/git-loader@^8.0.0` ↗︎](https://www.npmjs.com/package/@​graphql-tools/git-loader/v/8.0.0) (from `^7.2.13`, in `dependencies`) - Updated dependency [`@graphql-tools/github-loader@^8.0.0` ↗︎](https://www.npmjs.com/package/@​graphql-tools/github-loader/v/8.0.0) (from `^7.3.28`, in `dependencies`) - Updated dependency [`@graphql-tools/graphql-file-loader@^8.0.0` ↗︎](https://www.npmjs.com/package/@​graphql-tools/graphql-file-loader/v/8.0.0) (from `^7.5.0`, in `dependencies`) - Updated dependency [`@graphql-tools/json-file-loader@^8.0.0` ↗︎](https://www.npmjs.com/package/@​graphql-tools/json-file-loader/v/8.0.0) (from `^7.4.1`, in `dependencies`) - Updated dependency [`@graphql-tools/load@^8.0.0` ↗︎](https://www.npmjs.com/package/@​graphql-tools/load/v/8.0.0) (from `^7.8.0`, in `dependencies`) - Updated dependency [`@graphql-tools/prisma-loader@^8.0.0` ↗︎](https://www.npmjs.com/package/@​graphql-tools/prisma-loader/v/8.0.0) (from `^7.2.69`, in `dependencies`) - Updated dependency [`@graphql-tools/url-loader@^8.0.0` ↗︎](https://www.npmjs.com/package/@​graphql-tools/url-loader/v/8.0.0) (from `^7.17.17`, in `dependencies`) - Updated dependency [`@graphql-tools/utils@^10.0.0` ↗︎](https://www.npmjs.com/package/@​graphql-tools/utils/v/10.0.0) (from `^9.0.0`, in `dependencies`) - Updated dependency [`cosmiconfig@^8.1.3` ↗︎](https://www.npmjs.com/package/cosmiconfig/v/8.1.3) (from `^7.0.0`, in `dependencies`) - Updated dependency [`graphql-config@^5.0.1` ↗︎](https://www.npmjs.com/package/graphql-config/v/5.0.1) (from `^4.5.0`, in `dependencies`) - [#​9371](https://redirect.github.com/dotansimha/graphql-code-generator/pull/9371) [`d431f426e`](https://redirect.github.com/dotansimha/graphql-code-generator/commit/d431f426eb594b820ac712b9f5c616f4badf6bff) Thanks [@​Axxxx0n](https://redirect.github.com/Axxxx0n)! - Fixed option ignoreNoDocuments when using graphql configs - [#​9275](https://redirect.github.com/dotansimha/graphql-code-generator/pull/9275) [`2a5da5894`](https://redirect.github.com/dotansimha/graphql-code-generator/commit/2a5da589468eb5970587187adae9892ff1f13134) Thanks [@​milesrichardson](https://redirect.github.com/milesrichardson)! - Trigger rebuilds in watch mode while respecting rules of precedence and negation, both in terms of global (top-level) config vs. local (per-output target) config, and in terms of watch patterns (higher priority) vs. documents/schemas (lower priority). This fixes an issue with overly-aggressive rebuilds during watch mode. - Updated dependencies \[[`4d9ea1a5a`](https://redirect.github.com/dotansimha/graphql-code-generator/commit/4d9ea1a5a94cd3458c1bd868ce1ab1cb806257f2), [`4d9ea1a5a`](https://redirect.github.com/dotansimha/graphql-code-generator/commit/4d9ea1a5a94cd3458c1bd868ce1ab1cb806257f2), [`f46803a8c`](https://redirect.github.com/dotansimha/graphql-code-generator/commit/f46803a8c70840280529a52acbb111c865712af2), [`63827fabe`](https://redirect.github.com/dotansimha/graphql-code-generator/commit/63827fabede76b2380d40392aba2a3ccb099f0c4), [`bb66c2a31`](https://redirect.github.com/dotansimha/graphql-code-generator/commit/bb66c2a31985c1375912ccd6b2b02933f313c9c0)]: - [@​graphql-codegen/core](https://redirect.github.com/graphql-codegen/core)[@​4](https://redirect.github.com/4).0.0 - [@​graphql-codegen/plugin-helpers](https://redirect.github.com/graphql-codegen/plugin-helpers)[@​5](https://redirect.github.com/5).0.0 ### [`v3.3.1`](https://redirect.github.com/dotansimha/graphql-code-generator/blob/HEAD/packages/graphql-codegen-cli/CHANGELOG.md#331) [Compare Source](https://redirect.github.com/dotansimha/graphql-code-generator/compare/@graphql-codegen/cli@3.3.0...@graphql-codegen/cli@3.3.1) ##### Patch Changes - [#​9267](https://redirect.github.com/dotansimha/graphql-code-generator/pull/9267) [`183749346`](https://redirect.github.com/dotansimha/graphql-code-generator/commit/1837493464e0b661520deb38c1e5cbd5ed46f978) Thanks [@​milesrichardson](https://redirect.github.com/milesrichardson)! - Fix watch mode to listen to longest common directory prefix of relevant files, rather than only files below the current working directory (fixes [#​9266](https://redirect.github.com/dotansimha/graphql-code-generator/issues/9266)). - [#​9280](https://redirect.github.com/dotansimha/graphql-code-generator/pull/9280) [`ca1d72c40`](https://redirect.github.com/dotansimha/graphql-code-generator/commit/ca1d72c408a5f45ecdb17d556e1a3f7d6811cdf4) Thanks [@​saihaj](https://redirect.github.com/saihaj)! - fix the default output directory for init command ### [`v3.3.0`](https://redirect.github.com/dotansimha/graphql-code-generator/blob/HEAD/packages/graphql-codegen-cli/CHANGELOG.md#330) [Compare Source](https://redirect.github.com/dotansimha/graphql-code-generator/compare/@graphql-codegen/cli@3.2.2...@graphql-codegen/cli@3.3.0) ##### Minor Changes - [#​9151](https://redirect.github.com/dotansimha/graphql-code-generator/pull/9151) [`b7dacb21f`](https://redirect.github.com/dotansimha/graphql-code-generator/commit/b7dacb21fb0ed1173d1e45120dc072e29231ed29) Thanks [@​'./user/schema.mappers#UserMapper',](https://redirect.github.com/'./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. ```ts // 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: ```shell yarn 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 - Updated dependencies \[[`b7dacb21f`](https://redirect.github.com/dotansimha/graphql-code-generator/commit/b7dacb21fb0ed1173d1e45120dc072e29231ed29), [`f104619ac`](https://redirect.github.com/dotansimha/graphql-code-generator/commit/f104619acd27c9d62a06bc577737500880731087)]: - [@​graphql-codegen/plugin-helpers](https://redirect.github.com/graphql-codegen/plugin-helpers)[@​4](https://redirect.github.com/4).2.0 ### [`v3.2.2`](https://redirect.github.com/dotansimha/graphql-code-generator/blob/HEAD/packages/graphql-codegen-cli/CHANGELOG.md#322) [Compare Source](https://redirect.github.com/dotansimha/graphql-code-generator/compare/@graphql-codegen/cli@3.2.1...@graphql-codegen/cli@3.2.2) ##### Patch Changes - [#​9086](https://redirect.github.com/dotansimha/graphql-code-generator/pull/9086) [`a34cef35b`](https://redirect.github.com/dotansimha/graphql-code-generator/commit/a34cef35b4cbbe83c54bd92f88882b325df173fd) Thanks [@​beerose](https://redirect.github.com/beerose)! - dependencies updates: - Updated dependency [`graphql-config@^4.5.0` ↗︎](https://www.npmjs.com/package/graphql-config/v/4.5.0) (from `^4.4.0`, in `dependencies`) - Added dependency [`jiti@^1.17.1` ↗︎](https://www.npmjs.com/package/jiti/v/1.17.1) (to `dependencies`) - Removed dependency [`cosmiconfig-typescript-loader@^4.3.0` ↗︎](https://www.npmjs.com/package/cosmiconfig-typescript-loader/v/4.3.0) (from `dependencies`) - Removed dependency [`ts-node@^10.9.1` ↗︎](https://www.npmjs.com/package/ts-node/v/10.9.1) (from `dependencies`) - [#​9086](https://redirect.github.com/dotansimha/graphql-code-generator/pull/9086) [`a34cef35b`](https://redirect.github.com/dotansimha/graphql-code-generator/commit/a34cef35b4cbbe83c54bd92f88882b325df173fd) Thanks [@​beerose](https://redirect.github.com/beerose)! - Support `codegen.ts` in ESM projects ### [`v3.2.1`](https://redirect.github.com/dotansimha/graphql-code-generator/blob/HEAD/packages/graphql-codegen-cli/CHANGELOG.md#321) [Compare Source](https://redirect.github.com/dotansimha/graphql-code-generator/compare/@graphql-codegen/cli@3.2.0...@graphql-codegen/cli@3.2.1) ##### Patch Changes - [#​9051](https://redirect.github.com/dotansimha/graphql-code-generator/pull/9051) [`f7313f7ca`](https://redirect.github.com/dotansimha/graphql-code-generator/commit/f7313f7cabd81ee708e3345b2934aeeb978f65a3) Thanks [@​saihaj](https://redirect.github.com/saihaj)! - dependencies updates: - Added dependency [`micromatch@^4.0.5` ↗︎](https://www.npmjs.com/package/micromatch/v/4.0.5) (to `dependencies`) - [#​9051](https://redirect.github.com/dotansimha/graphql-code-generator/pull/9051) [`f7313f7ca`](https://redirect.github.com/dotansimha/graphql-code-generator/commit/f7313f7cabd81ee708e3345b2934aeeb978f65a3) Thanks [@​saihaj](https://redirect.github.com/saihaj)! - only run generate for files that users have listed in config to avoid running this over every change that codegen is not supposed to execute ### [`v3.2.0`](https://redirect.github.com/dotansimha/graphql-code-generator/blob/HEAD/packages/graphql-codegen-cli/CHANGELOG.md#320) [Compare Source](https://redirect.github.com/dotansimha/graphql-code-generator/compare/a1edaee674bf118f4e352f6864b8ebeb7322851b...@graphql-codegen/cli@3.2.0) ##### Minor Changes - [#​9009](https://redirect.github.com/dotansimha/graphql-code-generator/pull/9009) [`288ed0977`](https://redirect.github.com/dotansimha/graphql-code-generator/commit/288ed097745f9c06dd74a9398a050866caa3942a) Thanks [@​saihaj](https://redirect.github.com/saihaj)! - use [@​parcel/watcher](https://redirect.github.com/parcel/watcher) for improved watch functionality ##### Patch Changes - [#​9009](https://redirect.github.com/dotansimha/graphql-code-generator/pull/9009) [`288ed0977`](https://redirect.github.com/dotansimha/graphql-code-generator/commit/288ed097745f9c06dd74a9398a050866caa3942a) Thanks [@​saihaj](https://redirect.github.com/saihaj)! - dependencies updates: - Added dependency [`@parcel/watcher@^2.1.0` ↗︎](https://www.npmjs.com/package/@​parcel/watcher/v/2.1.0) (to `dependencies`) - Removed dependency [`chokidar@^3.5.2` ↗︎](https://www.npmjs.com/package/chokidar/v/3.5.2) (from `dependencies`) ### [`v3.1.0`](https://redirect.github.com/dotansimha/graphql-code-generator/blob/HEAD/packages/graphql-codegen-cli/CHANGELOG.md#310) [Compare Source](https://redirect.github.com/dotansimha/graphql-code-generator/compare/@graphql-codegen/cli@3.0.0...a1edaee674bf118f4e352f6864b8ebeb7322851b) ##### Minor Changes - [#​8893](https://redirect.github.com/dotansimha/graphql-code-generator/pull/8893) [`a118c307a`](https://redirect.github.com/dotansimha/graphql-code-generator/commit/a118c307a35bbb97b7cbca0f178a88276032a26c) Thanks [@​n1ru4l](https://redirect.github.com/n1ru4l)! - It is no longer mandatory to declare an empty plugins array when using a preset - [#​8723](https://redirect.github.com/dotansimha/graphql-code-generator/pull/8723) [`a3309e63e`](https://redirect.github.com/dotansimha/graphql-code-generator/commit/a3309e63efed880e6f74ce6fcbf82dd3d7857a15) Thanks [@​kazekyo](https://redirect.github.com/kazekyo)! - Introduce a new feature called DocumentTransform. DocumentTransform is a functionality that allows you to modify `documents` before they are processed by plugins. You can use functions passed to the `documentTransforms` option to make changes to GraphQL documents. To use this feature, you can write `documentTransforms` as follows: ```ts import type { CodegenConfig } from '@​graphql-codegen/cli'; const config: CodegenConfig = { schema: 'https://localhost:4000/graphql', documents: ['src/**/*.tsx'], generates: { './src/gql/': { preset: 'client', documentTransforms: [ { transform: ({ documents }) => { // Make some changes to the documents return documents; }, }, ], }, }, }; export default config; ``` For instance, to remove a `@localOnlyDirective` directive from `documents`, you can write the following code: ```js import type { CodegenConfig } from '@​graphql-codegen/cli'; import { visit } from 'graphql'; const config: CodegenConfig = { schema: 'https://localhost:4000/graphql', documents: ['src/**/*.tsx'], generates: { './src/gql/': { preset: 'client', documentTransforms: [ { transform: ({ documents }) => { return documents.map(documentFile => { documentFile.document = visit(documentFile.document, { Directive: { leave(node) { if (node.name.value === 'localOnlyDirective') return null; }, }, }); return documentFile; }); }, }, ], }, }, }; export default config; ``` DocumentTransform can also be specified by file name. You can create a custom file for a specific transformation and pass it to `documentTransforms`. Let's create the document transform as a file: ```js module.exports = { transform: ({ documents }) => { // Make some changes to the documents return documents; }, }; ``` Then, you can specify the file name as follows: ```ts import type { CodegenConfig } from '@​graphql-codegen/cli'; const config: CodegenConfig = { schema: 'https://localhost:4000/graphql', documents: ['src/**/*.tsx'], generates: { './src/gql/': { preset: 'client', documentTransforms: ['./my-document-transform.js'], }, }, }; export default config; ``` ##### Patch Changes - [#​9000](https://redirect.github.com/dotansimha/graphql-code-generator/pull/9000) [`4c422ccf6`](https://redirect.github.com/dotansimha/graphql-code-generator/commit/4c422ccf6384cfb0d0949ebe5567923973b1a044) Thanks [@​renovate](https://redirect.github.com/apps/renovate)! - dependencies updates: - Updated dependency [`@whatwg-node/fetch@^0.8.0` ↗︎](https://www.npmjs.com/package/@​whatwg-node/fetch/v/0.8.0) (from `^0.6.0`, in `dependencies`) - Updated dependencies \[[`8206b268d`](https://redirect.github.com/dotansimha/graphql-code-generator/commit/8206b268dfb485a748fd7783a163cb0ee9931491), [`8206b268d`](https://redirect.github.com/dotansimha/graphql-code-generator/commit/8206b268dfb485a748fd7783a163cb0ee9931491), [`a118c307a`](https://redirect.github.com/dotansimha/graphql-code-generator/commit/a118c307a35bbb97b7cbca0f178a88276032a26c), [`a3309e63e`](https://redirect.github.com/dotansimha/graphql-code-generator/commit/a3309e63efed880e6f74ce6fcbf82dd3d7857a15)]: - [@​graphql-codegen/core](https://redirect.github.com/graphql-codegen/core)[@​3](https://redirect.github.com/3).1.0 - [@​graphql-codegen/plugin-helpers](https://redirect.github.com/graphql-codegen/plugin-helpers)[@​4](https://redirect.github.com/4).1.0 ### [`v3.0.0`](https://redirect.github.com/dotansimha/graphql-code-generator/blob/HEAD/packages/graphql-codegen-cli/CHANGELOG.md#300) [Compare Source](https://redirect.github.com/dotansimha/graphql-code-generator/compare/@graphql-codegen/cli@2.16.5...@graphql-codegen/cli@3.0.0) ##### Major Changes - [#​8885](https://redirect.github.com/dotansimha/graphql-code-generator/pull/8885) [`fd0b0c813`](https://redirect.github.com/dotansimha/graphql-code-generator/commit/fd0b0c813015cae4f6f6bda5f4c5515e544eb76d) Thanks [@​n1ru4l](https://redirect.github.com/n1ru4l)! - drop Node.js 12 support ##### Patch Changes - [#​8883](https://redirect.github.com/dotansimha/graphql-code-generator/pull/8883) [`321d5112e`](https://redirect.github.com/dotansimha/graphql-code-generator/commit/321d5112e802fd1d96daf556095b102a81763804) Thanks [@​Solo-steven](https://redirect.github.com/Solo-steven)! - Fix PluckConfig overwrite problem. - Updated dependencies \[[`fc79b65d4`](https://redirect.github.com/dotansimha/graphql-code-generator/commit/fc79b65d4914fd25ae6bd5d58ebc7ded573a08a5), [`fd0b0c813`](https://redirect.github.com/dotansimha/graphql-code-generator/commit/fd0b0c813015cae4f6f6bda5f4c5515e544eb76d)]: - [@​graphql-codegen/core](https://redirect.github.com/graphql-codegen/core)[@​3](https://redirect.github.com/3).0.0 - [@​graphql-codegen/plugin-helpers](https://redirect.github.com/graphql-codegen/plugin-helpers)[@​4](https://redirect.github.com/4).0.0
dotansimha/graphql-code-generator (@​graphql-codegen/gql-tag-operations-preset) ### [`v2.1.0`](https://redirect.github.com/dotansimha/graphql-code-generator/compare/@graphql-codegen/gql-tag-operations-preset@2.0.0...a1edaee674bf118f4e352f6864b8ebeb7322851b) [Compare Source](https://redirect.github.com/dotansimha/graphql-code-generator/compare/@graphql-codegen/gql-tag-operations-preset@2.0.0...a1edaee674bf118f4e352f6864b8ebeb7322851b) ### [`v2.0.0`](https://redirect.github.com/dotansimha/graphql-code-generator/compare/@graphql-codegen/gql-tag-operations-preset@1.7.4...@graphql-codegen/gql-tag-operations-preset@2.0.0) [Compare Source](https://redirect.github.com/dotansimha/graphql-code-generator/compare/@graphql-codegen/gql-tag-operations-preset@1.7.4...@graphql-codegen/gql-tag-operations-preset@2.0.0)

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.



This PR was generated by Mend Renovate. View the repository job log.

changeset-bot[bot] commented 1 year ago

⚠️ No Changeset found

Latest commit: 5f60965c44bdaa3d5330ab272674912ead831018

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR