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

[DISCUSSION] Type Namespacing/Collision #25

Open
nnnnat opened this issue Feb 14, 2020 · 3 comments
Open

[DISCUSSION] Type Namespacing/Collision #25

nnnnat opened this issue Feb 14, 2020 · 3 comments
Assignees
Labels
discussion For issues in which discussion is expected but no further action is needed

Comments

@nnnnat
Copy link
Contributor

nnnnat commented Feb 14, 2020

If two federated services register a type, query, or mutation with the same name, the gateway errors out upon startup. Issue for this: apollographql/apollo-server#3186.

Colliding scalars work as of apollographql/apollo-server#2767.

We have come up with multiple decisions and chose to manually prefix our services with namespaces, as exemplified in the issue @kieckhafer linked above. Although the other solutions are not acceptable for us, we will be writing up a decision record for this choice.

@nnnnat nnnnat added the discussion For issues in which discussion is expected but no further action is needed label Feb 14, 2020
@nnnnat nnnnat added this to the Federated Gateway - Phase 1 milestone Feb 14, 2020
@kieckhafer
Copy link
Member

@rosshadden
Copy link
Contributor

OP: If two federated services register a type, query, or mutation with the same name, the gateway errors out upon startup. Issue for this: https://github.com/apollographql/apollo-server/issues/3186.

Colliding scalars work as of apollographql/apollo-server#2767.

We have come up with multiple decisions and chose to manually prefix our services with namespaces, as exemplified in the issue @kieckhafer linked above. Although the other solutions are not acceptable for us, we will be writing up a decision record for this choice.

@ticean
Copy link
Member

ticean commented Feb 21, 2020

@rosshadden @kieckhafer the description for this issue is blank. Could you provide specific details for why we're getting collisions? Is that generalizable? I'll describe below but I'm not sure I understood the "why" behind #132.

I read #132 and made some suggestions, to which @eric replied:

I do favor the way some of your suggestions look and sound, but think it would make it easier to duplicate these policies in the future across multiple services if they aren't prefixed in a specific way, like with a plugin name.

I agree with the comment. I wasn't suggesting to prefix with a plugin name. I thought the problem is that the authorization service is introducing a new type of policy. The new policy is different from a previously existing Reaction API Policy (which i assumed was a Meteor policy), so we needed to give the new type a better, more specific name like AuthorizationPolicy. If that PR is merged, we'll have two different types in the GraphQL schema, Policy and AuthorizationPolicy. They represent different resources and have different attributes.

Did I miss the ⛵?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion For issues in which discussion is expected but no further action is needed
Projects
None yet
Development

No branches or pull requests

4 participants