Skip to content

Conversation

@renovate
Copy link

@renovate renovate bot commented Aug 6, 2021

ℹ️ Note

This PR body was truncated due to platform limits.

This PR contains the following updates:

Package Change Age Confidence
@graphql-codegen/cli (source) 1.21.86.1.1 age confidence
@graphql-codegen/introspection (source) 1.18.25.0.0 age confidence
@graphql-codegen/typescript (source) 1.23.05.0.7 age confidence
@graphql-codegen/typescript-operations (source) 1.18.45.0.7 age confidence
@graphql-codegen/typescript-react-apollo (source) 2.3.14.4.0 age confidence

Release Notes

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

v6.1.1

Compare Source

Patch Changes
  • #​10569 8cb7d43 Thanks @​etr2460! - fix(graphql-codegen-cli): Don't hang when 0 CPUs are found

    Fixes generation when 0 CPUs are returned by os.cpus(), which occurs in sandbox environments.

v6.1.0

Compare Source

Minor Changes
Patch Changes

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](https://redirec


Configuration

📅 Schedule: Branch creation - "on saturday" in timezone Asia/Tokyo, 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 added the renovate label Aug 6, 2021
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch from be7c02a to 28a8751 Compare August 6, 2021 16:52
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch 3 times, most recently from ba0f498 to eb4dd8c Compare August 20, 2021 09:41
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch 3 times, most recently from 34dad81 to b8b0833 Compare August 25, 2021 20:02
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch 4 times, most recently from 3d2c608 to 867c571 Compare September 7, 2021 12:15
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch 3 times, most recently from b1146b0 to 846e9d9 Compare September 17, 2021 15:43
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch 2 times, most recently from 27e30d9 to 2a41189 Compare September 29, 2021 15:41
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch 2 times, most recently from 0d2362d to f361c53 Compare October 3, 2021 13:41
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch 5 times, most recently from ed82939 to 366f66c Compare October 15, 2021 17:01
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch from 366f66c to f08b4e6 Compare October 22, 2021 17:20
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch 5 times, most recently from 2a3b06d to 959cc61 Compare November 5, 2021 17:25
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch from 59f6d97 to 0d5e7f0 Compare January 28, 2025 13:07
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch 2 times, most recently from 3806820 to 3b306fc Compare February 19, 2025 16:03
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch from 3b306fc to ac19eeb Compare February 23, 2025 21:45
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch from ac19eeb to 8085d6f Compare March 27, 2025 15:29
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch from 8085d6f to 1f83370 Compare May 6, 2025 15:28
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch from 1f83370 to 568a333 Compare May 26, 2025 12:44
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch from 568a333 to b6046df Compare June 6, 2025 19:18
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch 2 times, most recently from b90a909 to c2264dc Compare August 13, 2025 15:50
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch from c2264dc to d27cc7e Compare August 19, 2025 15:12
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch 2 times, most recently from 752cdc4 to 353746e Compare September 7, 2025 21:26
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch 2 times, most recently from a71c7eb to e67e705 Compare September 29, 2025 16:56
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch from e67e705 to 877aec1 Compare October 5, 2025 18:00
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch from 877aec1 to d50ccb3 Compare October 25, 2025 15:37
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch 3 times, most recently from bb8f5cd to eb34544 Compare November 20, 2025 18:34
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch 2 times, most recently from c744a67 to e52b584 Compare December 3, 2025 19:39
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch 2 times, most recently from bcabc1f to c632933 Compare December 18, 2025 14:30
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch 2 times, most recently from 236b260 to b3082e7 Compare January 6, 2026 13:31
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch 2 times, most recently from 251075a to 89d69a2 Compare January 11, 2026 12:55
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch from 2c5dae1 to dc0250d Compare January 23, 2026 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant