Skip to content
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions spec/Section 2 -- Source Schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,23 @@ type Product @key(fields: "id") {
}
```

For a given subgraph, there must be only one lookup field that can resolve a given
entity by a specific key. If multiple lookup fields are defined that resolve the
same entity by the same key, the composition process must throw a composition
error.

```graphql counter-example
type Query {
product(id: ID!): Product @lookup
productV2(id: ID!): Product @lookup
}

type Product @key(fields: "id") {
id: ID!
sku: String!
}
```

Lookups can also be nested within other lookups and allow resolving nested
entities that are part of an aggregate. In the following example the `Product`
can be resolved by its ID but also the `ProductPrice` can be resolved by passing
Expand Down
Loading