Graph Definitions hooks

Hand-written shim. Generated CRUD hooks via ./graph-definitions.gen (`useListGraphDefinitions`, `useCreateGraphDefinition`, `useRetrieveGraphDefinition`, `useUpdateGraphDefinition`, `useDeleteGraphDefinition`, `useRestoreGraphDefinition`). Hooks below cover the node-definition / edge-definition sub-resources, the graphs-of-definition sub-resource, and the extract / save-instance ops — none of which fit the manifest's standard CRUD kinds.

Hooks

useAddGraphEdgeDefinition mutation

Add an edge definition to a graph definition.

TypeScript
useAddGraphEdgeDefinition(options?: MutationOpts<GraphEdgeDefinition, AddGraphEdgeDefinitionVars>)

Types: GraphEdgeDefinition

useAddGraphNodeDefinition mutation

Add a node definition to a graph definition.

TypeScript
useAddGraphNodeDefinition(options?: MutationOpts<GraphNodeDefinition, AddGraphNodeDefinitionVars>)

Types: GraphNodeDefinition

useCreateGraphDefinition mutation

Create a new graph definition.

TypeScript
useCreateGraphDefinition(options?: MutationOpts<GraphDefinition, CreateGraphDefinitionParams>)

Types: GraphDefinition · CreateGraphDefinitionParams

useCreateGraphInstance mutation

Create a graph instance under a definition. Pass optional nodes and edges to populate atomically (the old useSaveGraphInstance flow, now folded into createGraph).

TypeScript
useCreateGraphInstance(options?: MutationOpts<Graph, CreateGraphInstanceVars>)

Types: Graph

useDeleteGraphDefinition mutation

Soft-delete a graph definition and all its instances.

TypeScript
useDeleteGraphDefinition(options?: MutationOpts<SuccessResponse, string>)

Types: SuccessResponse

useExtractGraph composite

Extract a graph from text content against a graph definition.

TypeScript
useExtractGraph(options?: MutationOpts<ExtractGraphResult, ExtractGraphVars>)

Types: ExtractGraphResult

useListGraphDefinitionGraphs query

List graph instances created from a specific graph definition. Backed by the canonical top-level graphs.list({ graph_definition_id }) (returns the page's data array for back-compat).

TypeScript
useListGraphDefinitionGraphs(graphDefId: string, params?: Record<string, unknown>, options?: QueryOpts<Graph[]>)

Types: Graph

useListGraphDefinitions query

List graph definitions.

TypeScript
useListGraphDefinitions(params?: Omit<ListGraphDefinitionsParams, | > & { filter?: GraphDefinitionFilter; orderBy?: GraphDefinitionOrderBy[]; } & GraphDefinitionShorthands, options?: QueryOpts<Page<GraphDefinition>>)

Types: ListGraphDefinitionsParams · GraphDefinitionFilter · GraphDefinitionOrderBy · GraphDefinitionShorthands · Page · GraphDefinition

usePurgeGraphDefinition composite

Permanently delete a soft-deleted graph definition.

TypeScript
usePurgeGraphDefinition(options?: MutationOpts<SuccessResponse, PurgeGraphDefinitionParams>)

Types: SuccessResponse · PurgeGraphDefinitionParams

useRemoveGraphEdgeDefinition mutation

Remove an edge definition from a graph definition.

TypeScript
useRemoveGraphEdgeDefinition(options?: MutationOpts<SuccessResponse, string>)

Types: SuccessResponse

useRemoveGraphNodeDefinition mutation

Remove a node definition from a graph definition.

TypeScript
useRemoveGraphNodeDefinition(options?: MutationOpts<SuccessResponse, string>)

Types: SuccessResponse

useRestoreGraphDefinition composite

Restore a soft-deleted graph definition.

TypeScript
useRestoreGraphDefinition(options?: MutationOpts<GraphDefinition, string>)

Types: GraphDefinition

useRetrieveGraphDefinition query

Get a graph definition by ID, including node + edge definitions.

TypeScript
useRetrieveGraphDefinition(id: string, options?: QueryOpts<GraphDefinition>)

Types: GraphDefinition

useUpdateGraphDefinition mutation

Update a graph definition.

TypeScript
useUpdateGraphDefinition(options?: MutationOpts<GraphDefinition, UpdateGraphDefinitionParams>)

Types: GraphDefinition · UpdateGraphDefinitionParams