Removes special case to type explosion with fed1 supergraphs #1994
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We usually avoid type-exploding the fetching of interface fields when we
can avoid to, but we were avoiding this optimization where the input
was a fed1-generated supergraph (essentially always type-exploding all
interfaces).
The initial reason for that avoidance was a combination of 2 things:
planning was doing, which is actually not 100% accurate.
goes to interface (really, all non-entity types), in that it
does not record when those interfaces/values types are actually
defined. This lead to known issues (in both fed1 and
fed2-with-fed1-supergraph) and I took this as additional motivation
to avoid relying on interface as much as possible (which type
explosion kind of achieve).
However, regarding the 1st point, fed1 happens to avoid type explosion
when all the implementations of an interface are a value type, so not
doing so is a sort of regression. And while we could mimick that fed1
behaviour, upon further reflexion, the rule we use for fed2 for this
(which only type-explode specific fields where one of the implementation
is either external or has as
@requires
) is actually fine with fed1supergraphs. More precisely, the issues due to the incompletness of
fed1 supergraph could be a problem with that rule if an interface
had different fieds defined in different subgraphs, but that's actually
not allowed by fed1.