Skip to main content

handle

Function handle 

Source
pub async fn handle(
    req: HttpRequest,
    body: String,
    state: Data<AppState>,
) -> Result<HttpResponse, HaystackError>
Expand description

POST /api/changes

Request grid should have a single row with a version column (Number). Returns a grid of changelog entries since that version, each with:

  • version: Number — the version after the mutation
  • op: Str — “add”, “update”, or “remove”
  • ref: Str — the entity ref value
  • entity: the entity dict (for add/update; absent for remove)

Also includes curVer in the response meta with the current graph version, so the caller can store it for the next delta sync.