Skip to main content
pb.ontology reads the active ontology: the types, shapes, and relationships your graph is governed by. You author this structure in the Shapes Workbench; here you read it at run time.

pb.ontology

Read the active ontology as a document.
const ontology = await pb.ontology({ format: "markdown" });
console.log(ontology.markdown || ontology.content);
format
string
default:"markdown"
Output format, for example markdown.
projectId
string
Required when your key spans more than one project.

Types

Read and manage entity types with pb.types.

Shapes

Read shapes and their derived artifacts with pb.shapes.