Skip to content

Commit

Permalink
Sdk-gen duplicated fragments bugfix (#33)
Browse files Browse the repository at this point in the history
* update codegen config

* Create duplicated-fragments.md
  • Loading branch information
Joaquín R. Montes authored Nov 3, 2022
1 parent 2d371f2 commit 75198f9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .changeset/duplicated-fragments.md
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions packages/sdk-gen/src/generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export async function main(args: Args) {
"typescript-generic-sdk",
],
config: {
dedupeFragments: true,
useTypeImports: true,
documentMode: "string",
},
Expand Down

1 comment on commit 75198f9

@vercel
Copy link

@vercel vercel bot commented on 75198f9 Nov 3, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.