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
Hello, I'm using graphql-codegen with react-query in my project.
I found that my fragment.generated.ts file is different depending on graphql-codegen version.
e.g)
// fragments.graphqlfragmenttestonTest {
foobar
}
// fragment.generated.ts(graphql-codegen/typescript ^2,.4.2)import*asTypesfrom'../types/graphqlCodegen'exporttypeGQLTestFragment={__typename?: 'Test'}&Pick<Types.GQLTest,'foo'|'bar'>exportconstTestFragmentDoc=` fragment test on Test { foo bar} `// fragment.generated.ts(graphql-codegen/typescript ^1.21.7)import*asTypesfrom'../types/graphqlCodegen'exporttypeGQLTestFragment={__typename?: 'Test'foo?: string|null|undefinedbar?: number|null|undefined}exportconstTestFragmentDoc=` fragment test on Test { foo bar} `
I got different generated .ts file with same fragment.graphql file. And the latter cause an error with using hook --eslint-fix because the file imports Types and doesn't use. Is this an intentional change?
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
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, I'm using graphql-codegen with react-query in my project.
I found that my fragment.generated.ts file is different depending on graphql-codegen version.
e.g)
I got different generated .ts file with same fragment.graphql file. And the latter cause an error with using hook --eslint-fix because the file imports Types and doesn't use. Is this an intentional change?
Beta Was this translation helpful? Give feedback.
All reactions