graphql-code-generator-community
graphql-code-generator-community copied to clipboard
fix(deps): update graphql-codegen (major)
This PR contains the following updates:
Release Notes
dotansimha/graphql-code-generator (@graphql-codegen/add)
v5.0.3
Patch Changes
-
#9987
5501c62Thanks @taro-28! - Export configuration types (e.g.AddPluginConfig) from the entry point.import type { AddPluginConfig } from '@​graphql-codegen/add';
v5.0.2
Patch Changes
-
Updated dependencies [
4e69568]:
v5.0.1
Patch Changes
- #9811
d8364e045Thanks @saihaj! - dependencies updates:- Updated dependency
tslib@~2.6.0↗︎ (from~2.5.0, independencies)
- Updated dependency
- Updated dependencies [
d8364e045]:
v5.0.0
Major Changes
Patch Changes
v4.0.1
Patch Changes
- #8879
8206b268dThanks @renovate! - dependencies updates:- Updated dependency
tslib@~2.5.0↗︎ (from~2.4.0, independencies)
- Updated dependency
- Updated dependencies [
8206b268d,a118c307a,a3309e63e]:
v4.0.0
Major Changes
Patch Changes
dotansimha/graphql-code-generator (@graphql-codegen/cli)
v5.0.3
Patch Changes
-
#10069
8bb34e7Thanks @renovate! - dependencies updates:- Updated dependency
@whatwg-node/fetch@^0.9.20↗︎ (from^0.8.0, independencies) - Updated dependency
graphql-config@^5.1.1↗︎ (from^5.0.2, independencies)
- Updated dependency
-
e0092b5Thanks @ardatan! - Bump whatwg-node and graphql-config
v5.0.2
Patch Changes
-
Updated dependencies [
4e69568]:
v5.0.1
Patch Changes
-
#9811
d8364e045Thanks @saihaj! - dependencies updates:- Added dependency
@graphql-codegen/client-preset@^4.1.0↗︎ (todependencies)
- Added dependency
-
#9811
d8364e045Thanks @saihaj! - ignore events in.gitdirectory -
#9811
d8364e045Thanks @saihaj! - Surface error occurring during import of @parcel/watcher -
#9811
d8364e045Thanks @saihaj! - Include @graphql-codegen/client-preset in @graphql-codegen/cli by default -
#9811
d8364e045Thanks @saihaj! - fix watcher unable to find highest common directory on Windows -
Updated dependencies [
d8364e045,d8364e045,d8364e045,d8364e045]:
v5.0.0
Major Changes
- #9506
dd9c7e148Thanks @valkum! - Make @parcel/watcher optional
Patch Changes
-
#9513
fdd19d24dThanks @cichelero! - Update yaml dependency to 2.3.1 -
Updated dependencies [
bb1e0e96e]:
v4.0.1
Patch Changes
-
#9479
0aa444b5dThanks @gilgardosh! - dependencies updates:- Updated dependency
graphql-config@^5.0.2↗︎ (from^5.0.1, independencies)
- Updated dependency
-
#9479
0aa444b5dThanks @gilgardosh! - Update graphql-config to v^5.0.2
v4.0.0
Major Changes
Patch Changes
-
#9449
4d9ea1a5aThanks @n1ru4l! - dependencies updates:- Updated dependency
graphql-config@^5.0.0↗︎ (from^4.5.0, independencies)
- Updated dependency
-
#9449
4d9ea1a5aThanks @n1ru4l! - dependencies updates:- Updated dependency
@graphql-tools/apollo-engine-loader@^8.0.0↗︎ (from^7.3.6, independencies) - Updated dependency
@graphql-tools/code-file-loader@^8.0.0↗︎ (from^7.3.17, independencies) - Updated dependency
@graphql-tools/git-loader@^8.0.0↗︎ (from^7.2.13, independencies) - Updated dependency
@graphql-tools/github-loader@^8.0.0↗︎ (from^7.3.28, independencies) - Updated dependency
@graphql-tools/graphql-file-loader@^8.0.0↗︎ (from^7.5.0, independencies) - Updated dependency
@graphql-tools/json-file-loader@^8.0.0↗︎ (from^7.4.1, independencies) - Updated dependency
@graphql-tools/load@^8.0.0↗︎ (from^7.8.0, independencies) - Updated dependency
@graphql-tools/prisma-loader@^8.0.0↗︎ (from^7.2.69, independencies) - Updated dependency
@graphql-tools/url-loader@^8.0.0↗︎ (from^7.17.17, independencies) - Updated dependency
@graphql-tools/utils@^10.0.0↗︎ (from^9.0.0, independencies) - Updated dependency
cosmiconfig@^8.1.3↗︎ (from^7.0.0, independencies) - Updated dependency
graphql-config@^5.0.1↗︎ (from^4.5.0, independencies)
- Updated dependency
-
#9371
d431f426eThanks @Axxxx0n! - Fixed option ignoreNoDocuments when using graphql configs -
#9275
2a5da5894Thanks @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,4d9ea1a5a,f46803a8c,63827fabe,bb66c2a31]:
v3.3.1
Patch Changes
-
#9267
183749346Thanks @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). -
#9280
ca1d72c40Thanks @saihaj! - fix the default output directory for init command
v3.3.0
Minor Changes
-
#9151
b7dacb21fThanks @'./user/schema.mappers#UserMapper',! - AddwatchPatternconfig option forgeneratessections.By default,
watchmode 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
generatessection now has awatchPatternoption 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.tsfiles. We want to re-run Codegen if the content of*.mappers.tsfiles 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
watchmode:yarn graphql-codegen --watchNow, updating
*.mappers.tsfiles re-runs Codegen! 🎉Note:
watchPatternis only used inwatchmode i.e. running CLI with--watchflag.
Patch Changes
v3.2.2
Patch Changes
-
#9086
a34cef35bThanks @beerose! - dependencies updates:- Updated dependency
graphql-config@^4.5.0↗︎ (from^4.4.0, independencies) - Added dependency
jiti@^1.17.1↗︎ (todependencies) - Removed dependency
cosmiconfig-typescript-loader@^4.3.0↗︎ (fromdependencies) - Removed dependency
ts-node@^10.9.1↗︎ (fromdependencies)
- Updated dependency
-
#9086
a34cef35bThanks @beerose! - Supportcodegen.tsin ESM projects
v3.2.1
Patch Changes
-
#9051
f7313f7caThanks @saihaj! - dependencies updates:- Added dependency
micromatch@^4.0.5↗︎ (todependencies)
- Added dependency
-
#9051
f7313f7caThanks @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
Minor Changes
- #9009
288ed0977Thanks @saihaj! - use @parcel/watcher for improved watch functionality
Patch Changes
- #9009
288ed0977Thanks @saihaj! - dependencies updates:- Added dependency
@parcel/watcher@^2.1.0↗︎ (todependencies) - Removed dependency
chokidar@^3.5.2↗︎ (fromdependencies)
- Added dependency
v3.1.0
Minor Changes
-
#8893
a118c307aThanks @n1ru4l! - It is no longer mandatory to declare an empty plugins array when using a preset -
#8723
a3309e63eThanks @kazekyo! - Introduce a new feature called DocumentTransform.DocumentTransform is a functionality that allows you to modify
documentsbefore they are processed by plugins. You can use functions passed to thedocumentTransformsoption to make changes to GraphQL documents.To use this feature, you can write
documentTransformsas follows: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
@localOnlyDirectivedirective fromdocuments, you can write the following code: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:
module.exports = { transform: ({ documents }) => { // Make some changes to the documents return documents; }, };Then, you can specify the file name as follows:
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
4c422ccf6Thanks @renovate! - dependencies updates:- Updated dependency
@whatwg-node/fetch@^0.8.0↗︎ (from^0.6.0, independencies)
- Updated dependency
- Updated dependencies [
8206b268d,8206b268d,a118c307a,a3309e63e]:
v3.0.0
Major Changes
Patch Changes
-
#8883
321d5112eThanks @Solo-steven! - Fix PluckConfig overwrite problem.
dotansimha/graphql-code-generator (@graphql-codegen/core)
v4.0.2
Patch Changes
-
Updated dependencies [
4e69568]:
v4.0.1
Patch Changes
- #9811
d8364e045Thanks @saihaj! - dependencies updates:- Updated dependency
tslib@~2.6.0↗︎ (from~2.5.0, independencies)
- Updated dependency
- Updated dependencies [
d8364e045]:
v4.0.0
Major Changes
Patch Changes
- #9449
4d9ea1a5aThanks @n1ru4l! - dependencies updates:- Updated dependency
@graphql-tools/schema@^10.0.0↗︎ (from^9.0.0, independencies) - Updated dependency
@graphql-tools/utils@^10.0.0↗︎ (from^9.1.1, independencies)
- Updated dependency
- Updated dependencies [
4d9ea1a5a,f46803a8c,63827fabe,bb66c2a31]:
v3.1.0
Minor Changes
-
#8723
a3309e63eThanks @kazekyo! - Introduce a new feature called DocumentTransform.DocumentTransform is a functionality that allows you to modify
documentsbefore they are processed by plugins. You can use functions passed to thedocumentTransformsoption to make changes to GraphQL documents.To use this feature, you can write
documentTransformsas follows: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
@localOnlyDirectivedirective fromdocuments, you can write the following code: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:
module.exports = { transform: ({ documents }) => { // Make some changes to the documents return documents; }, };Then, you can specify the file name as follows:
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
- #8879
8206b268dThanks @renovate! - dependencies updates:- Updated dependency
tslib@~2.5.0↗︎ (from~2.4.0, independencies)
- Updated dependency
- Updated dependencies [
8206b268d,a118c307a,a3309e63e]:
v3.0.0
Major Changes
Patch Changes
dotansimha/graphql-code-generator (@graphql-codegen/plugin-helpers)
v5.1.0
Minor Changes
-
#9989
55a1e9eThanks @eddeee888! - AddgenerateInternalResolversIfNeededoptionThis option can be used to generate more correct types for internal resolvers. For example, only generate
__resolveReferenceif the federation object has a resolvable@key.In the future, this option can be extended to support other internal resolvers e.g.
__isTypeOfis only generated for implementing types and union members.
v5.0.4
Patch Changes
- #9961
dfc5310Thanks @eddeee888!
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.
- [ ] If you want to rebase/retry this PR, check this box
This PR was generated by Mend Renovate. View the repository job log.
⚠️ No Changeset found
Latest commit: 2c914a222602258f6f6a1e13e51b004a40f7e771
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
Edited/Blocked Notification
Renovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR.
You can manually request rebase by checking the rebase/retry box above.
⚠️ Warning: custom changes will be lost.