Skip to content

fix(federation): keep renamed interfaces in their directives' referencers - #10380

Open
inanna-apollo wants to merge 1 commit into
devfrom
inanna/fix-14-interface-rename-directive-targets
Open

inanna-apollo wants to merge 1 commit into
devfrom
inanna/fix-14-interface-rename-directive-targets

Conversation

@inanna-apollo

@inanna-apollo inanna-apollo commented Oct 2, 2026 •

Copy link
Copy Markdown

Renaming an interface type left the old interface name in Referencers.directives[d].interface_types for every directive applied to it. The schema stayed valid, but directive lookups through the index (as used for @key, @tag, @inaccessible and other directive processing) named a type that no longer existed.

Referencers::rename_interface_type now remaps directive target positions for the interface itself, as it already did for its fields and arguments.

Reachability

Internal API only: production code never renames interfaces today. The stale referencer carries into the validated subgraph used by composition. Merge note: the schema rename PRs in this series each add the same referencer-rebuild check helper at the end of the position.rs test module, so whichever lands second needs a trivial rebase (keep the helper once).

Testing

The regression test(s) in this PR fail on dev and pass with this change; neighboring test suites pass with no snapshot changes. Found during property-based testing of apollo-federation.


Checklist

  • PR description explains the motivation for the change and relevant context for reviewing
  • PR description links appropriate GitHub/Jira tickets (creating when necessary)
  • Changeset is included for user-facing changes
  • Changes are compatible
  • Documentation completed
  • Performance impact assessed and acceptable
  • Metrics and logs are added and documented
  • Tests added and passing
    • Unit tests
    • Integration tests
    • Manual tests, as necessary

@apollo-librarian

apollo-librarian Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

✅ Docs preview ready

The preview is ready to be viewed. View the preview

File Changes

0 new, 1 changed, 0 removed
* graphos/routing/(latest)/_sidebar.yaml

Build ID: 2f4975a4fb0b3f2fd343587c
Build Logs: View logs

URL: https://www.apollographql.com/docs/deploy-preview/2f4975a4fb0b3f2fd343587c


✅ AI Style Review — No Changes Detected

No MDX files were changed in this pull request.

Review Log: View detailed log

This review is AI-generated. Please use common sense when accepting these suggestions, as they may not always be accurate or appropriate for your specific context.

@github-actions

This comment has been minimized.

@inanna-apollo
inanna-apollo force-pushed the inanna/fix-14-interface-rename-directive-targets branch from 4dbc1ce to 530eb76 Compare October 5, 2026 18:04
@inanna-apollo
inanna-apollo marked this pull request as ready for review October 5, 2026 18:04
@inanna-apollo
inanna-apollo requested review from a team as code owners October 5, 2026 18:04
…cers

Renaming an interface type left the old interface name in
`Referencers.directives[d].interface_types` for every directive applied to it.
The schema stayed valid, but directive lookups through the index (as used for
`@key`, `@tag`, `@inaccessible` and other directive processing) named a type
that no longer existed.

`Referencers::rename_interface_type` now remaps directive target positions for
the interface itself, as it already did for its fields and arguments.
@inanna-apollo
inanna-apollo force-pushed the inanna/fix-14-interface-rename-directive-targets branch 3 times, most recently from 530eb76 to d91790e Compare October 5, 2026 18:24
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.

1 participant