Test your GraphQL resolvers under pressure

GraphQL Load Testing

Send realistic GraphQL queries and mutations at scale. Use response measurements alongside server traces to investigate slow resolvers, N+1 queries and connection-pool limits.
Standalone k6 example
Adapt this script and run it with k6 against an approved target. loadtest.dev accepts declarative GET/HEAD plans; it does not execute these scripts.
Queries, mutations, and subscriptions
Variable parameterization
Authentication header injection
Per-operation latency tracking
Complexity-based testing scenarios
Works with Apollo, Hasura, and any GraphQL server
graphql-test.js
import http from 'k6/http';
import { check } from 'k6';

export const options = { vus: 50, duration: '3m' };

const query = `
  query GetProducts($limit: Int!) {
    products(limit: $limit) {
      id
      name
      price
      reviews { rating }
    }
  }
`;

export default function () {
  const res = http.post('https://api.example.com/graphql', 
    JSON.stringify({ query, variables: { limit: 20 } }),
    { headers: { 'Content-Type': 'application/json' } }
  );
  check(res, {
    'status 200': (r) => r.status === 200,
    'no errors': (r) => !JSON.parse(r.body).errors,
  });
}

Frequently asked questions

Related guides

API Load Testing
Learn how to test HTTP APIs with standalone k6 scripts, measure latency and failed requests, and choose rates suited to your approved target.
WebSocket Load Testing
Use a standalone k6 WebSocket script to open connections, exchange messages, check responses, and examine behavior under agreed concurrency limits.
HTTP Load Testing
Adapt a standalone k6 HTTP script with request methods, headers and JSON bodies, then inspect latency and failed requests on a target you own.

Use an HTTP plan with loadtest.dev

For estate apps, declare GET/HEAD requests to a verified hostname and submit a plan through the authenticated API.
loadtest.dev — Part of the Narduk Enterprises network