Skip to content

Server shouldn't look for a parameterized @external resolver method #781

Open
@gzak

Description

@gzak

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions