graphql / composite-schemas-spec

MIT License
26 stars 9 forks source link

Clarify entity keys. #3

Closed michaelstaib closed 8 months ago

michaelstaib commented 8 months ago

A representation of an object’s identity is known as a key. Keys consist of one or more fields from an object, and are defined through the @key directive on an object or interface type.

In a distributed architecture, it is unrealistic to expect all participating systems to agree on a common way of identitifying a particular type of entity. The composite schemas spec therefore allows multiple keys to be defined for each entity type, and each subgraph defines the particular keys that it is able to support.