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

Update graphqlcodegenerator monorepo (major) #203

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

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Aug 26, 2020

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
@graphql-codegen/cli (source) 1.21.4 -> 5.0.2 age adoption passing confidence
@graphql-codegen/fragment-matcher (source) 1.17.8 -> 5.0.2 age adoption passing confidence
@graphql-codegen/introspection (source) 1.18.2 -> 4.0.3 age adoption passing confidence
@graphql-codegen/typescript (source) 1.22.0 -> 4.0.9 age adoption passing confidence
@graphql-codegen/typescript-operations (source) 1.17.16 -> 4.2.3 age adoption passing confidence
@graphql-codegen/typescript-react-apollo (source) 1.17.7 -> 4.3.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

v2.12.2

Compare Source

Patch Changes

v2.12.1

Compare Source

Patch Changes

v2.12.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 was generated by Mend Renovate. View the repository job log.

@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch from 17c194b to e63fc66 Compare August 28, 2020 18:11
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch 2 times, most recently from 49809d2 to e3b6071 Compare September 28, 2020 19:25
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch from e3b6071 to 3358f38 Compare October 26, 2020 10:06
@renovate renovate bot changed the title Update dependency @graphql-codegen/typescript-react-apollo to v2 Update graphqlcodegenerator monorepo (major) Oct 26, 2020
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch 3 times, most recently from 4dc63d7 to f39e691 Compare November 5, 2020 12:30
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch from f39e691 to f1a4c33 Compare November 17, 2020 20:59
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch 5 times, most recently from f6ded95 to 5e34f64 Compare November 29, 2020 14:29
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch from 5e34f64 to 4d0886d Compare December 23, 2020 16:43
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch from 4d0886d to 16052ec Compare January 26, 2021 13:58
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch from 16052ec to 9fb4783 Compare February 25, 2021 23:56
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch 2 times, most recently from 8d8efdb to a0c21a8 Compare March 7, 2021 23:16
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch 2 times, most recently from db56ec0 to 80e24ee Compare March 15, 2021 20:48
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch 2 times, most recently from 7b49df5 to e1fa936 Compare April 19, 2021 22:35
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch from e1fa936 to 8bc027d Compare May 26, 2021 10:10
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch 2 times, most recently from 313422b to 89c86c3 Compare June 21, 2021 16:29
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch 3 times, most recently from ad01024 to 1102488 Compare July 6, 2021 20:05
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch from 1102488 to b8cfb71 Compare July 13, 2021 07:27
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch from c1b45fb to 4cdfa88 Compare November 18, 2021 11:56
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch from 4cdfa88 to 5eb05f1 Compare December 30, 2021 08:20
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch from 5eb05f1 to 13584f3 Compare January 13, 2022 11:14
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch from 13584f3 to 8717b39 Compare January 21, 2022 12:41
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch 2 times, most recently from 375bfe5 to fc955f9 Compare February 3, 2022 15:10
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch from fc955f9 to 0681eb9 Compare March 7, 2022 14:52
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch from 0681eb9 to 0846c31 Compare March 26, 2022 13:27
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch from 0846c31 to 0f9fa3e Compare May 16, 2022 00:49
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch from 0f9fa3e to 64ed399 Compare June 18, 2022 14:48
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch from 64ed399 to 79f622a Compare September 25, 2022 21:56
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch from 79f622a to 7a06c45 Compare November 20, 2022 13:49
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch from 7a06c45 to 27114f7 Compare March 17, 2023 04:02
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch from 27114f7 to 78687a1 Compare April 4, 2023 04:58
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch from 78687a1 to 463345c Compare April 22, 2023 15:44
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch from 463345c to eaef0e5 Compare May 24, 2023 09:01
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch from eaef0e5 to f13ee41 Compare June 1, 2023 18:33
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch from f13ee41 to 61130d0 Compare June 19, 2023 08:48
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch from 61130d0 to d314216 Compare July 25, 2023 10:20
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch from d314216 to b75a70a Compare September 25, 2023 22:09
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch from b75a70a to bfd66ef Compare October 25, 2023 03:17
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch 3 times, most recently from 881009a to 3cdfe70 Compare February 8, 2024 17:02
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch 2 times, most recently from 06493d7 to 958b990 Compare February 22, 2024 21:54
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch from 958b990 to 505f7e4 Compare May 17, 2024 16:25
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch from 505f7e4 to 3d3869f Compare June 28, 2024 10:39
@renovate renovate bot force-pushed the renovate/major-graphqlcodegenerator-monorepo branch from 3d3869f to 5e762ef Compare July 2, 2024 11:12
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