---
title: "POST /graphql"
method: POST
path: "/graphql"
tags: ["graphql"]
---

# POST /graphql

`POST /graphql`

GraphQL POST endpoint

## Request body

- RequestGraphql
  - `operationName` string
  - `query` string
  - `variables` object

## Response `200`

GraphQL response

- object
  - `data` object
  - `errors` object[]
    - `message` string

## Other responses

- `400` — GraphQL error

## Changes

- **2026-06-03** `95218721a5de` — 1 warning, 2 info
  - removed the optional property `error` from the response with the `400` status
  - added the optional property `data` to the response with the `400` status
  - added the optional property `errors` to the response with the `400` status
- **2026-03-02** `8c167ee47363` — 1 info
  - api operation id `graphql_post` removed and replaced with `post_graphql`
- **2025-06-02** `60812f5416c5` — 2 warning, 2 info
  - removed the optional property `data` from the response with the `400` status
  - removed the optional property `errors` from the response with the `400` status
  - api operation id `post_graphql` removed and replaced with `graphql_post`
  - added the optional property `error` to the response with the `400` status

[Change history](https://skmtc.dev/sourcenetwork/apis/defradb-api/changes/graphql/post.md)

---

[API](https://skmtc.dev/sourcenetwork/apis/defradb-api.md) · [All operations](https://skmtc.dev/sourcenetwork/apis/defradb-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/sourcenetwork/defradb-api/revisions/bf2e90fa690e/schema)
