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
unable to configure federation directive namespace #201
Comments
Hey @thumbnail, thanks for reporting this! @daemonsy and I will take a look this week. |
Hey @thumbnail, we took a look at this today and it seems like there are a couple of enhancements that would help us get closer to spec compliant with federation version 2.
I believe the latter one would help resolve the issue that you are seeing. Do you have any interest in working on a solution for either of these enhancements? |
Hey @lennyburdette, I was just rereading your comment here and realized that it directly conflicts with what I just suggested above. Namely, per your comment, code-first libraries will not be providing an API to rename imports (second bullet point). However, I wanted to ask: should we consider an API to allow overriding the default namespace (first bullet point)? |
Hmm this is odd. It appears to me that this error occurs with https://github.com/apollographql/federation/blob/main/composition-js/src/merging/merge.ts#L198-L201 |
Ah, good point! This should be backwards compatible. We'll wait until we hear more from the team before we do anything. |
I had a good conversation with my team about this and learned a bunch. I still consider this a bug, but it may not be a high priority to fix. And we'll eventually need an API for configuring future Here's my summary of the conversation: apollographql/federation#1976 (comment) |
I'm going to close this since this was solved in 03fdfea |
In federation version 2 the directives have namespaces (
federation__
by default). Currently this prefix is non-configurable which may cause issues when other subgraphs use a different namespace or import them without a namespace.In Apollo studio I got the following error:
In this case, A and B are ruby applications, and X and Y are not.
It can be partially fixed by configuring the graph as v1 and overriding
Schema#federation_dsl
to prepend an import for all directives. But it's not very elegant 😬The text was updated successfully, but these errors were encountered: