Fetch Node
This section assumes you've already set up a unified Node model as described in Modeling Node — the fetch pattern below relies on being able to check whether NodeFields is already populated.
NodeView vs NodeDetailView
Some endpoints return only NodeView models, which do not include the full content of the node (NodeFields). This allows fast retrieval of multiple nodes at once. Endpoints like GetNode return NodeDetailView models, which include the complete NodeFields payload.
Cache pattern
To avoid fetching the entire node every time it is opened:
- Check if
NodeFieldsis already present (not null) in your local model. - If it is missing, trigger a fetch for the
NodeDetailView. - If it is already present, safely reuse your cached data.
Concrete example
- Node tree — fetch light
NodeViewobjects. You don't need the heavyNodeFieldsto build a tree. - Opening a node — if
NodeFieldsis absent, fetch theNodeDetailView; otherwise, display from cache.