Skip to main content
Version: 0.3.x

Module: client

ComposeDB client.

Installation

npm install @composedb/client

Classes

Type Aliases

ComposeClientParams

Ƭ ComposeClientParams: Object

Type declaration

NameTypeDescription
cache?DocumentCache | booleanOptional cache for documents.
ceramicCeramicApi | stringCeramic client instance or HTTP URL.
definitionRuntimeCompositeDefinitionRuntime composite definition, created using the Composite development tools.

ContextParams

Ƭ ContextParams: Object

Type declaration

NameTypeDescription
cache?DocumentCache | booleanOptional cache for documents.
ceramicCeramicApiCeramic client instance.

DocumentCache

Ƭ DocumentCache: Object

Type declaration

NameType
clear() => any
delete(id: string) => any
get(id: string) => void | Promise<ModelInstanceDocument<Record<string, any>>>
set(id: string, value: Promise<ModelInstanceDocument<Record<string, any>>>) => any

Functions

createGraphQLSchema

createGraphQLSchema(params): GraphQLSchema

Create a GraphQL schema from a runtime composite definition

Parameters

NameType
paramsCreateSchemaParams

Returns

GraphQLSchema


printGraphQLSchema

printGraphQLSchema(definition, readonly?): string

Create a GraphQL schema from a runtime composite definition and return its string representation.

Parameters

NameTypeDefault value
definitionRuntimeCompositeDefinitionundefined
readonlybooleanfalse

Returns

string