Clarity in Graphql Codegen
I am trying to generate the typescript types using graphql-codegen cli. as of now every request is fully written. i want to make the repeated subfields as fragments and use them here. but when i do that, the typing is not working properly. Can you please tell what i can do regarding this.
3 Replies
without Fragment
with Fragment
https://codesandbox.io/p/sandbox/dazzling-swartz-z3q5h9?file=%2Fsrc%2FQueryWithFragment.tsx%3A19%2C13
you can find the sample code here