Graph format
Holster stores data and sends it between devices as a graph, in the same format as GunDB. Nodes aren't nested inside each other. Instead, each node has an id and nodes refer to each other by id.
A graph is an object whose keys are node ids, and whose values are the nodes:
{
root: {
_: {"#": "root", ">": {posts: 1790845200000}},
posts: {"#": "posts-node"},
},
"posts-node": {
_: {"#": "posts-node", ">": {"2026-10-01-hello-world": 1790845200000}},
"2026-10-01-hello-world": {"#": "post-node"},
},
"post-node": {
_: {"#": "post-node", ">": {title: 1790845200000, author: 1790845200000}},
title: "Hello world",
author: {"#": "author-node"},
},
"author-node": {
_: {"#": "author-node", ">": {name: 1790845200000, url: 1790845200000}},
name: "Alice",
url: "https://alice.example",
},
}This is how this post is stored:
await holster.get("posts").put({
"2026-10-01-hello-world": {
title: "Hello world",
author: {name: "Alice", url: "https://alice.example"},
},
})Top level keys such as posts are properties on the root node, and each object gets its own node. Holster gives new nodes random ids, which posts-node, post-node and author-node stand in for here. The states are the time the post was written, 9am UTC on 1 October 2026.
Properties
A node's properties can have any name except "_", and their values can be:
a string, number,
true,falseornulla rel, a reference to another node by its id, in the format
{"#": "id"}
Objects can't be stored directly as values. An object is stored as its own node, and the property holds a rel to it.
Metadata
The "_" property is reserved for the node's metadata:
Key | Description |
|---|---|
| The node's id. |
| The state of each property, as an object of property names and their states. |
| Signatures, on nodes written through the User API. Each state maps to the signature for the update made at that state. |
The state decides which update wins when the same property is changed in two places: the higher state is kept. The Holster API uses the current time when you call put(), and the Wire API leaves it to you.