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.
useAddGraphEdgeDefinition(options?: MutationOpts<GraphEdgeDefinition, AddGraphEdgeDefinitionVars>)Types: GraphEdgeDefinition
useAddGraphNodeDefinition mutation
Add a node definition to a graph definition.
useAddGraphNodeDefinition(options?: MutationOpts<GraphNodeDefinition, AddGraphNodeDefinitionVars>)Types: GraphNodeDefinition
useCreateGraphDefinition mutation
Create a new graph definition.
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).
useCreateGraphInstance(options?: MutationOpts<Graph, CreateGraphInstanceVars>)Types: Graph
useDeleteGraphDefinition mutation
Soft-delete a graph definition and all its instances.
useDeleteGraphDefinition(options?: MutationOpts<SuccessResponse, string>)Types: SuccessResponse
useExtractGraph composite
Extract a graph from text content against a graph definition.
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).
useListGraphDefinitionGraphs(graphDefId: string, params?: Record<string, unknown>, options?: QueryOpts<Graph[]>)Types: Graph
useListGraphDefinitions query
List graph definitions.
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.
usePurgeGraphDefinition(options?: MutationOpts<SuccessResponse, PurgeGraphDefinitionParams>)Types: SuccessResponse · PurgeGraphDefinitionParams
useRemoveGraphEdgeDefinition mutation
Remove an edge definition from a graph definition.
useRemoveGraphEdgeDefinition(options?: MutationOpts<SuccessResponse, string>)Types: SuccessResponse
useRemoveGraphNodeDefinition mutation
Remove a node definition from a graph definition.
useRemoveGraphNodeDefinition(options?: MutationOpts<SuccessResponse, string>)Types: SuccessResponse
useRestoreGraphDefinition composite
Restore a soft-deleted graph definition.
useRestoreGraphDefinition(options?: MutationOpts<GraphDefinition, string>)Types: GraphDefinition
useRetrieveGraphDefinition query
Get a graph definition by ID, including node + edge definitions.
useRetrieveGraphDefinition(id: string, options?: QueryOpts<GraphDefinition>)Types: GraphDefinition
useUpdateGraphDefinition mutation
Update a graph definition.
useUpdateGraphDefinition(options?: MutationOpts<GraphDefinition, UpdateGraphDefinitionParams>)