website/src/docs/fusion/v16/field-ownership-and-sharing.md
Field ownership defines which subgraph is responsible for each field in the composite schema. Clear ownership boundaries keep composition predictable and prevent semantic drift across teams.
This chapter explains Fusion's ownership model, when to use @shareable, and how @external and @provides fit into ownership contracts.
For non-key fields, Fusion expects a single owner.
Product.price, that subgraph owns Product.price.Key fields are special. Fields used for entity identity and lookup mapping can appear in multiple subgraphs as part of entity resolution.
Use @shareable when the same field is intentionally defined in multiple subgraphs and has the same meaning and value semantics in each definition.
@shareable is a contract, not just a conflict suppressor.
Let's assume we have two subgraphs, both define User.name as @shareable, so composition succeeds and the gateway can resolve the field from either source:
GraphQL schema
# Accounts subgraph
type User {
id: ID!
name: String! @shareable
}
# Reviews subgraph
type User {
id: ID!
name: String! @shareable
reviews: [Review!]!
}
C# declaration
[ObjectType<User>]
public static partial class UserNode
{
[Shareable]
public static string GetName([Parent] User user)
=> user.Name!;
}
Do not use @shareable when fields are only superficially similar.
displayName vs internal account name.If the meaning differs, use different field names and keep a single owner per field.
@provides declares that a field returning an entity can also provide selected subfields of that entity in that specific path. This is a contextual optimization, not a transfer of global ownership.
@external marks these field as owned by another subgraph.
GraphQL schema
# Reviews subgraph
type Review {
id: ID!
author: User @provides(fields: "username")
}
type User {
id: ID!
username: String! @external
}
In this example:
User.username.username only when resolving Review.author.For detailed @provides patterns and FieldSelectionMap syntax, see Data Requirements and Mapping.
These are the most frequent ownership mistakes that cause composition to fail or produce unexpected behavior.
If two subgraphs define the same non-key field without @shareable, composition fails.
Typical fix:
@shareable and align semantics.@provides is a load optimization for partial availability. Use it when only some paths in a subgraph can supply a field. If your subgraph can always provide a field, use @shareable instead. Marking it @external and adding @provides to every path that returns the entity adds complexity for no benefit.
Before composition, verify:
@shareable in all defining subgraphs.@external is used only for fields owned elsewhere.@provides is used for contextual availability, not to hide ownership ambiguity.