fix(federation): removed RebaseError::InterfaceObjectTypename error#8109
fix(federation): removed RebaseError::InterfaceObjectTypename error#8109
RebaseError::InterfaceObjectTypename error#8109Conversation
…unnecessary - added a regression test that caused the error previously
This comment has been minimized.
This comment has been minimized.
✅ Docs preview readyThe preview is ready to be viewed. View the preview File Changes 0 new, 1 changed, 0 removedBuild ID: 1c21cb2641fbdaed17b06fde URL: https://www.apollographql.com/docs/deploy-preview/1c21cb2641fbdaed17b06fde |
sachindshinde
left a comment
There was a problem hiding this comment.
This is fine given our current limitations of interface object handling; for folks who may not know why we need to do this, see this comment from a previous PR.
Note that this change cannot be mirrored to the JS codebase as-is, as the JS codebase still implements the fragment-reuse optimization which uses errorIfCannotRebase: false, and that codepath needs __typename to be "skipped" to prevent the issue described in this federation repo PR. This fragment-reuse codepath was removed from the Rust codebase, so it's fine here.
Summary
rebase_onmethod was prohibiting __typename field from being rebased on an interface object type by raisingInterfaceObjectTypenameerror.__typenamefrom interface object types, there are already several other cases where such__typenameselections are added to interface object types.__typenameselections are benign and we currently don't plan to remove all of those cases at this time.Checklist
Complete the checklist (and note appropriate exceptions) before the PR is marked ready-for-review.