-
Notifications
You must be signed in to change notification settings - Fork 235
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 schema. #220
Fix schema. #220
Conversation
@frikille would you have a few minutes to take a look? |
@mcollina @voslartomas I tend to believe that this is only a sympton of the issue described in #184 |
I agree with @asciidisco. The error this PR is fixing seems to be related to #184. As I explained in #219 (comment) we get an error similar to the one described in #184. So, it is true that this PR will fix the immediate issue with the gateway subscription and will make the server boot, but I think it is not the correct fix because as far as I can see the schema is a legitimate one and should work. The underlying cause should be fixed instead. |
Actually, let me take that back and ask the question: is this a valid schema? In this case it seems so because And what's the best way to signal this to the user? Should the gateway silently ignore the conflicts? |
@paolochiodi Which emphasizes again on what @flux627 #184 (comment) said & something that probably @frikille can answer best, as the original author of that code. One could ask how |
@asciidisco yep, that's correct. For the record, I found this in the apollo docs at https://www.apollographql.com/docs/apollo-server/federation/entities/#referencing
Also worth noting that
|
Apollo is the authority here, and this is about more than implementation details. They have docs describing the system, but since they don't have an official spec, then we need to take their docs + implementation together as a de-facto spec. Otherwise, we're implementing something different than Federation. That's ok, but we shouldn't claim that this is Federation in that case. I personally think it's in this library's best interest to match the functionality of Apollo and not diverge into its own flavor of schema delegation (especially if it's marketed as Federation and is almost Federation). FWIW, I was originally looking into this library for its subscription support in combination with Federation, but have since moved on to using schema stitching via the new |
I've done some more research and I may have found the route cause... but I'm moving the discussion to #184 as it seems more relevant there. |
How exactly are you doing this please? You have one server witch is stitching federated schema and subscriptions? Another server is Federation and then services? |
I have a gateway server (not an Apollo Federation Gateway™) that merges the types from multiple other subschemas. No directives required, but you do need to implement queries on the subschemas to fetch types via some identifier/key. See the docs here. As an exercise, I took this Apollo federation demo and converted it to use For subscriptions, check out the code from this comment. |
@flux627 I see, so it's the old approach before federation. Or am I missing something? |
The |
@flux627 I see, will take a look, thanks. |
@voslartomas As the conversation has been going into the direction of fixing the root cause for this, I think this could be closed. |
No description provided.