Skip to content

fix(federation): update input value types and references when renaming an input object - #10384

Open
inanna-apollo wants to merge 1 commit into
inanna/fix-13-input-field-rename-typefrom
inanna/fix-new-input-object-rename
Open

inanna-apollo wants to merge 1 commit into
inanna/fix-13-input-field-rename-typefrom
inanna/fix-new-input-object-rename

Conversation

@inanna-apollo

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

Copy link
Copy Markdown

InputObjectTypeDefinitionPosition::rename only re-keyed the input object's reference record. Field arguments, input fields and directive arguments that take the input object kept the old, removed name, making the schema invalid. The reference index also kept the old name in the positions of the renamed input object's own fields.

The rename now rewrites the types of every referencing input value, preserving list and non-null wrappers, and Referencers::rename_input_object_type remaps the positions of the input object's fields. Rewriting input fields relies on the preceding fix to InputObjectFieldDefinitionPosition::rename_type.

Stacked on #10379, which it depends on; review only the top commit. Retarget to dev once that lands.

Reachability

Internal API only. Renaming an input object skipped every argument, input field and directive argument using the type, leaving an invalid schema. 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: ac62b47ad0e86476a8e6b64c
Build Logs: View logs

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


✅ 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.

@inanna-apollo
inanna-apollo force-pushed the inanna/fix-13-input-field-rename-type branch from 89914e8 to 3800b4a Compare October 5, 2026 18:04
@inanna-apollo
inanna-apollo force-pushed the inanna/fix-new-input-object-rename branch from f40536b to 437118e 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
@mergify

mergify Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

…g an input object

`InputObjectTypeDefinitionPosition::rename` only re-keyed the input object's
reference record. Field arguments, input fields and directive arguments that
take the input object kept the old, removed name, making the schema invalid.
The reference index also kept the old name in the positions of the renamed
input object's own fields.

The rename now rewrites the types of every referencing input value, preserving
list and non-null wrappers, and `Referencers::rename_input_object_type` remaps
the positions of the input object's fields. Rewriting input fields relies on
the preceding fix to `InputObjectFieldDefinitionPosition::rename_type`.
@inanna-apollo
inanna-apollo force-pushed the inanna/fix-13-input-field-rename-type branch from 3800b4a to 91a4ff6 Compare October 5, 2026 18:23
@inanna-apollo
inanna-apollo force-pushed the inanna/fix-new-input-object-rename branch 3 times, most recently from 88c0ced to 68e3e69 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