Skip to content

Releases: dotansimha/graphql-code-generator

November 22, 2024

22 Nov 20:42
839b6f0
Compare
Choose a tag to compare

@graphql-codegen/visitor-plugin-common@5.6.0

Minor Changes

Patch Changes

@graphql-codegen/typescript-document-nodes@4.0.12

Patch Changes

  • Updated dependencies [1617e3c, fa64fbf]:
    • @graphql-codegen/visitor-plugin-common@5.6.0

@graphql-codegen/gql-tag-operations@4.0.12

Patch Changes

  • Updated dependencies [1617e3c, fa64fbf]:
    • @graphql-codegen/visitor-plugin-common@5.6.0

@graphql-codegen/typescript-operations@4.4.0

Minor Changes

Patch Changes

  • Updated dependencies [1617e3c, fa64fbf]:
    • @graphql-codegen/visitor-plugin-common@5.6.0
    • @graphql-codegen/typescript@4.1.2

@graphql-codegen/typescript-resolvers@4.4.1

Patch Changes

  • #10187 1617e3c Thanks @gilgardosh! - Fix: type naming for imported enums

  • Updated dependencies [1617e3c, fa64fbf]:

    • @graphql-codegen/visitor-plugin-common@5.6.0
    • @graphql-codegen/typescript@4.1.2

@graphql-codegen/typed-document-node@5.0.12

Patch Changes

  • Updated dependencies [1617e3c, fa64fbf]:
    • @graphql-codegen/visitor-plugin-common@5.6.0

@graphql-codegen/typescript@4.1.2

Patch Changes

  • Updated dependencies [1617e3c, fa64fbf]:
    • @graphql-codegen/visitor-plugin-common@5.6.0

@graphql-codegen/client-preset@4.5.1

Patch Changes

  • #9981 05aa6b4 Thanks @azu! - The client preset now allows the use of the enumsAsConst config option

  • Updated dependencies [1617e3c, fa64fbf]:

    • @graphql-codegen/visitor-plugin-common@5.6.0
    • @graphql-codegen/typescript-operations@4.4.0
    • @graphql-codegen/gql-tag-operations@4.0.12
    • @graphql-codegen/typed-document-node@5.0.12
    • @graphql-codegen/typescript@4.1.2

@graphql-codegen/graphql-modules-preset@4.0.12

Patch Changes

  • Updated dependencies [1617e3c, fa64fbf]:
    • @graphql-codegen/visitor-plugin-common@5.6.0

October 28, 2024

28 Oct 12:19
876ea0c
Compare
Choose a tag to compare

@graphql-codegen/visitor-plugin-common@5.5.0

Minor Changes

  • #9989 55a1e9e Thanks @eddeee888! - Add generateInternalResolversIfNeeded option

    This option can be used to generate more correct types for internal resolvers. For example, only generate __resolveReference if the federation object has a resolvable @key.

    In the future, this option can be extended to support other internal resolvers e.g. __isTypeOf is only generated for implementing types and union members.

  • #10141 a235051 Thanks @eddeee888! - Add avoidCheckingAbstractTypesRecursively to avoid checking and generating abstract types recursively

    For users that already sets recursive default mappers e.g. Partial<{T}> or DeepPartial<{T}>, having both options on will cause a nested loop which eventually crashes Codegen. In such case, setting avoidCheckingAbstractTypesRecursively: true allows users to continue to use recursive default mappers as before.

Patch Changes

  • Updated dependencies [55a1e9e]:
    • @graphql-codegen/plugin-helpers@5.1.0

@graphql-codegen/typescript-document-nodes@4.0.11

Patch Changes

  • Updated dependencies [55a1e9e, a235051]:
    • @graphql-codegen/visitor-plugin-common@5.5.0
    • @graphql-codegen/plugin-helpers@5.1.0

@graphql-codegen/gql-tag-operations@4.0.11

Patch Changes

  • Updated dependencies [55a1e9e, a235051]:
    • @graphql-codegen/visitor-plugin-common@5.5.0
    • @graphql-codegen/plugin-helpers@5.1.0

@graphql-codegen/typescript-operations@4.3.1

Patch Changes

  • Updated dependencies [55a1e9e, a235051]:
    • @graphql-codegen/visitor-plugin-common@5.5.0
    • @graphql-codegen/plugin-helpers@5.1.0
    • @graphql-codegen/typescript@4.1.1

@graphql-codegen/typescript-resolvers@4.4.0

Minor Changes

  • #9989 55a1e9e Thanks @eddeee888! - Add generateInternalResolversIfNeeded option

    This option can be used to generate more correct types for internal resolvers. For example, only generate __resolveReference if the federation object has a resolvable @key.

    In the future, this option can be extended to support other internal resolvers e.g. __isTypeOf is only generated for implementing types and union members.

  • #10141 a235051 Thanks @eddeee888! - Add avoidCheckingAbstractTypesRecursively to avoid checking and generating abstract types recursively

    For users that already sets recursive default mappers e.g. Partial<{T}> or DeepPartial<{T}>, having both options on will cause a nested loop which eventually crashes Codegen. In such case, setting avoidCheckingAbstractTypesRecursively: true allows users to continue to use recursive default mappers as before.

Patch Changes

  • Updated dependencies [55a1e9e, a235051]:
    • @graphql-codegen/visitor-plugin-common@5.5.0
    • @graphql-codegen/plugin-helpers@5.1.0
    • @graphql-codegen/typescript@4.1.1

@graphql-codegen/typed-document-node@5.0.11

Patch Changes

  • #10160 c7af639 Thanks @jyasskin! - Allow explicit undefined in additional to optional arguments

  • Updated dependencies [55a1e9e, a235051]:

    • @graphql-codegen/visitor-plugin-common@5.5.0
    • @graphql-codegen/plugin-helpers@5.1.0

@graphql-codegen/typescript@4.1.1

Patch Changes

  • Updated dependencies [55a1e9e, a235051]:
    • @graphql-codegen/visitor-plugin-common@5.5.0
    • @graphql-codegen/plugin-helpers@5.1.0

@graphql-codegen/client-preset@4.5.0

Minor Changes

Patch Changes

  • #10182 effd875 Thanks @eddeee888! - Revert slimmer client preset output

  • Updated dependencies [55a1e9e, a235051, c7af639]:

    • @graphql-codegen/visitor-plugin-common@5.5.0
    • @graphql-codegen/plugin-helpers@5.1.0
    • @graphql-codegen/typed-document-node@5.0.11
    • @graphql-codegen/gql-tag-operations@4.0.11
    • @graphql-codegen/typescript-operations@4.3.1
    • @graphql-codegen/typescript@4.1.1

@graphql-codegen/graphql-modules-preset@4.0.11

Patch Changes

  • Updated dependencies [55a1e9e, a235051]:
    • @graphql-codegen/visitor-plugin-common@5.5.0
    • @graphql-codegen/plugin-helpers@5.1.0

@graphql-codegen/plugin-helpers@5.1.0

Minor Changes

  • #9989 55a1e9e Thanks @eddeee888! - Add generateInternalResolversIfNeeded option

    This option can be used to generate more correct types for internal resolvers. For example, only generate __resolveReference if the federation object has a resolvable @key.

    In the future, this option can be extended to support other internal resolvers e.g. __isTypeOf is only generated for implementing types and union members.

October 07, 2024

07 Oct 15:02
effc3bc
Compare
Choose a tag to compare

@graphql-codegen/cli@5.0.3

Patch Changes

@graphql-codegen/visitor-plugin-common@5.4.0

Minor Changes

  • #10077 3f4f546 Thanks @eddeee888! - Extend config.avoidOptions to support query, mutation and subscription

    Previously, config.avoidOptions.resolvers was being used to make query, mutation and subscription fields non-optional.
    Now, config.avoidOptions.query, config.avoidOptions.mutation and config.avoidOptions.subscription can be used to target the respective types.

@graphql-codegen/typescript-document-nodes@4.0.10

Patch Changes

  • Updated dependencies [3f4f546]:
    • @graphql-codegen/visitor-plugin-common@5.4.0

@graphql-codegen/gql-tag-operations@4.0.10

Patch Changes

  • #10075 67e7556 Thanks @n1ru4l! - Add note about enabling bundle size reduction for the generated graphql tag file.

  • Updated dependencies [3f4f546]:

    • @graphql-codegen/visitor-plugin-common@5.4.0

@graphql-codegen/typescript-operations@4.3.0

Minor Changes

  • #10077 3f4f546 Thanks @eddeee888! - Extend config.avoidOptions to support query, mutation and subscription

    Previously, config.avoidOptions.resolvers was being used to make query, mutation and subscription fields non-optional.
    Now, config.avoidOptions.query, config.avoidOptions.mutation and config.avoidOptions.subscription can be used to target the respective types.

Patch Changes

  • Updated dependencies [3f4f546]:
    • @graphql-codegen/visitor-plugin-common@5.4.0
    • @graphql-codegen/typescript@4.1.0

@graphql-codegen/typescript-resolvers@4.3.0

Minor Changes

  • #10077 3f4f546 Thanks @eddeee888! - Extend config.avoidOptions to support query, mutation and subscription

    Previously, config.avoidOptions.resolvers was being used to make query, mutation and subscription fields non-optional.
    Now, config.avoidOptions.query, config.avoidOptions.mutation and config.avoidOptions.subscription can be used to target the respective types.

Patch Changes

  • Updated dependencies [3f4f546]:
    • @graphql-codegen/visitor-plugin-common@5.4.0
    • @graphql-codegen/typescript@4.1.0

@graphql-codegen/typed-document-node@5.0.10

Patch Changes

  • Updated dependencies [3f4f546]:
    • @graphql-codegen/visitor-plugin-common@5.4.0

@graphql-codegen/typescript@4.1.0

Minor Changes

  • #10077 3f4f546 Thanks @eddeee888! - Extend config.avoidOptions to support query, mutation and subscription

    Previously, config.avoidOptions.resolvers was being used to make query, mutation and subscription fields non-optional.
    Now, config.avoidOptions.query, config.avoidOptions.mutation and config.avoidOptions.subscription can be used to target the respective types.

Patch Changes

  • Updated dependencies [3f4f546]:
    • @graphql-codegen/visitor-plugin-common@5.4.0

@graphql-codegen/client-preset@4.4.0

Minor Changes

  • #10073 8471a18 Thanks @n1ru4l! - Reduce noise of generated code by only generating code relevant to GraphQL operations.

Patch Changes

  • #10075 67e7556 Thanks @n1ru4l! - Add note about enabling bundle size reduction for the generated graphql tag file.

  • Updated dependencies [67e7556, 3f4f546]:

    • @graphql-codegen/gql-tag-operations@4.0.10
    • @graphql-codegen/visitor-plugin-common@5.4.0
    • @graphql-codegen/typescript-operations@4.3.0
    • @graphql-codegen/typescript@4.1.0
    • @graphql-codegen/typed-document-node@5.0.10

@graphql-codegen/graphql-modules-preset@4.0.10

Patch Changes

  • Updated dependencies [3f4f546]:
    • @graphql-codegen/visitor-plugin-common@5.4.0

@graphql-codegen/testing@3.0.4

Patch Changes

July 28, 2024

28 Jul 13:44
942c25d
Compare
Choose a tag to compare

@graphql-codegen/client-preset@4.3.3

Patch Changes

July 02, 2024

02 Jul 08:26
1691769
Compare
Choose a tag to compare

@graphql-codegen/visitor-plugin-common@5.3.1

Patch Changes

  • #10014 79fee3c Thanks @eddeee888! - Fix object types with fields being abstract types not pointing to resolver types correctly

@graphql-codegen/typescript-document-nodes@4.0.9

Patch Changes

  • Updated dependencies [79fee3c]:
    • @graphql-codegen/visitor-plugin-common@5.3.1

@graphql-codegen/gql-tag-operations@4.0.9

Patch Changes

  • Updated dependencies [79fee3c]:
    • @graphql-codegen/visitor-plugin-common@5.3.1

@graphql-codegen/typescript-operations@4.2.3

Patch Changes

  • Updated dependencies [79fee3c]:
    • @graphql-codegen/visitor-plugin-common@5.3.1
    • @graphql-codegen/typescript@4.0.9

@graphql-codegen/typescript-resolvers@4.2.1

Patch Changes

  • #10014 79fee3c Thanks @eddeee888! - Fix object types with fields being abstract types not pointing to resolver types correctly

  • Updated dependencies [79fee3c]:

    • @graphql-codegen/visitor-plugin-common@5.3.1
    • @graphql-codegen/typescript@4.0.9

@graphql-codegen/typed-document-node@5.0.9

Patch Changes

  • Updated dependencies [79fee3c]:
    • @graphql-codegen/visitor-plugin-common@5.3.1

@graphql-codegen/typescript@4.0.9

Patch Changes

  • Updated dependencies [79fee3c]:
    • @graphql-codegen/visitor-plugin-common@5.3.1

@graphql-codegen/client-preset@4.3.2

Patch Changes

  • Updated dependencies [79fee3c]:
    • @graphql-codegen/visitor-plugin-common@5.3.1
    • @graphql-codegen/gql-tag-operations@4.0.9
    • @graphql-codegen/typescript-operations@4.2.3
    • @graphql-codegen/typed-document-node@5.0.9
    • @graphql-codegen/typescript@4.0.9

@graphql-codegen/graphql-modules-preset@4.0.9

Patch Changes

  • Updated dependencies [79fee3c]:
    • @graphql-codegen/visitor-plugin-common@5.3.1

June 30, 2024

30 Jun 06:21
673857c
Compare
Choose a tag to compare

@graphql-codegen/schema-ast@4.1.0

Minor Changes

June 28, 2024

28 Jun 07:56
61b6a94
Compare
Choose a tag to compare

@graphql-codegen/visitor-plugin-common@5.3.0

Minor Changes

Patch Changes

  • #10019 14ce39e Thanks @vhfmag! - Improve code generation performance by computing ClientSideBaseVisitor's fragmentsGraph once at instantiation time.

@graphql-codegen/typescript-document-nodes@4.0.8

Patch Changes

  • Updated dependencies [808ada5, 14ce39e]:
    • @graphql-codegen/visitor-plugin-common@5.3.0

@graphql-codegen/gql-tag-operations@4.0.8

Patch Changes

  • Updated dependencies [808ada5, 14ce39e]:
    • @graphql-codegen/visitor-plugin-common@5.3.0

@graphql-codegen/typescript-operations@4.2.2

Patch Changes

  • Updated dependencies [808ada5, 14ce39e]:
    • @graphql-codegen/visitor-plugin-common@5.3.0
    • @graphql-codegen/typescript@4.0.8

@graphql-codegen/typescript-resolvers@4.2.0

Minor Changes

Patch Changes

  • Updated dependencies [808ada5, 14ce39e]:
    • @graphql-codegen/visitor-plugin-common@5.3.0
    • @graphql-codegen/typescript@4.0.8

@graphql-codegen/typed-document-node@5.0.8

Patch Changes

  • Updated dependencies [808ada5, 14ce39e]:
    • @graphql-codegen/visitor-plugin-common@5.3.0

@graphql-codegen/typescript@4.0.8

Patch Changes

  • Updated dependencies [808ada5, 14ce39e]:
    • @graphql-codegen/visitor-plugin-common@5.3.0

@graphql-codegen/client-preset@4.3.1

Patch Changes

  • Updated dependencies [808ada5, 14ce39e]:
    • @graphql-codegen/visitor-plugin-common@5.3.0
    • @graphql-codegen/gql-tag-operations@4.0.8
    • @graphql-codegen/typescript-operations@4.2.2
    • @graphql-codegen/typed-document-node@5.0.8
    • @graphql-codegen/typescript@4.0.8

@graphql-codegen/graphql-modules-preset@4.0.8

Patch Changes

  • Updated dependencies [808ada5, 14ce39e]:
    • @graphql-codegen/visitor-plugin-common@5.3.0

June 13, 2024

13 Jun 10:03
cac19e5
Compare
Choose a tag to compare

@graphql-codegen/add@5.0.3

Patch Changes

  • #9987 5501c62 Thanks @taro-28! - Export configuration types (e.g. AddPluginConfig) from the entry point.

    import type { AddPluginConfig } from '@graphql-codegen/add';

@graphql-codegen/client-preset@4.3.0

Minor Changes

  • #10001 1be6e65 Thanks @n1ru4l! - Support discriminating null and undefined within the useFragment function.

    function MyComponent(props: FragmentType<typeof MyFragment> | null) {
      const data = useFragment(MyFragment, props);
      // data is `MyFragment | null`
    }
    
    function MyComponent(props: FragmentType<typeof MyFragment> | undefined) {
      const data = useFragment(MyFragment, props);
      // data is `MyFragment | undefined`
    }

    Before, the returned type from useFragment was always TType | null | undefined.

  • #9804 5e594ef Thanks @rachel-church! - Preserving Array<T> or ReadonlyArray<T> in useFragment() return type.

Patch Changes

  • #9996 99f449c Thanks @nahn20! - Added configuration to allow for custom hash functions for persisted documents in the client preset

    Example

    import { type CodegenConfig } from '@graphql-codegen/cli';
    
    const config: CodegenConfig = {
      schema: 'schema.graphql',
      documents: ['src/**/*.tsx'],
      generates: {
        './src/gql/': {
          preset: 'client',
          presetConfig: {
            persistedDocuments: {
              hashAlgorithm: operation => {
                const shasum = crypto.createHash('sha512');
                shasum.update(operation);
                return shasum.digest('hex');
              },
            },
          },
        },
      },
    };
  • Updated dependencies [5501c62]:

    • @graphql-codegen/add@5.0.3

May 17, 2024

17 May 10:27
21fbf0d
Compare
Choose a tag to compare

@graphql-codegen/visitor-plugin-common@5.2.0

Minor Changes

  • #9961 dfc5310 Thanks @eddeee888! - Update typescript-resolvers to report generated resolver types in the run to meta field in the output

Patch Changes

  • #9944 156cc2b Thanks @eddeee888! - Add _ prefix to generated RefType in ResolversInterfaceTypes and ResolversUnionTypes as it is sometimes unused

  • #9962 b49457b Thanks @eddeee888! - Fix interface mappers not working in nested/self-referencing scenarios

  • Updated dependencies [dfc5310]:

    • @graphql-codegen/plugin-helpers@5.0.4

@graphql-codegen/typescript-document-nodes@4.0.7

Patch Changes

  • Updated dependencies [dfc5310, 156cc2b, dfc5310, b49457b]:
    • @graphql-codegen/plugin-helpers@5.0.4
    • @graphql-codegen/visitor-plugin-common@5.2.0

@graphql-codegen/gql-tag-operations@4.0.7

Patch Changes

  • Updated dependencies [dfc5310, 156cc2b, dfc5310, b49457b]:
    • @graphql-codegen/plugin-helpers@5.0.4
    • @graphql-codegen/visitor-plugin-common@5.2.0

@graphql-codegen/typescript-operations@4.2.1

Patch Changes

  • Updated dependencies [dfc5310, 156cc2b, dfc5310, b49457b]:
    • @graphql-codegen/plugin-helpers@5.0.4
    • @graphql-codegen/visitor-plugin-common@5.2.0
    • @graphql-codegen/typescript@4.0.7

@graphql-codegen/typescript-resolvers@4.1.0

Minor Changes

  • #9961 dfc5310 Thanks @eddeee888! - Update typescript-resolvers to report generated resolver types in the run to meta field in the output

Patch Changes

  • #9944 156cc2b Thanks @eddeee888! - Add _ prefix to generated RefType in ResolversInterfaceTypes and ResolversUnionTypes as it is sometimes unused

  • #9962 b49457b Thanks @eddeee888! - Fix interface mappers not working in nested/self-referencing scenarios

  • Updated dependencies [dfc5310, 156cc2b, dfc5310, b49457b]:

    • @graphql-codegen/plugin-helpers@5.0.4
    • @graphql-codegen/visitor-plugin-common@5.2.0
    • @graphql-codegen/typescript@4.0.7

@graphql-codegen/typed-document-node@5.0.7

Patch Changes

  • Updated dependencies [dfc5310, 156cc2b, dfc5310, b49457b]:
    • @graphql-codegen/plugin-helpers@5.0.4
    • @graphql-codegen/visitor-plugin-common@5.2.0

@graphql-codegen/typescript@4.0.7

Patch Changes

  • Updated dependencies [dfc5310, 156cc2b, dfc5310, b49457b]:
    • @graphql-codegen/plugin-helpers@5.0.4
    • @graphql-codegen/visitor-plugin-common@5.2.0

@graphql-codegen/client-preset@4.2.6

Patch Changes

  • Updated dependencies [dfc5310, 156cc2b, dfc5310, b49457b]:
    • @graphql-codegen/plugin-helpers@5.0.4
    • @graphql-codegen/visitor-plugin-common@5.2.0
    • @graphql-codegen/gql-tag-operations@4.0.7
    • @graphql-codegen/typescript-operations@4.2.1
    • @graphql-codegen/typed-document-node@5.0.7
    • @graphql-codegen/typescript@4.0.7

@graphql-codegen/graphql-modules-preset@4.0.7

Patch Changes

  • Updated dependencies [dfc5310, 156cc2b, dfc5310, b49457b]:
    • @graphql-codegen/plugin-helpers@5.0.4
    • @graphql-codegen/visitor-plugin-common@5.2.0

@graphql-codegen/plugin-helpers@5.0.4

Patch Changes

March 27, 2024

27 Mar 11:16
c693722
Compare
Choose a tag to compare

@graphql-codegen/time@5.0.1

Patch Changes

@graphql-codegen/client-preset@4.2.5

Patch Changes