module@warp-drive/core/types/cache/relationship
Interface ResourceRelationship<T>
Defined in: warp-drive-packages/core/src/types/cache/relationship.ts:23
The stable-cache-key form of a to-one relationship.
Unlike SingleResourceRelationship, data is always in the stable ResourceKey form rather than a raw resource identifier.
Example
ts
const relationship: ResourceRelationship = { data: resourceKey };Type Parameters
T
T = ResourceKey
Properties
data?
ts
optional data?: T | null;Defined in: warp-drive-packages/core/src/types/cache/relationship.ts:27
the related resource, or null if the relationship has no related resource
links?
ts
optional links?: Links;Defined in: warp-drive-packages/core/src/types/cache/relationship.ts:35
links related to the relationship
meta?
ts
optional meta?: ObjectValue;Defined in: warp-drive-packages/core/src/types/cache/relationship.ts:31
meta information about the relationship