ComposeDB Documentation

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.

Tokens
62.6K
Snippets
503
Records
632
Agent score
61%

What's inside ComposeDB

  1. Overview of ComposeDB

    ComposeDB is a decentralized, composable graph database built on Ceramic. It provides TypeScript libraries and tools for developers to build applications that can discover, create, share, and reuse composable data models using GraphQL.
  2. Overview of the devtools.Composite class

    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'
  3. Overview of the devtools.Composite class

    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'
  4. Overview of the Composite class

    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'
  5. Overview of ComposeDB on Ceramic

    ComposeDB is a decentralized, composable graph database built on the Ceramic network. It provides TypeScript libraries and tools for developers to build applications that can discover, create, share, and reuse composable data models using GraphQL.
  6. Overview of the Composite class

    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'
  7. Understand ComposeDB runtime GraphQL object structure

    ComposeDB automatically generates a runtime GraphQL schema based on the composite definition. Document objects and the 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
    }
  8. ComposeDB v0.3.x Stability Warning

    ComposeDB v0.3.x is currently a developer preview and is not ready for production use. Breaking changes may occur between v0.x versions, which could lead to incompatibility between models or composites created with different versions.
  9. ComposeDB v0.x Stability Warning

    ComposeDB packages in version 0.x are in developer preview and are not ready for production use. Breaking changes may occur between v0.x versions, which could lead to incompatibilities between models or composites created in different versions.