You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After updating to recent @apollo/gateway package version we started observing and error when query on a field of type of an interface cause No such type [Type], so it can't be a fragment condition. Simplified setup down below
Example (actual behavior)
Service A:
type Query {
myField: MyInterface
}
type MyInterface {
name: String
}
type MyTypeA implements MyInterface {
name: String
}
type MyTypeB implements MyInterface {
name: String
}
Hey @trevor-scheer, is there any chance you could give some feedback in here. I have tried to fix it with #816 but it turned out to break other things (when types are actually shared between services). If you could give me some hints I could try to fix it and create a PR.
The upcoming version of federation (2.0, currently in alpha) fixes this issue and I've pushed 41a9b76 with a test for it. Fixing this is on the 0.x branch is unfortunately a bit tricky (federation 2 has a laregly rewritten query planner, and one of the reasons for such rewrite was to make it easier to solve that kind of issues).
Description
After updating to recent @apollo/gateway package version we started observing and error when query on a field of type of an interface cause
No such type [Type], so it can't be a fragment condition
. Simplified setup down belowExample (actual behavior)
Service A:
Service B:
The query:
result in such query to service A:
which cause an error
Expected behavior
Query to the service A doesn't include fragment for
MyTypeC
that isn't known for the service.Versions when problem occurs:
Versions when problem did not occur
Working example
https://github.com/barthez/query-planner-error-example
The text was updated successfully, but these errors were encountered: