Skip to main content

validate_only

Function validate_only 

Source
pub async fn validate_only(body: Bytes) -> impl IntoResponse
Expand description

POST /v1/graphs/validate: validate a document without storing it.

This is submit’s dry run, the graph counterpart of /replay: it always answers the question rather than treating an invalid document as a bad request. On a valid document it returns { "valid": true, "graph": "<hash>", "summary": {...} } (the hash the document WOULD get, plus the shape summary the CLI prints); on an invalid one it returns { "valid": false, "errors": [...] } with the same node/edge-precise list POST /v1/graphs would refuse with. Nothing is ever stored.