Skip to content

Conversation

@renovate
Copy link
Contributor

@renovate renovate bot commented Mar 18, 2023

This PR contains the following updates:

Package Change Age Confidence
@graphql-codegen/cli (source) 2.13.6 -> 6.0.2 age confidence
@graphql-codegen/typescript (source) 2.7.4 -> 5.0.4 age confidence
@graphql-codegen/typescript-operations (source) 2.5.4 -> 5.0.4 age confidence

Release Notes

dotansimha/graphql-code-generator (@​graphql-codegen/cli)

v6.0.2

Compare Source

Patch Changes

v6.0.1

Compare Source

Patch Changes
  • #​10468 cb1b9d9 Thanks @​eddeee888! - In watch mode, do not write output on failure

    Previously, on partial or full failure, watch mode still write to output. However, since the output'd be an empty array, it will then call removeStaleFiles internally to remove all previously generated files.

    This patch puts a temporary fix to avoid writing output on any failure to fix the described behaviour.

    This also means the config.allowPartialOutputs does not work in watch mode for now.

v6.0.0

Compare Source

Major Changes
Patch Changes

v5.0.7

Compare Source

Patch Changes

v5.0.6

Compare Source

Patch Changes

v5.0.5

Compare Source

Patch Changes

v5.0.4

Compare Source

Patch Changes

v5.0.3

Compare Source

Patch Changes

v5.0.2

Compare Source

Patch Changes

v5.0.1

Compare Source

Patch Changes

v5.0.0

Compare Source

Major Changes
Patch Changes

v4.0.1

Compare Source

Patch Changes

v4.0.0

Compare Source

Major Changes
Patch Changes

v3.3.1

Compare Source

Patch Changes

v3.3.0

Compare Source

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:

    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

v3.2.2

Compare Source

Patch Changes

v3.2.1

Compare Source

Patch Changes

v3.2.0

Compare Source

Minor Changes
Patch Changes

v3.1.0

Compare Source

Minor Changes
  • #​8893 a118c307a Thanks @​n1ru4l! - It is no longer mandatory to declare an empty plugins array when using a preset

  • #​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 the documentTransforms 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 from documents, 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

v3.0.0

Compare Source

Major Changes
Patch Changes

v2.16.5

Compare Source

Patch Changes

v2.16.4

Compare Source

Patch Changes

v2.16.3

Compare Source

Patch Changes

v2.16.2

Compare Source

Patch Changes

v2.16.1

Compare Source

Patch Changes

v2.16.0

Compare Source

Minor Changes
Patch Changes

v2.15.0

Compare Source

Minor Changes

v2.14.1

Compare Source

Patch Changes

v2.14.0

Compare Source

Minor Changes
Patch Changes

v2.13.12

Compare Source

Patch Changes

v2.13.11

Compare Source

Patch Changes

v2.13.10

Compare Source

Patch Changes

v2.13.9

Compare Source

Patch Changes

v2.13.8

Compare Source

Patch Changes

v2.13.7

Compare Source

Patch Changes
dotansimha/graphql-code-generator (@​

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.

@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch from 093b3fb to 1ebbaec Compare April 17, 2023 12:34
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch from 1ebbaec to 1172517 Compare May 28, 2023 11:22
@renovate renovate bot changed the title Update graphqlcodegenerator monorepo to v3 (major) Update graphqlcodegenerator monorepo to v4 (major) May 28, 2023
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch from 1172517 to 2bb652f Compare June 1, 2023 20:02
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch from 2bb652f to bade1ea Compare June 19, 2023 10:37
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch from bade1ea to 41aa53f Compare July 25, 2023 10:17
@renovate renovate bot changed the title Update graphqlcodegenerator monorepo to v4 (major) Update graphqlcodegenerator monorepo (major) Jul 25, 2023
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch from 41aa53f to 247f04f Compare February 6, 2024 15:17
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch 2 times, most recently from 3d434c7 to f29b7e1 Compare February 22, 2024 21:43
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch from f29b7e1 to 8d76439 Compare May 17, 2024 17:05
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch 2 times, most recently from 987d941 to f1a5d4d Compare July 2, 2024 10:58
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch from f1a5d4d to 2b5d04f Compare October 7, 2024 16:01
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch from 2b5d04f to a5efa1c Compare October 28, 2024 13:40
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch from a5efa1c to 7fa9341 Compare November 22, 2024 21:43
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch from 7fa9341 to b4f2a37 Compare January 28, 2025 12:35
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch 2 times, most recently from c5c7312 to 3fef56d Compare February 19, 2025 17:07
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch from 3fef56d to e7f036b Compare February 23, 2025 21:39
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch from e7f036b to f34881e Compare March 27, 2025 12:38
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch from f34881e to d2381ef Compare May 6, 2025 17:03
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch from d2381ef to be2c018 Compare June 6, 2025 19:13
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch 2 times, most recently from 0bfde76 to c86f0a5 Compare August 13, 2025 11:48
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch from c86f0a5 to 63123b0 Compare August 19, 2025 17:38
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch from 63123b0 to aff8f22 Compare August 31, 2025 14:17
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch from aff8f22 to 0b56b3c Compare September 7, 2025 21:58
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch 2 times, most recently from 93bcd43 to 9d21e67 Compare September 29, 2025 16:53
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch from 9d21e67 to 7b55848 Compare October 5, 2025 17:53
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch from 7b55848 to 2682df8 Compare October 22, 2025 00:56
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch 2 times, most recently from 9809667 to bd6dd80 Compare November 12, 2025 22:02
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch from bd6dd80 to 20384fc Compare November 13, 2025 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant