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

Spread interfaces across service boundaries #58

Open
AlecAivazis opened this issue Feb 9, 2019 · 1 comment
Open

Spread interfaces across service boundaries #58

AlecAivazis opened this issue Feb 9, 2019 · 1 comment

Comments

@AlecAivazis
Copy link
Member

AlecAivazis commented Feb 9, 2019

This issue should be the central place for discussion on federated interfaces.

Atm, I don't think there's a meaningful way to interpret two interfaces with conflicting definitions. The merger responds with an error when this is encountered.

If the definitions are the same, the merger allows for interfaces to show up in different services but the planner does not handle them very well. If there was an interface that spanned two services, the gateway will currently create a planner that always fire both queries regardless of wether the id belongs to the target service. Ideally, the planner could mark a step as optional depending on some predicate and not execute a step if it doesn't apply at query time.

{
    myInterface {              # <- serviceA
         ... on User {         # <- serviceB
              firstName
         }
         ... on NotUser {      # <- serviceC
              firstName
         }
    }
}

Related to #43

@AlecAivazis
Copy link
Member Author

The gateway has to be able to add id to the myInterface selection set which means that every boundary interface must be a superset of node.

@AlecAivazis AlecAivazis changed the title Spreading interfaces Spread interfaces across service boundaries Feb 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant