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
Browse filesBrowse the repository at this point in the historyBrowse files
Sylvain Lebresne
authored
Fix not using @join__type for fields with no @join__field (#2654)
When a field is defined in all the subgraphs in which its type is
defined (typically the case for value types) and the field has nothing
specific (no `@requires`, `@provides`, `@override`, ...), then we
don't mark it in the supergraph with a `@join__field`. It's not
really needed, and this keeps supergraphs smaller.
But the code extracting subgraphs from supergraph was not handling
that case gracefully, and it was instead trying to add such fields
to all the subgraphs. This didn't break anything because when a
subgraph didn't had the type, the code was still giving up on adding
the field, but for supergraph with a fair number of subgraphs, this
led to a lot of busy work, making the extraction code slower than
it needed to be.
This commit fix that issue.
Note that a reason this probably occured is that the extraction
is trying to handle all versions of supergraphs with the same code,
but fed1 supergraphs and fed2 supergraphs have actually a fair number
of differences, and trying to handle both with the same code is,
in hindsight, a bit confusing and we should clean it up. Leaving
this as a follow-up however.
0 commit comments