Use external and requires in base type #1565
-
Hi team, we are getting the following errors when trying to use
We want to caculate I'm wondering why these checks are added and if this can be disabled using a config. Thanks in advance for your help. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
In general, the expectation was that you should not define That being said, I think that would still be a valid graph for the composition so we probably should remove this check. Also with the smart type merging introduced in Fed v2, |
Beta Was this translation helpful? Give feedback.
In general, the expectation was that you should not define
@external
fields on the base type -> given a type you would extend its functionality in other subgraphs. In your case, you would computeshippingEstimate
in the subgraph that calculates theweight
. I think that is generally an anti-pattern.That being said, I think that would still be a valid graph for the composition so we probably should remove this check. Also with the smart type merging introduced in Fed v2,
@extends / extend type
is no longer necessary so it might be hard to distinguish between base and extended type anyway.