Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): update graphqlcodegenerator monorepo (major) #566

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Dec 7, 2022

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
@graphql-codegen/cli (source) 2.11.7 -> 5.0.2 age adoption passing confidence
@graphql-codegen/fragment-matcher (source) 3.3.1 -> 5.0.2 age adoption passing confidence
@graphql-codegen/import-types-preset (source) 2.2.3 -> 3.0.0 age adoption passing confidence
@graphql-codegen/introspection (source) 2.2.1 -> 4.0.3 age adoption passing confidence
@graphql-codegen/plugin-helpers (source) ^2.3.1 -> ^5.0.0 age adoption passing confidence
@graphql-codegen/testing 1.17.7 -> 3.0.3 age adoption passing confidence
@graphql-codegen/typescript (source) 2.7.3 -> 4.0.9 age adoption passing confidence
@graphql-codegen/typescript-operations (source) 2.5.3 -> 4.2.3 age adoption passing confidence
@graphql-codegen/typescript-react-apollo (source) 3.3.7 -> 4.3.0 age adoption passing confidence
@graphql-codegen/visitor-plugin-common (source) ^2.9.1 -> ^5.0.0 age adoption passing confidence

Release Notes

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

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

Patch Changes

v2.13.4

Compare Source

Patch Changes

v2.13.3

Compare Source

Patch Changes

v2.13.2

Compare Source

Patch Changes

v2.13.1

Compare Source

Patch Changes

v2.13.0

Compare Source

Minor Changes
Patch Changes

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 has been generated by Mend Renovate. View repository job log here.

@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch 4 times, most recently from fc4cde2 to 4419a8c Compare December 14, 2022 01:17
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch from 4419a8c to 5933a4f Compare December 17, 2022 00:04
@renovate renovate bot changed the title fix(deps): update dependency @graphql-codegen/plugin-helpers to v3 Update dependency @graphql-codegen/plugin-helpers to v3 Dec 17, 2022
@renovate renovate bot changed the title Update dependency @graphql-codegen/plugin-helpers to v3 fix(deps): update dependency @graphql-codegen/plugin-helpers to v3 Dec 17, 2022
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch 2 times, most recently from d5b2855 to 8b595ef Compare December 27, 2022 00:24
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch from 8b595ef to a6f338c Compare December 31, 2022 02:37
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch 3 times, most recently from 93a5688 to 6ee3d6c Compare January 19, 2023 00:04
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch 3 times, most recently from e56e39b to 0aa8585 Compare February 1, 2023 00:50
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch from 0aa8585 to 5c6e4bd Compare February 3, 2023 12:01
@renovate renovate bot changed the title fix(deps): update dependency @graphql-codegen/plugin-helpers to v3 chore(deps): update graphqlcodegenerator monorepo (major) Feb 3, 2023
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch 3 times, most recently from 96572ed to 8da0c23 Compare February 7, 2023 14:44
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch 3 times, most recently from d15ca99 to ff95b9f Compare February 18, 2023 05:55
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch 5 times, most recently from cb1fed7 to dd70403 Compare February 27, 2023 00:30
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch from dd70403 to 5ee16de Compare March 2, 2023 16:25
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch from f67a611 to e2db26d Compare April 22, 2023 14:51
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch 2 times, most recently from 190f57d to d32f009 Compare May 24, 2023 12:29
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch 2 times, most recently from 20d75a6 to 254889b Compare June 1, 2023 15:28
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch from 254889b to 3e66014 Compare June 19, 2023 08:29
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch from 3e66014 to c9901f5 Compare July 4, 2023 18:39
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch 2 times, most recently from 006a4de to 6dc2686 Compare July 27, 2023 14:11
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch from 6dc2686 to 19f8d1f Compare September 12, 2023 12:34
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch 3 times, most recently from e8ea143 to 586a3d3 Compare October 1, 2023 15:03
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch 3 times, most recently from 6a9fc11 to 5fbe781 Compare October 11, 2023 01:20
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch 5 times, most recently from ea1b62b to 34794cb Compare October 25, 2023 01:46
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch 3 times, most recently from 6e0d9e0 to 4f51ed6 Compare February 8, 2024 16:06
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch 2 times, most recently from b8e7106 to 7a35006 Compare February 22, 2024 21:29
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch from 7a35006 to 6751994 Compare May 17, 2024 20:21
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch from 6751994 to c78bbf7 Compare June 28, 2024 09:47
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch from c78bbf7 to b2ab396 Compare July 2, 2024 11:30
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.

None yet

0 participants