Overview of DocumentLoader
DocumentLoader class is used to batch load and cache ModelInstanceDocument streams. It is exported by the @composedb/loader module and extends DataLoader.import { DocumentLoader } from '@composedb/loader'website·Indexed 30 days ago
https://composedb.js.org/Documentation for ComposeDB, including API references for the ComposeClient and ComposeRuntime, CLI command guides for managing models, documents, and DIDs, and development tools. Covers versions 0.2.x, 0.3.x, and 0.4.x, including GraphQL execution contexts and SDL directives.
DocumentLoader class is used to batch load and cache ModelInstanceDocument streams. It is exported by the @composedb/loader module and extends DataLoader.import { DocumentLoader } from '@composedb/loader'The Composite class is used to manage sets of Model streams. It supports creating new Models, importing and exporting composites as JSON, and compiling them into a runtime format for the ComposeClient.
Crucially, Composite instances are immutable. Any method that modifies the composite's contents will return a new instance of the Composite class rather than mutating the existing one.
import { Composite } from '@composedb/devtools'The Composite class provides APIs for managing composites (sets of Model streams). It supports creating new Models, importing and exporting composites as JSON, and compiling them into a runtime format for the ComposeClient.
Important: Composite instances are immutable. Any method that modifies the internal composite definition will return a new Composite instance.
import { Composite } from '@composedb/devtools'The Composite class provides APIs for managing composites (sets of Model streams) through their development lifecycle. It supports creating new Models, importing and exporting composites as JSON, and compiling them into a runtime format for the ComposeClient.
Important: Composite instances are immutable. Any method that modifies the internal composite definition will return a new Composite instance.
import { Composite } from '@composedb/devtools'The Composite class provides APIs for managing composites (sets of Model streams). It supports creating new Models, importing and exporting composites as JSON, and compiling them into a runtime format for the ComposeClient class.
Key Characteristic: Composite instances are immutable. Any method that modifies the internal composite definition will return a new instance of the Composite class.
import { Composite } from '@composedb/devtools'CeramicAccount object implement the Node interface, ensuring they have a unique id (representing the document stream ID). One-to-many relationships are represented using Relay's Connection specification, consisting of edges (containing a cursor and the node) and pageInfo.type CeramicAccount implements Node {
id: ID!
isViewer: Boolean!
postList: PostConnection
postListCount: Int!
profile: Profile
}
type Post implements Node {
id: ID!
text: String!
}
type PostConnection {
edges: [PostEdge]
pageInfo: PageInfo
}
type PostEdge {
cursor: String
node: Post
}