You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
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