Plugin typescript-mock-data doesn't resolve Apollo Fragments #9900
Unanswered
eppisapiafsl
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi there!
I'm integrating the plugin typescript-mock-data in a React Native project that uses Apollo and Codegen; the plugin generates the file with the mocks but doesn't resolve/import the fragment properly.
It looks like it uses the
__typename
property over the declared type, which I guess is the expected because that is the value in the Query Document 😓 .Is there a way to configure it to use the Fragment types instead?
codegen
Package json
"@graphql-codegen/cli": "5.0.0",
"@graphql-codegen/typescript": "4.0.1",
"@graphql-codegen/typescript-operations": "4.0.1",
"@graphql-codegen/typescript-react-apollo": "3.3.7",
"@graphql-codegen/typescript-resolvers": "4.0.1",
"graphql-codegen-typescript-mock-data": "3.7.1",
Thank you
Beta Was this translation helpful? Give feedback.
All reactions