Skip to content

fix(composition): emit implements on type definition instead of extend type#8931

Merged
briannafugate408 merged 4 commits intodevfrom
FED-968
Feb 27, 2026
Merged

fix(composition): emit implements on type definition instead of extend type#8931
briannafugate408 merged 4 commits intodevfrom
FED-968

Conversation

@briannafugate408
Copy link
Copy Markdown
Contributor

@briannafugate408 briannafugate408 commented Feb 27, 2026

The Rust composition implementation was emitting object types that implement interfaces in a split form. So the SDL had a main type definition without implements and a separate extend type implements block. In merge_implements, we were passing the source subgraph’s ComponentName into insert_implements_interface. When a subgraph had extend type Foo implements I, that name had Extension origin, so the merged schema’s “implements” was attached to an extension component and printed as a separate extend type ... implements ....


Checklist

Complete the checklist (and note appropriate exceptions) before the PR is marked ready-for-review.

  • PR description explains the motivation for the change and relevant context for reviewing
  • PR description links appropriate GitHub/Jira tickets (creating when necessary)
  • Tests added and passing1
    • Unit tests
    • Integration tests
    • Manual tests, as necessary

Exceptions

Note any exceptions here

Notes

Footnotes

  1. Tick whichever testing boxes are applicable. If you are adding Manual Tests, please document the manual testing (extensively) in the Exceptions.

@apollo-librarian
Copy link
Copy Markdown
Contributor

apollo-librarian bot commented Feb 27, 2026

✅ Docs preview has no changes

The preview was not built because there were no changes.

Build ID: fa52138ca66e9ce294f199ec
Build Logs: View logs


✅ 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
Copy link
Copy Markdown
Contributor

@briannafugate408, please consider creating a changeset entry in /.changesets/. These instructions describe the process and tooling.

@briannafugate408 briannafugate408 changed the title fix(composition): emit implements on type definition instead of exten… fix(composition): emit implements on type definition instead of extend type Feb 27, 2026
@briannafugate408 briannafugate408 self-assigned this Feb 27, 2026
@briannafugate408 briannafugate408 marked this pull request as ready for review February 27, 2026 17:48
@briannafugate408 briannafugate408 requested a review from a team as a code owner February 27, 2026 17:48
@dariuszkuc dariuszkuc self-requested a review February 27, 2026 17:55

// Exact expected from the task: type line must include "implements DocumentType" and must NOT
// be split into a separate "extend type ... implements DocumentType".
assert!(
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead of all those asserts why not just have an expected composed schema and assert using insta?

e.g.

assert_snapshot!(supergraph.schema().schema());

@briannafugate408 briannafugate408 enabled auto-merge (squash) February 27, 2026 22:16
@briannafugate408 briannafugate408 merged commit 916db12 into dev Feb 27, 2026
15 checks passed
@briannafugate408 briannafugate408 deleted the FED-968 branch February 27, 2026 22:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants