July 25, 2023
·
311 commits
to master
since this release
@graphql-codegen/[email protected]
Major Changes
Patch Changes
-
#9513
fdd19d24d
Thanks @cichelero! - Update yaml dependency to 2.3.1 -
Updated dependencies [
bb1e0e96e
]:- @graphql-codegen/[email protected]
@graphql-codegen/[email protected]
Minor Changes
-
#9562
5beee9794
Thanks @n1ru4l! - Add theaddTypenameSelectionDocumentTransform
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/[email protected]