github dotansimha/graphql-code-generator release-1690276829878
July 25, 2023

latest releases: release-1732308151614, @graphql-codegen/visitor-plugin-common@5.6.0, @graphql-codegen/typescript@4.1.2...
16 months ago

@graphql-codegen/cli@5.0.0

Major Changes

Patch Changes

@graphql-codegen/client-preset@4.1.0

Minor Changes

  • #9562 5beee9794 Thanks @n1ru4l! - Add the addTypenameSelectionDocumentTransform for automatically adding __typename selections to all objct type selection sets.

    This is useful for GraphQL Clients such as Apollo Client or urql that need typename information for their cache to function.

    Example Usage

    import { addTypenameSelectionDocumentTransform } from '@graphql-codegen/client-preset';
    import { CodegenConfig } from "@graphql-codegen/cli";
    
    const config: CodegenConfig = {
      schema: "YOUR_GRAPHQL_ENDPOINT",
      documents: ["./**/*.{ts,tsx}"],
      ignoreNoDocuments: true,
      generates: {
        "./gql/": {
          preset: "client",
          plugins: [],
          presetConfig: {
            persistedDocuments: true,
          },
          documentTransforms: [addTypenameSelectionDocumentTransform],
        },
      },
    };
    
    export default config;
    

Patch Changes

  • Updated dependencies [bb1e0e96e]:
    • @graphql-codegen/plugin-helpers@5.0.1

@graphql-codegen/plugin-helpers@5.0.1

Patch Changes

Don't miss a new graphql-code-generator release

NewReleases is sending notifications on new releases.