Resolving types across multiple subgraphs can refer to a few different scenarios, depending on what you need to accomplish.
If different subgraphs will contribute different fields to the same type, you create an entity. If a subgraph defines an entity, it can do any of the following:
- Contribute fields to the entity directly
- Compute field values based on the values of other entity fields
- Define the entity without contributing any fields at all
If different subgraphs will resolve the same fields of a type, you use the
@shareable directive to enable this behavior.
If an object field will move from one subgraph to another, you use the
@override directive to indicate that the field is now resolved by this subgraph instead of another subgraph where it's also defined.