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
Hi everyone, thank you for this great package!
We have been using codegen for a while now and recently updated the client-preset from 2.0.0 to 4.0.0 - now a lot of TypeScript errors are popping up across our react/next.js application. The errors could be found in every component that used fragments or that passed the fragment information down to a different component. Upon further inspection I was able to figure out that FragmentType is now returning never like in the screenshot below
It's still possible to access the information inside the fragment with useFragment, but the type is now unknown
Which packages are impacted by your issue?
@graphql-codegen/client-preset
Describe the bug
Hi everyone, thank you for this great package!
We have been using codegen for a while now and recently updated the
client-preset
from 2.0.0 to 4.0.0 - now a lot of TypeScript errors are popping up across our react/next.js application. The errors could be found in every component that used fragments or that passed the fragment information down to a different component. Upon further inspection I was able to figure out thatFragmentType
is now returningnever
like in the screenshot belowIt's still possible to access the information inside the fragment with

useFragment
, but the type is nowunknown
Your Example Website or App
private repo
Steps to Reproduce the Bug or Issue
My fragment is similar to this:
FragmentType<typeof UserInfoFragment>
never
Expected behavior
Before we updated the

client-preset
,FragmentType
did return the correct type informationScreenshots or Videos
No response
Platform
graphql
version: 16.6.0@graphql-codegen/*
version(s):While trying for a quick fix I also tried re-adding
@graphql-codegen/typescript
and@graphql-codegen/typescript-urql
but this did not help.Codegen Config File
Additional context
In the

fragment-masking.ts
file I found this error:I'm pretty sure that no one in our team touched this file, so this might have happened on updating the
client-preset
version.The text was updated successfully, but these errors were encountered: