-
Updated dependencies [
4e69568
]:- @graphql-codegen/plugin-helpers@5.0.3
- #9811
d8364e045
Thanks @saihaj! - dependencies updates:- Updated dependency
tslib@~2.6.0
↗︎ (from~2.5.0
, independencies
)
- Updated dependency
- Updated dependencies [
d8364e045
]:- @graphql-codegen/plugin-helpers@5.0.2
- #9449
4d9ea1a5a
Thanks @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
]:- @graphql-codegen/plugin-helpers@5.0.0
-
#8723
a3309e63e
Thanks @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 thedocumentTransforms
option to make changes to GraphQL documents.To use this feature, you can write
documentTransforms
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: [ { transform: ({ documents }) => { // Make some changes to the documents return documents; }, }, ], }, }, }; export default config;
For instance, to remove a
@localOnlyDirective
directive 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;
- #8879
8206b268d
Thanks @renovate! - dependencies updates:- Updated dependency
tslib@~2.5.0
↗︎ (from~2.4.0
, independencies
)
- Updated dependency
- Updated dependencies [
8206b268d
,a118c307a
,a3309e63e
]:- @graphql-codegen/plugin-helpers@4.1.0
-
46f75304a
Thanks @saihaj! - fix the version of@graphql-codegen/plugin-helpers@3.1.1
-
Updated dependencies [
307a5d350
]:- @graphql-codegen/plugin-helpers@3.1.1
-
#8606
45eb2b18a
Thanks @charlypoly! - dependencies updates:- Updated dependency
@graphql-tools/utils@^9.1.1
↗︎ (from9.0.0
, independencies
)
- Updated dependency
-
#8606
45eb2b18a
Thanks @charlypoly! - Fix validation issue on fragment/ops naming conflict
- #8556
64e553c3f
Thanks @charlypoly! - dependencies updates:- Updated dependency
@graphql-tools/utils@9.0.0
↗︎ (from^8.8.0
, independencies
)
- Updated dependency
-
#8548
516170ef6
Thanks @charlypoly! - dependencies updates:- Updated dependency
@graphql-tools/utils@9.0.0
↗︎ (from^8.8.0
, independencies
)
- Updated dependency
-
#8548
516170ef6
Thanks @charlypoly! - Improve codegen documents and schema validation
-
#8525
63dc8f205
Thanks @charlypoly! - removeDetailledError
, not supported by Listr renderer -
Updated dependencies [
63dc8f205
]:- @graphql-codegen/plugin-helpers@2.7.2
-
#8207
6c7d3e54b
Thanks @renovate! - ### Dependencies Updates- Updated dependency (
@graphql-tools/schema@^9.0.0
↗︎) (was^8.5.0
, independencies
)
- Updated dependency (
-
#8189
b408f8238
Thanks @n1ru4l! - Fix CommonJS TypeScript resolution withmoduleResolution
node16
ornodenext
-
Updated dependencies [
b408f8238
]:- @graphql-codegen/plugin-helpers@2.6.2
-
d84afec09: Support TypeScript ESM modules (
"module": "node16"
and"moduleResolution": "node16"
).
- Updated dependencies [d84afec09]
- Updated dependencies [a4fe5006b]
- Updated dependencies [8e44df58b]
- @graphql-codegen/plugin-helpers@2.5.0
- cb9adeb96: Cache validation of documents
- Updated dependencies [cb9adeb96]
- @graphql-codegen/plugin-helpers@2.4.1
- 754a33715: Performance Profiler --profile
- Updated dependencies [754a33715]
- @graphql-codegen/plugin-helpers@2.4.0
- b61dc57cf: feat(core): add graphql@16 in peer dependencies
- 8643b3bf3: Add GraphQL 16 as a peerDependency
- 6002feb3d: Fix exports in package.json files for react-native projects
- Updated dependencies [6002feb3d]
- @graphql-codegen/plugin-helpers@2.3.2
- 97ddb487a: feat: GraphQL v16 compatibility
- Updated dependencies [97ddb487a]
- @graphql-codegen/plugin-helpers@2.3.0
- 7c60e5acc: feat(core): ability to skip some specific validation rules with skipDocumentsValidation option
- Updated dependencies [7c60e5acc]
- @graphql-codegen/plugin-helpers@2.2.0
- 39773f59b: enhance(plugins): use getDocumentNodeFromSchema and other utilities from @graphql-tools/utils
- 440172cfe: support ESM
- 24185985a: bump graphql-tools package versions
- Updated dependencies [24185985a]
- Updated dependencies [39773f59b]
- Updated dependencies [440172cfe]
- @graphql-codegen/plugin-helpers@2.1.0
-
b0cb13df4: Update to latest
graphql-tools
andgraphql-config
version.‼️ ‼️ ‼️ Please note‼️ ‼️ ‼️ :This is a breaking change since Node 10 is no longer supported in
graphql-tools
, and also no longer supported for Codegen packages.
- d80efdec4: Removed
typescript-compatiblity
since it's no longer maintained. Please migrate your codebase to use the latest output of codegen. - Updated dependencies [b0cb13df4]
- @graphql-codegen/plugin-helpers@2.0.0
- dfd25caf: chore(deps): bump graphql-tools versions
- Updated dependencies [dfd25caf]
- @graphql-codegen/plugin-helpers@1.18.7
- 1183d173: Bump all packages to resolve issues with shared dependencies
- Updated dependencies [1183d173]
- @graphql-codegen/plugin-helpers@1.18.2
- 1d7c6432: Bump all packages to allow "^" in deps and fix compatibility issues
- 1d7c6432: Bump versions of @graphql-tools/ packages to fix issues with loading schemas and SDL comments
- ac067ea0: Filter
prepend
andappend
coming from plugins, make sure not to add empty lines when not needed - Updated dependencies [1d7c6432]
- Updated dependencies [1d7c6432]
- @graphql-codegen/plugin-helpers@1.17.8