-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unmasked
breaks when using Tagged
type
#12266
Comments
Hey @Yunie08 👋 Would you be able to make that codesandbox public? Unfortunately I get a "Devbox not found" error when trying to open that link. Thanks for the report! We'll see what we can do to address. |
Hi @jerelmiller, |
@Yunie08 awesome thank you! I really appreciate the detail you put into the reproduction as its immediately obvious what's happening here. What I think we're going to try and do is move the That said, this would only work when working with unmasked types and would probably reappear if you adopt data masking in the future and start generating masked types using these tagged scalar types. I think the change to move |
Hey @jerelmiller, |
Do you have any feedback for the maintainers? Please tell us by taking a one-minute survey. Your responses will help us understand Apollo Client usage and allow us to serve you better. |
This has just been released in 3.12.6! |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Issue Description
Problem
After upgrading from
![image](https://private-user-images.githubusercontent.com/92770292/402486395-50454264-c420-4c94-8e00-e0da287ed5bb.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1MjIyMDksIm5iZiI6MTczOTUyMTkwOSwicGF0aCI6Ii85Mjc3MDI5Mi80MDI0ODYzOTUtNTA0NTQyNjQtYzQyMC00Yzk0LThlMDAtZTBkYTI4N2VkNWJiLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE0VDA4MzE0OVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTBjZDFiZjNjNDRlNTVjNTAyY2FjNWE1NDk3NjIwMDA3NjMyNjA3OThmNTk5N2ZiMGVhZTYwYjI4YWM1YzFkYmImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.f-8kJg0BkFH8X2E8LTNkCedYBCKelGwY_gE7s7UVvHI)
3.11.8
to3.12.4
, we encountered an error in ourupdate
functions using ids returned indata
:The detailed error being:
Our approach
We dug a little bit and found out that
Unmasked
(more preciselyUnwrapFragmentRefs
) type breaks when usingTagged
fromtype-fest
(see reproduction).We always end up in the branch
TData extends object
true
inUnwrapFragmentRefs
, in our case TData[id].Thank you for your attention, and don't hesitate to reach out if further information is needed.
Link to Reproduction
https://codesandbox.io/p/devbox/xenodochial-edison-yzsnvq?file=%2Fsrc%2Fbug_reproduction.ts%3A15%2C1&workspaceId=ws_Sfp3CZt4y22Usf7cvosyGL
Reproduction Steps
No response
@apollo/client
version3.12.4
The text was updated successfully, but these errors were encountered: