Commit
Apply staged rules to the knowledge graph.
What it is
Committing makes staged rules live. If RDFox can’t load the rule set, the commit is rolled back and returns
success: false. Run Validate first to catch syntax and stratification errors. Run the mutation
with dryRun: true first to see what would change. dryRun defaults to false. Pass ruleIris to commit a subset
of the staged rules. Stage the change with Stage. Ask the agent runs the
same flow in chat.
Import
import { useCommitStagedRulesMutation } from "@manta-eu/client";
import { useMantaClient } from "@manta-eu/react/providers";
Example
const { mantaClient } = useMantaClient();
const commit = useCommitStagedRulesMutation(mantaClient);
await commit.mutateAsync({ dryRun: true });
const result = await commit.mutateAsync({ dryRun: false });
Request
A backend sends the same step as a GraphQL mutation. See calling Manta from a backend for the endpoint and authentication.
mutation {
commitStagedRules(dryRun: false) {
success
rulesAdded
rulesUpdated
rulesDeleted
error
}
}
Response
result.commitStagedRules returns success, rulesAdded, rulesUpdated, rulesDeleted, and error. The three
counts are how many rules the commit added, updated, and deleted. error is set when the commit is rejected.