Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(federation): Aggregate interfaces for types and interfaces #4497

Merged
merged 5 commits into from
Aug 21, 2020

Conversation

trevor-scheer
Copy link
Member

For value types which implement interfaces, composition currently
exhibits some unexpected behavior. Value types can implement whatever
interfaces they'd like within their respective service, but that won't
necessarily be represented within the composed schema.

To resolve this, we need to aggregate all interfaces that an object
or interface might implement and ensure those are represented in the
composed schema.

It's not important for every service to implement every interface
that the others do, so in this sense we can be more permissive and
allow each service to choose which interfaces a type or interface
should implement locally.

For value types which implement interfaces, composition currently
exhibits some unexpected behavior. Value types can implement whatever
interfaces they'd like within their respective service, but that won't
necessarily be represented within the composed schema.

To resolve this, we need to aggregate all interfaces that an object
or interface might implement and ensure those are represented in the
composed schema.

It's not important for every service to implement every interface
that the others do, so in this sense we can be more permissive and
allow each service to choose which interfaces a type or interface
should implement locally.
@trevor-scheer trevor-scheer changed the title fix(federation): Composition - aggregate interfaces for types and interfaces in composed schema fix(federation): Aggregate interfaces for types and interfaces Aug 21, 2020
@trevor-scheer trevor-scheer merged commit 3081569 into main Aug 21, 2020
@trevor-scheer trevor-scheer deleted the trevor/composition-include-all-interfaces branch August 21, 2020 20:29
abernix pushed a commit to apollographql/federation that referenced this pull request Sep 4, 2020
…ographql/apollo-server#4497)

For value types which implement interfaces, composition currently
exhibits some unexpected behavior. Value types can implement whatever
interfaces they'd like within their respective service, but that won't
necessarily be represented within the composed schema.

To resolve this, we need to aggregate all interfaces that an object
or interface might implement and ensure those are represented in the
composed schema.

It's not important for every service to implement every interface
that the others do, so in this sense we can be more permissive and
allow each service to choose which interfaces a type or interface
should implement locally.
Apollo-Orig-Commit-AS: apollographql/apollo-server@3081569
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants