On this page

@graphql-codegen/typescript-operations

Changelog for @graphql-codegen/typescript-operations: every release with its changes and the pull requests behind them.

6.1.6

Patch Changes

  • #10918 6a3b734 Thanks @eddeee888! - Fix union and conditional directives resulting in no field types

  • Updated dependencies [6a3b734]:

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

6.1.5

Patch Changes

  • #10909 b36c084 Thanks @jaydenseric! - Added missing types and tests for the TypeScript operations plugin option disableDescriptions.

6.1.4

Patch Changes

  • #10910 1624c8a Thanks @eddeee888! - Fix performance issue when config.importSchemaTypesFrom is set, and the provided schema is still unnecessarily visited

6.1.3

Patch Changes

  • #10905 5a9f96c Thanks @eddeee888! - Fix types when introspection is used and values are not generated or imported correctly

  • Updated dependencies [2dd1531]:

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

6.1.2

Patch Changes

  • #10899 e7a1451 Thanks @eddeee888! - Fix conditional directive (@skip and @include) incorrectly drop fields in Result when used on Inline Fragment / Fragment Spread
  • Updated dependencies [206a409, e7a1451]:
    • @graphql-codegen/visitor-plugin-common@7.2.2

6.1.1

Patch Changes

  • #10897 bd689bb Thanks @eddeee888! - Fix issues when extractAllFieldsToTypes=true and @defer are used, then duplicate types may be generated
  • Updated dependencies [bd689bb]:
    • @graphql-codegen/visitor-plugin-common@7.2.1

6.1.0

Minor Changes

Patch Changes

  • Updated dependencies [959915f, 959915f, 959915f]:
    • @graphql-codegen/plugin-helpers@7.1.0
    • @graphql-codegen/schema-ast@6.1.0
    • @graphql-codegen/visitor-plugin-common@7.2.0

6.0.5

Patch Changes

  • #10839 8a65a1b Thanks @vkbansal-rubrik! - handles conditional spread of a fragment whose top-level selections are fragment spreads or contain inline fragments
  • Updated dependencies [8a65a1b]:
    • @graphql-codegen/visitor-plugin-common@7.1.2

6.0.4

Patch Changes

6.0.3

Patch Changes

6.0.2

Patch Changes

6.0.1

Patch Changes

  • #10781 5f035cb Thanks @eddeee888! - Fix const enum applying typesPrefix and typesSuffix incorrectly

  • Updated dependencies [5f035cb]:

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

6.0.0

Major Changes

  • #10496 afaace6 Thanks @eddeee888! - Fix nullable field optionality in operations

    Previously, a nullable Result field is generated as optional (marked by ? TypeScript modifier) by default. This is not correct, because generally at runtime such field can only be null, and not undefined (both missing from the object OR undefined). The only exceptions are when fields are deferred (using @defer directive) or marked as conditional (using @skip or @include).

    Now, a nullable Result field cannot be optional unless the exceptions are met. This also limits avoidOptionals to only target Variables input, since some users may want to force explicit null when providing operation variables.

  • #10496 afaace6 Thanks @eddeee888! - BREAKING CHANGE: visitors’ config option are moved based on their use case

    • addTypename/skipTypename: is only a types-visitor concern. This is moved to types-visitor from base-visitor
    • nonOptionalTypename: is a documents-visitor and types-visitor concern. Moved from base-visitor there
    • extractAllFieldsToTypes: is a documents-visitor concern. Moved from base-visitor there
    • enumPrefix and enumSuffix: need to be in base-visitor as all 3 types of visitors need this to correctly sync the enum type names. This is moved to base visitor
    • ignoreEnumValuesFromSchema: is a documents-visitor and types-visitor concern. Moved from base-visitor there.
    • globalNamespace: is a documents-visitor concern. Moved from base-visitor there

    Refactors

    • documents-visitor no longer extends types-visitor option types as they have two distinct usages now. The types now extend base-visitor types. This is now consistent with documents-visitor extending base-visitor
    • Classes now handle config parsing and types at the same level e.g. if typescript-operations plugin parses configOne, then the types for configOne must be in that class, rather than in base-documents-visitor

    Note: These visitors are rolled up into one type for simplicity

    • base-visitor: includes base-visitor
    • documents-visitor: includes base-documents-visitor and typescript-operations visitor
    • types-visitor: includes base-types-visitor and typescript visitor
    • resolvers-visitor: includes base-resolvers-visitor and typescript-resolvers visitor
  • #10496 afaace6 Thanks @eddeee888! - BREAKING CHANGE: typescript-operations plugin now generates enum if it is used in operation.

  • #10496 afaace6 Thanks @eddeee888! - Conditionally generate input types and output enums into target file

  • #10496 afaace6 Thanks @eddeee888! - BREAKING CHANGE: make unknown instead of any the default custom scalar type

  • #10496 afaace6 Thanks @eddeee888! - BREAKING CHANGE: Update deps to latest, some only support ESM

    Node 20 support is dropped in this release. Node 22 comes with require() support for ESM, which means it’s easier to integrate ES modules into applications. Therefore, it is safe to start using ESM-only packages.

    If you are a user, please upgrade to Node 22. If you are a lib maintainer and see ESM vs CJS issues when running Jest tests, try using Vitest.

  • #10496 afaace6 Thanks @eddeee888! - BREAKING CHANGE: Drop Node 20 support

  • #10496 afaace6 Thanks @eddeee888! - BREAKING CHANGE: Decouple typescript-operations plugin from typescript plugin

    Previously, TypeScriptOperationVariablesToObject from typescript-operations was extending from typescript plugin. This made it (1) very hard to read, as we need to jump from base class <-> typescript class <-> typescript-operations class to understand the flow and (2) very hard to evolve the two independently (which is the point of this work).

    Since there’s not much shared logic anyways, it’s simpler to extend the typescript-operations class from the base class directly.

  • #10496 afaace6 Thanks @eddeee888! - The typescript-operations plugin no longer generates InputMaybe and Scalars types; it now uses native Typescript types instead.

  • #10496 afaace6 Thanks @eddeee888! - BREAKING CHANGE: typescript plugin no longer generates Exact utility type. Instead, typescript-operations generates said utility type for every file it creates. This is because it is used only for Variables, so we only need to generate it once for every generated operation file.

  • #10496 afaace6 Thanks @eddeee888! - BREAKING CHANGE: Operation plugin and Client Preset no longer generates optional __typename for result type

    __typenam should not be in the request unless:

    • explicitly requested by the user
    • automatically injected into the request by clients, such as Apollo Clients.

    Note: Apollo Client users can still use nonOptionalTypename: true and skipTypeNameForRoot: true to ensure generated types match the runtime behaviour.

  • #10496 afaace6 Thanks @eddeee888! - Integrate new typescript-operations into client-preset

  • #10496 afaace6 Thanks @eddeee888! - BREAKING CHANGE: config.avoidOptionals now only supports object, inputValue, defaultValue

  • #10496 afaace6 Thanks @eddeee888! - BREAKING CHANGE: rename avoidOptionals.object to avoidOptionals.variableValue

Minor Changes

  • #10496 afaace6 Thanks @eddeee888! - Add support for declarationKind for typescript-operations

    • Input: can only be type or interface
    • Variables: no support. It must always be type because it’s an alias e.g. Variables = Exact<{ something: type }>
    • Result: can only be type or interface
      • Note: when extractAllFieldsToTypes:true or extractAllFieldsToTypesCompact:true, Results are used as type alias, so they are forced to be type. There is a console warning for users.
  • #10496 afaace6 Thanks @eddeee888! - Add importSchemaTypesFrom support

  • #10496 afaace6 Thanks @eddeee888! - Add generateOperationTypes to typescript-operations to allow omitting operation types such as Variables, Query/Mutation/Subscription selection set, and Fragment types

  • #10496 afaace6 Thanks @eddeee888! - Fixing 2 bugs: 1) including enums from external fragments; 2) extractAllFieldsToTypesCompact does not create duplicates

Patch Changes

5.1.0

Minor Changes

  • #10659 e65d303 Thanks @ikusakov2! - Add support for externalDocuments

    externalDocuments declares GraphQL documents that will be read but will not have type files generated for them. These documents are available to plugins for type resolution (e.g. fragment types), but no output files will be generated based on them. Accepts the same formats as documents.

    This config option is useful for monorepos where each project may want to generate types for its own documents, but some may need to read shared fragments from across projects.

Patch Changes

5.0.9

Patch Changes

5.0.8

Patch Changes

  • #10580 6038634 Thanks @Georgegriff! - fixed invalid extracted concrete type name on shared interface

  • Updated dependencies [6038634]:

    • @graphql-codegen/visitor-plugin-common@6.2.3
    • @graphql-codegen/typescript@5.0.8

5.0.7

Patch Changes

  • Updated dependencies [f588d91]:
    • @graphql-codegen/visitor-plugin-common@6.2.2
    • @graphql-codegen/typescript@5.0.7

5.0.6

Patch Changes

  • Updated dependencies [b995ed1]:
    • @graphql-codegen/visitor-plugin-common@6.2.1
    • @graphql-codegen/typescript@5.0.6

5.0.5

Patch Changes

  • Updated dependencies [f821e8a, 9e70bcb]:
    • @graphql-codegen/visitor-plugin-common@6.2.0
    • @graphql-codegen/plugin-helpers@6.1.0
    • @graphql-codegen/typescript@5.0.5

5.0.4

Patch Changes

  • Updated dependencies [51a1a72]:
    • @graphql-codegen/visitor-plugin-common@6.1.2
    • @graphql-codegen/typescript@5.0.4

5.0.3

Patch Changes

  • Updated dependencies [6715330]:
    • @graphql-codegen/visitor-plugin-common@6.1.1
    • @graphql-codegen/typescript@5.0.3

5.0.2

Patch Changes

  • Updated dependencies [8258f1f]:
    • @graphql-codegen/visitor-plugin-common@6.1.0
    • @graphql-codegen/typescript@5.0.2

5.0.1

Patch Changes

  • Updated dependencies [accdab6]:
    • @graphql-codegen/visitor-plugin-common@6.0.1
    • @graphql-codegen/typescript@5.0.1

5.0.0

Major Changes

Patch Changes

4.6.1

Patch Changes

4.6.0

Minor Changes

Patch Changes

  • Updated dependencies [f6909d1]:
    • @graphql-codegen/visitor-plugin-common@5.8.0
    • @graphql-codegen/typescript@4.1.6

4.5.1

Patch Changes

  • #10302 d8566c0 Thanks @eddeee888! - Fix Apollo unmask directive incorrectly generating fragmentRefs

  • Updated dependencies [d8566c0]:

    • @graphql-codegen/visitor-plugin-common@5.7.1
    • @graphql-codegen/typescript@4.1.5

4.5.0

Minor Changes

Patch Changes

  • Updated dependencies [6d7c1d7]:
    • @graphql-codegen/visitor-plugin-common@5.7.0
    • @graphql-codegen/typescript@4.1.4

4.4.1

Patch Changes

  • Updated dependencies [60dd72f]:
    • @graphql-codegen/visitor-plugin-common@5.6.1
    • @graphql-codegen/typescript@4.1.3

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

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

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

4.2.3

Patch Changes

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

4.2.2

Patch Changes

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

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

4.2.0

Minor Changes

Patch Changes

  • #9842 ed9c205 Thanks @henryqdineen! - properly handle aliased conditionals

  • Updated dependencies [920b443, ed9c205]:

    • @graphql-codegen/visitor-plugin-common@5.1.0
    • @graphql-codegen/typescript@4.0.6

4.1.3

Patch Changes

  • Updated dependencies [53f270a]:
    • @graphql-codegen/visitor-plugin-common@5.0.0
    • @graphql-codegen/typescript@4.0.5

4.1.2

Patch Changes

  • #9813 4e69568 Thanks @saihaj! - bumping for a release

  • Updated dependencies [4e69568]:

    • @graphql-codegen/visitor-plugin-common@4.1.2
    • @graphql-codegen/typescript@4.0.4
    • @graphql-codegen/plugin-helpers@5.0.3

4.1.1

Patch Changes

  • Updated dependencies [7718a8113]:
    • @graphql-codegen/visitor-plugin-common@4.1.1
    • @graphql-codegen/typescript@4.0.3

4.1.0

Minor Changes

  • #9811 d8364e045 Thanks @saihaj! - fix: out-of-memory crash (fixes #7720) perf: implement a caching mechanism that makes sure the type originating at the same location is never generated twice, as long as the combination of selected fields and possible types matches feat: implement extractAllFieldsToTypes: boolean feat: implement printFieldsOnNewLines: boolean

Patch Changes

4.0.1

Patch Changes

  • #9497 2276708d0 Thanks @eddeee888! - Revert default ID scalar input type to string

    We changed the ID Scalar input type from string to string | number in the latest major version of typescript plugin. This causes issues for server plugins (e.g. typescript-resolvers) that depends on typescript plugin. This is because the scalar type needs to be manually inverted on setup which is confusing.

  • Updated dependencies [2276708d0]:

    • @graphql-codegen/visitor-plugin-common@4.0.1
    • @graphql-codegen/typescript@4.0.1

4.0.0

Major Changes

  • #9375 ba84a3a27 Thanks @eddeee888! - Implement Scalars with input/output types

    In GraphQL, Scalar types can be different for client and server. For example, given the native GraphQL ID:

    • A client may send string or number in the input
    • A client receives string in its selection set (i.e output)
    • A server receives string in the resolver (GraphQL parses string or number received from the client to string)
    • A server may return string or number (GraphQL serializes the value to string before sending it to the client )

    Currently, we represent every Scalar with only one type. This is what codegen generates as base type:

    export type Scalars = {
      ID: string
    }

    Then, this is used in both input and output type e.g.

    export type Book = {
      __typename?: 'Book'
      id: Scalars['ID'] // Output's ID can be `string` 👍
    }
    
    export type QueryBookArgs = {
      id: Scalars['ID'] // Input's ID can be `string` or `number`. However, the type is only `string` here 👎
    }

    This PR extends each Scalar to have input and output:

    export type Scalars = {
      ID: {
        input: string | number
        output: string
      }
    }

    Then, each input/output GraphQL type can correctly refer to the correct input/output scalar type:

    export type Book = {
      __typename?: 'Book'
      id: Scalars['ID']['output'] // Output's ID can be `string` 👍
    }
    
    export type QueryBookArgs = {
      id: Scalars['ID']['input'] // Input's ID can be `string` or `number` 👍
    }

    Note that for typescript-resolvers, the type of ID needs to be inverted. However, the referenced types in GraphQL input/output types should still work correctly:

    export type Scalars = {
      ID: {
        input: string;
        output: string | number;
      }
    }
    
    export type Book = {
      __typename?: "Book";
      id: Scalars["ID"]['output']; // Resolvers can return `string` or `number` in ID fields 👍
    };
    
    export type QueryBookArgs = {
      id: Scalars["ID"]['input']; // Resolvers receive `string` in ID fields 👍
    };
    
    export type ResolversTypes = {
      ID: ID: ResolverTypeWrapper<Scalars['ID']['output']>; // Resolvers can return `string` or `number` in ID fields 👍
    }
    
    export type ResolversParentTypes = {
      ID: Scalars['ID']['output']; // Resolvers receive `string` or `number` from parents 👍
    };

    Config changes:

    1. Scalars option can now take input/output types:
    config: {
      scalars: {
        ID: {
          input: 'string',
          output: 'string | number'
        }
      }
    }
    1. If a string is given (instead of an object with input/output fields), it will be used as both input and output types:
    config: {
      scalars: {
        ID: 'string' // This means `string` will be used for both ID's input and output types
      }
    }
    1. BREAKING CHANGE: External module Scalar types need to be an object with input/output fields
    config: {
      scalars: {
        ID: './path/to/scalar-module'
      }
    }

    If correctly, wired up, the following will be generated:

    // Previously, imported `ID` type can be a primitive type, now it must be an object with input/output fields
    import { ID } from './path/to/scalar-module'
    
    export type Scalars = {
      ID: { input: ID['input']; output: ID['output'] }
    }

    BREAKING CHANGE: This changes Scalar types which could be referenced in other plugins. If you are a plugin maintainer and reference Scalar, please update your plugin to use the correct input/output types.

  • bb66c2a31 Thanks @n1ru4l! - Require Node.js >= 16. Drop support for Node.js 14

Minor Changes

  • #9196 3848a2b73 Thanks @beerose! - Add @defer directive support

    When a query includes a deferred fragment field, the server will return a partial response with the non-deferred fields first, followed by the remaining fields once they have been resolved.

    Once start using the @defer directive in your queries, the generated code will automatically include support for the directive.

    // src/index.tsx
    import { graphql } from './gql'
    
    const OrdersFragment = graphql(`
      fragment OrdersFragment on User {
        orders {
          id
          total
        }
      }
    `)
    const GetUserQuery = graphql(`
      query GetUser($id: ID!) {
        user(id: $id) {
          id
          name
          ...OrdersFragment @defer
        }
      }
    `)

    The generated type for GetUserQuery will have information that the fragment is incremental, meaning it may not be available right away.

    // gql/graphql.ts
    export type GetUserQuery = { __typename?: 'Query'; id: string; name: string } & ({
      __typename?: 'Query'
    } & {
      ' $fragmentRefs'?: { OrdersFragment: Incremental<OrdersFragment> }
    })

    Apart from generating code that includes support for the @defer directive, the Codegen also exports a utility function called isFragmentReady. You can use it to conditionally render components based on whether the data for a deferred fragment is available:

    const OrdersList = (props: { data: FragmentType<typeof OrdersFragment> }) => {
      const data = useFragment(OrdersFragment, props.data);
      return (
        // render orders list
      )
    };
    
    function App() {
      const { data } = useQuery(GetUserQuery);
      return (
        {data && (
          <>
            {isFragmentReady(GetUserQuery, OrdersFragment, data)
    					&& <OrdersList data={data} />}
          </>
        )}
      );
    }
    export default App;
  • #9304 e1dc75f3c Thanks @esfomeado! - Added support for disabling suffixes on Enums.

Patch Changes

3.0.4

Patch Changes

  • Updated dependencies [386cf9044, 402cb8ac0]:
    • @graphql-codegen/visitor-plugin-common@3.1.1
    • @graphql-codegen/typescript@3.0.4

3.0.3

Patch Changes

3.0.2

Patch Changes

  • Updated dependencies [ba0610bbd, 4b49f6fbe, b343626c9]:
    • @graphql-codegen/visitor-plugin-common@3.0.2
    • @graphql-codegen/typescript@3.0.2

3.0.1

Patch Changes

3.0.0

Major Changes

Patch Changes

  • Updated dependencies [fc79b65d4, fd0b0c813]:
    • @graphql-codegen/visitor-plugin-common@3.0.0
    • @graphql-codegen/plugin-helpers@4.0.0
    • @graphql-codegen/typescript@3.0.0

2.5.13

Patch Changes

  • Updated dependencies [a98198524]:
    • @graphql-codegen/visitor-plugin-common@2.13.8
    • @graphql-codegen/typescript@2.8.8

2.5.12

Patch Changes

  • Updated dependencies [eb454d06c]:
    • @graphql-codegen/visitor-plugin-common@2.13.7
    • @graphql-codegen/typescript@2.8.7

2.5.11

Patch Changes

  • Updated dependencies [ed87c782b, ed87c782b, 6c6b6f2df]:
    • @graphql-codegen/plugin-helpers@3.1.2
    • @graphql-codegen/visitor-plugin-common@2.13.6
    • @graphql-codegen/typescript@2.8.6

2.5.10

Patch Changes

  • 46f75304a Thanks @saihaj! - fix the version of @graphql-codegen/plugin-helpers@3.1.1

  • Updated dependencies [307a5d350, 46f75304a]:

    • @graphql-codegen/plugin-helpers@3.1.1
    • @graphql-codegen/visitor-plugin-common@2.13.5
    • @graphql-codegen/typescript@2.8.5

2.5.9

Patch Changes

  • Updated dependencies [a6c2097f4, a6c2097f4, f79a00e8a, c802a0c0b]:
    • @graphql-codegen/plugin-helpers@3.0.0
    • @graphql-codegen/visitor-plugin-common@2.13.4
    • @graphql-codegen/typescript@2.8.4

2.5.8

Patch Changes

  • #8664 62f655452 Thanks @jdmoody! - Fix issue where selection set flattening uses the wrong parent type

  • Updated dependencies [62f655452]:

    • @graphql-codegen/visitor-plugin-common@2.13.3
    • @graphql-codegen/typescript@2.8.3

2.5.7

Patch Changes

  • Updated dependencies [ef4c2c9c2]:
    • @graphql-codegen/visitor-plugin-common@2.13.2
    • @graphql-codegen/typescript@2.8.2

2.5.6

Patch Changes

  • Updated dependencies [63dc8f205]:
    • @graphql-codegen/visitor-plugin-common@2.13.1
    • @graphql-codegen/plugin-helpers@2.7.2
    • @graphql-codegen/typescript@2.8.1

2.5.5

Patch Changes

  • Updated dependencies [a46b8d99c]:
    • @graphql-codegen/visitor-plugin-common@2.13.0
    • @graphql-codegen/typescript@2.7.5

2.5.4

Patch Changes

  • Updated dependencies [1bd7f771c]:
    • @graphql-codegen/visitor-plugin-common@2.12.2
    • @graphql-codegen/typescript@2.7.4

2.5.3

Patch Changes

  • #8189 b408f8238 Thanks @n1ru4l! - Fix CommonJS TypeScript resolution with moduleResolution node16 or nodenext

  • Updated dependencies [b408f8238, 47d0a57e2]:

    • @graphql-codegen/visitor-plugin-common@2.12.1
    • @graphql-codegen/typescript@2.7.3
    • @graphql-codegen/plugin-helpers@2.6.2

2.5.2

Patch Changes

  • Updated dependencies [2cbcbb371]
    • @graphql-codegen/visitor-plugin-common@2.12.0
    • @graphql-codegen/plugin-helpers@2.6.0
    • @graphql-codegen/typescript@2.7.2

2.5.1

Patch Changes

  • Updated dependencies [525ad580b]
    • @graphql-codegen/visitor-plugin-common@2.11.1
    • @graphql-codegen/typescript@2.7.1

2.5.0

Minor Changes

Patch Changes

  • Updated dependencies [68bb30e19]
  • Updated dependencies [d84afec09]
  • Updated dependencies [a4fe5006b]
  • Updated dependencies [8e44df58b]
    • @graphql-codegen/visitor-plugin-common@2.11.0
    • @graphql-codegen/typescript@2.7.0
    • @graphql-codegen/plugin-helpers@2.5.0

2.4.3

Patch Changes

  • Updated dependencies [aa1e6eafd]
  • Updated dependencies [a42fcbfe4]
  • Updated dependencies [8b10f22be]
    • @graphql-codegen/typescript@2.6.0
    • @graphql-codegen/visitor-plugin-common@2.10.0

2.4.2

Patch Changes

  • Updated dependencies [d16bebacb]
    • @graphql-codegen/visitor-plugin-common@2.9.1
    • @graphql-codegen/typescript@2.5.1

2.4.1

Patch Changes

  • Updated dependencies [c3d7b7226]
    • @graphql-codegen/visitor-plugin-common@2.9.0
    • @graphql-codegen/typescript@2.5.0

2.4.0

Minor Changes

  • f1fb77bd4: feat: Add option to squash exactly similar fragment types

Patch Changes

  • Updated dependencies [f1fb77bd4]
    • @graphql-codegen/visitor-plugin-common@2.8.0
    • @graphql-codegen/typescript@2.4.11

2.3.7

Patch Changes

  • Updated dependencies [9a5f31cb6]
    • @graphql-codegen/typescript@2.4.10
    • @graphql-codegen/visitor-plugin-common@2.7.6

2.3.6

Patch Changes

  • 9312920a4: Import type definitions of dependent fragments when inlineFragmentType is mask
  • 2966686e9: Generate $fragmentName for fragment subtypes for fragment masking
  • Updated dependencies [2966686e9]
    • @graphql-codegen/visitor-plugin-common@2.7.5
    • @graphql-codegen/typescript@2.4.9

2.3.5

Patch Changes

  • Updated dependencies [337fd4f77]
    • @graphql-codegen/visitor-plugin-common@2.7.4
    • @graphql-codegen/typescript@2.4.8

2.3.4

Patch Changes

  • Updated dependencies [54718c039]
    • @graphql-codegen/typescript@2.4.7
    • @graphql-codegen/visitor-plugin-common@2.7.3

2.3.3

Patch Changes

  • Updated dependencies [11d05e361]
    • @graphql-codegen/visitor-plugin-common@2.7.2
    • @graphql-codegen/typescript@2.4.6

2.3.2

Patch Changes

  • fd55e2039: fix incorrect type generation when using the inlineFragmentTypes ‘combine’ option that resulted in generating masked fragment output.
  • Updated dependencies [fd55e2039]
    • @graphql-codegen/visitor-plugin-common@2.7.1
    • @graphql-codegen/typescript@2.4.5

2.3.1

Patch Changes

  • Updated dependencies [1479233df]
    • @graphql-codegen/visitor-plugin-common@2.7.0
    • @graphql-codegen/typescript@2.4.4

2.3.0

Minor Changes

  • 4d413b13a: feat: Support including fragments when using flattenGeneratedTypes in typescript-operations

2.2.4

Patch Changes

  • Updated dependencies [c8ef37ae0]
  • Updated dependencies [754a33715]
  • Updated dependencies [bef4376d5]
  • Updated dependencies [be7cb3a82]
    • @graphql-codegen/visitor-plugin-common@2.6.0
    • @graphql-codegen/plugin-helpers@2.4.0
    • @graphql-codegen/typescript@2.4.3

2.2.3

Patch Changes

  • 7649201fe: Remove redundant mandatory ‘undefined’ on avoidOptionals=true

2.2.2

Patch Changes

  • 6002feb3d: Fix exports in package.json files for react-native projects
  • Updated dependencies [6002feb3d]
    • @graphql-codegen/visitor-plugin-common@2.5.2
    • @graphql-codegen/typescript@2.4.2
    • @graphql-codegen/plugin-helpers@2.3.2

2.2.1

Patch Changes

  • a9f1f1594: Use maybeValue as default output for optionals on preResolveTypes: true
  • Updated dependencies [a9f1f1594]
  • Updated dependencies [9ea6621ec]
    • @graphql-codegen/visitor-plugin-common@2.5.1
    • @graphql-codegen/typescript@2.4.1

2.2.0

Minor Changes

  • 97ddb487a: feat: GraphQL v16 compatibility

Patch Changes

  • Updated dependencies [97ddb487a]
    • @graphql-codegen/visitor-plugin-common@2.5.0
    • @graphql-codegen/typescript@2.3.0
    • @graphql-codegen/plugin-helpers@2.3.0

2.1.8

Patch Changes

  • 8a576b49a: avoidOptionals with skip/include directives fix
  • Updated dependencies [ad02cb9b8]
    • @graphql-codegen/visitor-plugin-common@2.4.0
    • @graphql-codegen/typescript@2.2.4

2.1.7

Patch Changes

  • 1d570b456: avoidOptionals sub-config fix
  • Updated dependencies [b9e85adae]
  • Updated dependencies [7c60e5acc]
  • Updated dependencies [3c2c847be]
    • @graphql-codegen/visitor-plugin-common@2.3.0
    • @graphql-codegen/plugin-helpers@2.2.0
    • @graphql-codegen/typescript@2.2.3

2.1.6

Patch Changes

  • 5c37b9d11: Fix avoidOptional handle of Maybe types

2.1.5

Patch Changes

  • 25cd11d01: correctly inline Maybe types if the preresolveTypes config option is set to true

2.1.4

Patch Changes

  • Updated dependencies [0b090e31a]
    • @graphql-codegen/visitor-plugin-common@2.2.1
    • @graphql-codegen/typescript@2.2.2

2.1.3

Patch Changes

  • Updated dependencies [d6c2d4c09]
  • Updated dependencies [feeae1c66]
  • Updated dependencies [8261e4161]
  • Updated dependencies [5086791ac]
    • @graphql-codegen/visitor-plugin-common@2.2.0
    • @graphql-codegen/typescript@2.2.0

2.1.2

Patch Changes

  • Updated dependencies [6470e6cc9]
  • Updated dependencies [263570e50]
  • Updated dependencies [35199dedf]
    • @graphql-codegen/visitor-plugin-common@2.1.2
    • @graphql-codegen/plugin-helpers@2.1.1
    • @graphql-codegen/typescript@2.1.2

2.1.1

Patch Changes

  • Updated dependencies [aabeff181]
    • @graphql-codegen/visitor-plugin-common@2.1.1
    • @graphql-codegen/typescript@2.1.1

2.1.0

Minor Changes

  • 440172cfe: support ESM

Patch Changes

  • Updated dependencies [290170262]
  • Updated dependencies [24185985a]
  • Updated dependencies [39773f59b]
  • Updated dependencies [440172cfe]
    • @graphql-codegen/visitor-plugin-common@2.1.0
    • @graphql-codegen/plugin-helpers@2.1.0
    • @graphql-codegen/typescript@2.1.0

2.0.1

Patch Changes

  • e8c8e9c06: Set preResolveTypes: true by default (should be there since v2)

2.0.0

Major Changes

  • d80efdec4: Change preResolveTypes default to be true for more readable types

  • b0cb13df4: Update to latest graphql-tools and graphql-config version.

    ‼️ ‼️ ‼️ Please note ‼️ ‼️ ‼️:

    This is a breaking change since Node 10 is no longer supported in graphql-tools, and also no longer supported for Codegen packages.

Patch Changes

  • d80efdec4: Add option inlineFragmentTypes for deep inlining fragment types within operation types. This inlineFragmentTypes is set to inline by default (Previous behaviour is combine).

    This behavior is the better default for users that only use Fragments for building operations and then want to have access to all the data via the operation type (instead of accessing slices of the data via fragments).

  • Updated dependencies [d80efdec4]

  • Updated dependencies [d80efdec4]

  • Updated dependencies [b0cb13df4]

    • @graphql-codegen/visitor-plugin-common@2.0.0
    • @graphql-codegen/typescript@2.0.0
    • @graphql-codegen/plugin-helpers@2.0.0

1.18.4

Patch Changes

  • Updated dependencies [df19a4ed]
  • Updated dependencies [470336a1]
  • Updated dependencies [9005cc17]
    • @graphql-codegen/visitor-plugin-common@1.22.0
    • @graphql-codegen/plugin-helpers@1.18.8
    • @graphql-codegen/typescript@1.23.0

1.18.3

Patch Changes

  • 6762aff5: Fix for array types with @skip @include directives
  • Updated dependencies [6762aff5]
    • @graphql-codegen/visitor-plugin-common@1.21.3
    • @graphql-codegen/typescript@1.22.4

1.18.2

Patch Changes

  • 6aaecf1c: Fix issues with missing sub-fragments when skipTypename: true
  • Updated dependencies [6aaecf1c]
    • @graphql-codegen/visitor-plugin-common@1.21.2
    • @graphql-codegen/typescript@1.22.3

1.18.1

Patch Changes

  • Updated dependencies [cf1e5abc]
    • @graphql-codegen/visitor-plugin-common@1.21.1
    • @graphql-codegen/typescript@1.22.2

1.18.0

Minor Changes

  • 0a909869: Add arrayInputCoercion option

Patch Changes

  • Updated dependencies [dfd25caf]
  • Updated dependencies [8da7dff6]
    • @graphql-codegen/visitor-plugin-common@1.21.0
    • @graphql-codegen/plugin-helpers@1.18.7
    • @graphql-codegen/typescript@1.22.1

1.17.16

Patch Changes

  • d9212aa0: fix(visitor-plugin-common): guard for a runtime type error
  • Updated dependencies [d9212aa0]
  • Updated dependencies [f0b5ea53]
  • Updated dependencies [097bea2f]
    • @graphql-codegen/visitor-plugin-common@1.20.0
    • @graphql-codegen/typescript@1.22.0
    • @graphql-codegen/plugin-helpers@1.18.5

1.17.15

Patch Changes

  • 1f6f3db6: Fix for @skip @include directives upon arrays
  • 29b75b1e: enhance(namingConvention): use change-case-all instead of individual packages for naming convention
  • Updated dependencies [e947f8e3]
  • Updated dependencies [29b75b1e]
  • Updated dependencies [d4942d04]
  • Updated dependencies [1f6f3db6]
  • Updated dependencies [29b75b1e]
    • @graphql-codegen/visitor-plugin-common@1.19.0
    • @graphql-codegen/typescript@1.21.1
    • @graphql-codegen/plugin-helpers@1.18.3

1.17.14

Patch Changes

  • 63be0f40: Fix issues with empty interfaces causing syntax issues
  • 190482a1: add support for fragment variables
  • 142b32b3: @skip, @include directives resolve to optional fields
  • 142b32b3: Better support for @skip/@include directives with complex selection sets
  • Updated dependencies [63be0f40]
  • Updated dependencies [190482a1]
  • Updated dependencies [4444348d]
  • Updated dependencies [142b32b3]
  • Updated dependencies [42213fa0]
    • @graphql-codegen/visitor-plugin-common@1.18.1
    • @graphql-codegen/typescript@1.20.1

1.17.13

Patch Changes

  • 64293437: Support for input lists coercion
  • Updated dependencies [64293437]
  • Updated dependencies [fd5843a7]
  • Updated dependencies [d75051f5]
    • @graphql-codegen/visitor-plugin-common@1.17.22

1.17.12

Patch Changes

  • 1183d173: Bump all packages to resolve issues with shared dependencies
  • Updated dependencies [1183d173]
    • @graphql-codegen/visitor-plugin-common@1.17.20
    • @graphql-codegen/typescript@1.18.1
    • @graphql-codegen/plugin-helpers@1.18.2

1.17.11

Patch Changes

  • 7587fda4: When using avoidOptionals config, @skip, @include resolve into MakeMaybe type
  • Updated dependencies [99819bf1]
  • Updated dependencies [49242c20]
  • Updated dependencies [c3b59e81]
    • @graphql-codegen/visitor-plugin-common@1.17.19
    • @graphql-codegen/typescript@1.18.0

1.17.10

Patch Changes

  • 475aa9b8: @skip, @include directives resolve to optional fields
  • Updated dependencies [faa13973]
    • @graphql-codegen/visitor-plugin-common@1.17.18

1.17.9

Patch Changes

  • 612e5e52: Remove broken isTypeOf call (always undefined in graphql-tools v6)
  • 0f35e775: Fixed issues with incorrect naming when typesSuffix is used
  • Updated dependencies [612e5e52]
  • Updated dependencies [9f2a4e2f]
  • Updated dependencies [0f35e775]
  • Updated dependencies [eaf45d1f]
    • @graphql-codegen/visitor-plugin-common@1.17.17
    • @graphql-codegen/plugin-helpers@1.18.1

1.17.8

Patch Changes

  • 1d7c6432: Bump all packages to allow ”^” in deps and fix compatibility issues
  • 1d7c6432: Bump versions of @graphql-tools/ packages to fix issues with loading schemas and SDL comments
  • Updated dependencies [1d7c6432]
  • Updated dependencies [1d7c6432]
    • @graphql-codegen/visitor-plugin-common@1.17.13
    • @graphql-codegen/plugin-helpers@1.17.8
    • @graphql-codegen/typescript@1.17.8