Class Document
publicA Document is a class that wraps the response content from a request to the API
returned by Cache.put
or Cache.peek
, converting resource-identifiers into
record instances.
It is not directly instantiated by the user, and its properties should not be directly modified. Whether individual properties are mutable or not is determined by the record instance itself.
data public
Defined in ../packages/store/src/-private/document.ts:46
The primary data for this document, if any.
If this document has no primary data (e.g. because it is an error document)
this property will be undefined
.
For collections this will be an array of record instances, for single resource requests it will be a single record instance or null.
errors public
Defined in ../packages/store/src/-private/document.ts:61
The errors returned by the API for this request, if any
identifier public
Defined in ../packages/store/src/-private/document.ts:79
The identifier associated with this document, if any
links public
Defined in ../packages/store/src/-private/document.ts:30
The links object for this document, if any
e.g.
{
self: '/articles?page[number]=3',
}
meta public
Defined in ../packages/store/src/-private/document.ts:70
The meta object for this document, if any