---
title: "Run a query or mutation"
method: POST
path: "/groups/{groupId}/apps/{appId}/graphql"
tags: ["graphql"]
---

# Run a query or mutation

`POST /groups/{groupId}/apps/{appId}/graphql`

Run a query or mutation as a system user that bypasses
authentication and data access rules. You can access metadata
about your API, including its schema, with an
[introspection](https://graphql.org/learn/introspection/) query.

## Request body

- object
  - `query` string, required — A stringified `.graphql` file that contains one or more valid GraphQL operations for your API. If more than one operation is defined, you must specify which operation to run in `operationName`.
  - `variables` string — A stringified JSON object where each field name maps a value to a variable in the specified operation.
  - `operationName` string — The name of the GraphQL operation specified in `query` to run.

## Response `200`

OK

- object — The result of the specified operation.
  - `data` object, nullable, required — The result of a successful operation. If `null`, the operation had errors.
  - `errors` object[] — A list of errors encountered while running an operation.
    - `message` string, required — A message that describes the error.
    - `locations` object[], required — A list of one or more locations in the operation that caused the error.
      - `line` integer, required
      - `column` integer, required

---

[API](https://skmtc.net/mongodb/apis/mongodb-atlas-app-services-admin-api.md) · [All operations](https://skmtc.net/mongodb/apis/mongodb-atlas-app-services-admin-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/mongodb/mongodb-atlas-app-services-admin-api/revisions/1365ab72bc03/schema)
