Recursively nested field map describing which Resource values to retrieve
and how deeply to expand linked resources. Field keys are arbitrary Identifier names;
each field maps to a Placeholders value. A property left unrequested is absent from the
map rather than present with an empty marker; undefined is admitted as the absent marker for a field elided at
construction time (for example, a conditionally included placeholder) and is equivalent to omission.
Important
Placeholder values must match the type possibly declared by schemas for their Identifier keys;
processors must reject queries that provide mismatched templates with an error. The Template
type catches the most obvious structural errors at compile time, but full structural integrity
(including well-formedness of nested templates and validity of inline Selection slots) is
enforced at runtime by template validators.
Note
Primitive template values serve as type placeholders; their actual value is immaterial. An empty
Template ({}), whether it appears directly as a field value or as a collection tuple's element,
carries no retrieval instructions and must be ignored by processors as if the owning field were omitted
from the enclosing template. A collection tuple whose element is an empty Template, carrying only a
Selection and no per-item retrieval, is vacuous for the same reason and must be ignored likewise,
discarding any attached Selection constraints. Top-level form-serialised selection-only queries are
unaffected: servers substitute
the endpoint's default retrieval template before the elision rule applies.
Resource retrieval template.
Recursively nested field map describing which Resource values to retrieve and how deeply to expand linked resources. Field keys are arbitrary Identifier names; each field maps to a Placeholders value. A property left unrequested is absent from the map rather than present with an empty marker;
undefinedis admitted as the absent marker for a field elided at construction time (for example, a conditionally included placeholder) and is equivalent to omission.Placeholder values must match the type possibly declared by schemas for their Identifier keys; processors must reject queries that provide mismatched templates with an error. The
Templatetype catches the most obvious structural errors at compile time, but full structural integrity (including well-formedness of nested templates and validity of inline Selection slots) is enforced at runtime by template validators.Primitive template values serve as type placeholders; their actual value is immaterial. An empty
Template({}), whether it appears directly as a field value or as a collection tuple's element, carries no retrieval instructions and must be ignored by processors as if the owning field were omitted from the enclosing template. A collection tuple whose element is an emptyTemplate, carrying only a Selection and no per-item retrieval, is vacuous for the same reason and must be ignored likewise, discarding any attached Selection constraints. Top-level form-serialised selection-only queries are unaffected: servers substitute the endpoint's default retrieval template before the elision rule applies.