# GraphQL

> Mock schema-native queries, mutations, variables, aliases, errors, subscriptions, and persisted queries.

- Canonical URL: https://dotmock.com/docs/guides/graphql
- Capability status: Available
- Last verified: 2026-07-24

## Prerequisites
- A DotMock workspace you can access
- The API ID in $API_ID and its published runtime URL in $MOCK_URL when the example calls the mock

## In this guide
- Define the schema first
- Configure a query with request data
- Use variables and headers for scenarios
- Reuse persistent state across operations
- Test subscriptions as an event sequence
- Dry-run the native operation

## Verified boundaries
- GraphQL dry-runs validate the operation against the workspace schema and do not persist side effects.

Read the canonical guide for its complete examples and expected results: https://dotmock.com/docs/guides/graphql
