Skip to main content

submit

Function submit 

Source
pub async fn submit(
    __arg0: State<AppState>,
    body: Bytes,
) -> Result<impl IntoResponse, ApiError>
Expand description

POST /v1/graphs: submit (and strictly validate) a graph document.

The body is the document JSON. On success the document is stored content-addressed by its reproducible graph_hash, and the response is { "graph": "<hash>", "created": <bool> }, where created is false when the identical document was already stored (idempotent re-submit). Any validation failure is 400 invalid_graph carrying the complete error list.