-
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
Handle additional cases in unmasked types #12154
Conversation
✅ Docs Preview ReadyNo new or changed pages found. |
🦋 Changeset detectedLatest commit: 7769b76 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
commit: |
size-limit report 📦
|
@@ -2971,6 +2971,7 @@ describe("ApolloClient", () => { | |||
|
|||
test("client.mutate uses masked/unmasked type when using Masked<TData>", async () => { | |||
type UserFieldsFragment = { | |||
__typename: "User"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These missing caused problems - the question is: would they be missing in a real life case with codegen, or just with our hand-written types?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unless someone turns off the skipTypename
option (possible, but I'd suggest we enforce this as a requirement), this should only be a problem with our hand-written types (or hand-written types in general, which again we can encourage not to do).
Good catch on this though. I'll comb through the new masking tests and make sure __typename
is added everywhere. This is just a goof on my part.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good. There are some failing tests, but I'll look into it and fix them before merging. Appreciate you going further on this one!
For context, this had some Discord help:
https://discord.com/channels/997886693233393714/1309495105027313725
(if you're not on the server yet: https://t.co/0PGvmQUEIO)