diff --git a/.changeset/duplicated-fragments.md b/.changeset/duplicated-fragments.md new file mode 100644 index 0000000..0fdbec7 --- /dev/null +++ b/.changeset/duplicated-fragments.md @@ -0,0 +1,7 @@ +--- +"@bsmnt/sdk-gen": patch +--- + + * Add `dedupeFragments` to codegen config. *It cleans the generated schema to avoid recurrent references to the same fragment in one query.* + + > Issue related: https://github.com/dotansimha/graphql-code-generator/issues/3063 diff --git a/packages/sdk-gen/src/generate.ts b/packages/sdk-gen/src/generate.ts index 5a15e8c..93c24d6 100644 --- a/packages/sdk-gen/src/generate.ts +++ b/packages/sdk-gen/src/generate.ts @@ -43,6 +43,7 @@ export async function main(args: Args) { "typescript-generic-sdk", ], config: { + dedupeFragments: true, useTypeImports: true, documentMode: "string", },