-
Notifications
You must be signed in to change notification settings - Fork 174
Open
Labels
Description
Issue Description
Take a look at the following example in the Apollo documentation.
Currently, the server would expect a set of classes as follows:
class Product {
id, shippingEstimate; // lazy shorthand
}
interface IQueryResolver {
Product someRootResolver(...);
}
interface IProductResolver {
Integer weight(Product product);
}
But it should not expect a separate resolver method for the weight field since it is marked @external, meaning this subgraph cannot resolve it. Instead, it should just expect a plain old weight field as part of the Product class, and assume that some other subgraph will resolve it:
class Product {
id, weight, shippingEstimate; // lazy shorthand
}
interface IQueryResolver {
Product someRootResolver(...);
}
The field is needed so that the entity resolver can fill in the result of the external weight resolver into the Product model, and also so that this subgraph can read it during subsequent query processing.