fix(gateway): Handle @external
validation edge case for interface implementors
#4284
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.
One edge case on the validation of externals being used is when concrete
types need to be defined in multiple services for an interface to be
returned as a type for a field. To return an inteface, you need to
defined its possible implementations to let the schema know what all it
could support but you also need to mark its fields as external (at least
the ones you can resolve) so that you don't try and take over ownership
of an entities fields. The current implementation doesn't take this into
account so you fail validation and can't compose the graph