Brain Docs

Reference

TypeScript SDKInstallationHTTP clientWire client
encoderecallforgetencodeVectormemoryListmemoryInspectgraphFetchlinkunlink
ErrorsRetriesPagination
Brain/Docs
✦ ASKBrain on GitHubDashboard
TypeScript SDKMemorygraphFetch

graphFetch

A cursor-paged node and edge view of the space, for drawing — not a query.

PURPOSE

A page of the space as a node/edge graph, for visualisation. It is not a query verb — use listStatements or traverseRelations to ask questions.

GET/v1/graphBearer API keystable
graphFetch(query?: GraphFetchQuery): Promise<GraphPage>
Handshake credentialstable
graphFetch(request: GraphFetchRequest): Promise<{ nodes, edges }>
graphFetchFrames(request: GraphFetchRequest): Promise<GraphFetchResponseFrame[]>

Parameters

ParameterTypeRequired
limitintegeroptional

Page size.

cursorstring (wire: bytes)optional

Cursor from the previous page.

includeStatementsbooleanoptional

Include statement nodes.

includeMemoriesbooleanoptional

Include memory nodes.

includeMemoryEdgesbooleanoptional

Include memory-to-memory edges.

includeTombstonedbooleanoptional

Include tombstoned nodes. Defaults to false.

Returns

FieldTypePresence
nodesGraphNode[]always

Each with id, kind, label and typeQname.

edgesGraphEdge[]always

Each with fromId, toId, kind and label.

nextCursorstring

Absent on the last page.

Turn the includes off for a large space

With every include on, a graph page is the whole store rendered as nodes. Fetch what you will actually draw — a visualisation that cannot show ten thousand nodes should not ask for them.

See also
traverseRelationsPagination

Was this page helpful?

memoryInspect

See everything the write pipeline derived from one memory — vector, keyword fields, HyPE questions, graph and edges.

link

Assert a typed memory-to-memory edge, alongside the ones the write pipeline infers.

On this page

ParametersReturns
Suggest an editOpen in Playground