Update Graph Schema
update_graph_schemaReplace a graph project's WHOLE schema (saves to database, does NOT deploy). DESTRUCTIVE: an entity, relationship or field the schema leaves out is deleted by the next deploy.
⚠️ Follow ALL rules from create_graph_project: • Must have "nodes" key with at least one entity • Each entity needs "description" and "schema" with field definitions • Each field is {"type": "...", "required": true/false} — required defaults to false • Relationships need "from", "to", and "cardinality" • Field types: string, integer, float, boolean, date, json • Relationship types should be UPPER_SNAKE_CASE • Entity names should be PascalCase
WORKFLOW:
get_graph_schema to see the current schema (its 'version' pins the save)
preview_schema_change with the new schema: check 'diff' and 'plan'
update_graph_schema (pass expected_version to be refused if someone else saved meanwhile)
deploy_graph_staging, then get_job_status
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| schema | Yes | New graph schema with 'nodes' and optionally 'relationships' keys — the WHOLE schema. | |
| project_id | Yes | Project ID (UUID) | |
| expected_version | No | The 'version' a get_graph_schema read answered. The save is refused (409) when the saved schema changed since. |