Skip to content

Conversation

@BoD
Copy link
Collaborator

@BoD BoD commented Oct 27, 2025

When doing something like extend type UserConnection @connection, we must embed the fields of type UserConnection in their parents. To do this we generate a mapping of types to embedded fields, e.g. SomeType -> [users].

Then at runtime during normalization we look at the parent type of a record to know the fields that need to be embedded.

But in the schema, the parent type may not be SomeType but one of its abstract parent (union, interface). So let's consider the runtime type in __typename first.

@BoD BoD requested a review from martinbonnin as a code owner October 27, 2025 11:59
@BoD BoD merged commit 2338624 into main Oct 27, 2025
2 checks passed
@BoD BoD deleted the embedded-fields-unions branch October 27, 2025 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants