Test your GraphQL resolvers under pressure

GraphQL Load Testing

Send realistic GraphQL queries and mutations at scale. Identify slow resolvers, N+1 query problems, and connection pool exhaustion before they affect users.
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
Load test REST and GraphQL APIs at a fixed request rate, with per-second latency and error charts.
WebSocket Load Testing
Load test WebSocket servers with hundreds of concurrent connections. Validate message throughput, latency, and connection stability.
HTTP Load Testing
Run HTTP load tests against any endpoint. GET, POST, PUT and DELETE with custom headers and payloads.

Run this as a plan

Put the scenario in your app's Config/load-plan.json and run it from the narduk-app CLI.
loadtest.dev — Part of the Narduk Enterprises network