Skip to content

Conversation

renovate[bot]
Copy link

@renovate renovate bot commented Aug 6, 2021

This PR contains the following updates:

Package Change Age Confidence
@graphql-codegen/cli (source) 1.21.8 -> 6.0.0 age confidence
@graphql-codegen/introspection (source) 1.18.2 -> 5.0.0 age confidence
@graphql-codegen/typescript (source) 1.23.0 -> 5.0.2 age confidence
@graphql-codegen/typescript-operations (source) 1.18.4 -> 5.0.2 age confidence
@graphql-codegen/typescript-react-apollo (source) 2.3.1 -> 4.3.3 age confidence

Release Notes

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

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

v2.13.6

Compare Source

Patch Changes

v2.13.5

[Compare Source](https://redirect.github.com/dotansimha/gra


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 2 times, most recently from 9e65f96 to ab1e618 Compare February 8, 2024 15:12
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch 2 times, most recently from eed99d5 to 674944d Compare February 22, 2024 21:11
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch from 674944d to 976a0d1 Compare May 17, 2024 14:14
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch 2 times, most recently from ab51ce0 to 110a960 Compare July 2, 2024 11:27
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch from 110a960 to 5646c2d Compare September 5, 2024 14:53
@coderabbitai
Copy link

coderabbitai bot commented Sep 5, 2024

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Note

Free review on us!

CodeRabbit is offering free reviews until Wed Oct 08 2025 to showcase some of the refinements we've made.

Comment @coderabbitai help to get the list of available commands and usage tips.

@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch from 5646c2d to 9f4dbf8 Compare September 9, 2024 16:45
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch from 9f4dbf8 to fd6f646 Compare October 7, 2024 16:27
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch from fd6f646 to a819b22 Compare October 28, 2024 14:44
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch from a819b22 to 59f6d97 Compare November 22, 2024 21:44
@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
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.

0 participants