Skip to content

GraphQL

A hosted GraphQL mock server with realistic data

Define your schema and get a working GraphQL endpoint with realistic nested data, ready for Apollo, urql, Relay or plain fetch.

Free forever plan · No credit card required

query.graphql
query GetUser {
  user(id: "42") {
    name
    avatar
    orders {
      id
      total
      status
    }
  }
}

Resolver boilerplate

Writing mock resolvers by hand is slow and easy to get wrong.

“String” everywhere

Default mocks return meaningless placeholder values.

Local-only tooling

In-process mocks do not help designers, QA or mobile teams.

What you get

Schema-first

Define types and operations; MockAPI resolves them with generated data.

Realistic nested data

Fields map to 140+ data types so lists and relations look real.

Queries and mutations

Realistic responses for the queries and mutations your client sends, including named operations and aliases.

GraphiQL playground

Explore and test your schema in the browser.

Models shared with REST

Reuse the same models across REST and GraphQL endpoints.

AI-agent ready

Agents can create GraphQL endpoints through the MCP server.

Get started in three steps

  1. 01

    Create a schema

    Write SDL or build types from your existing models.

  2. 02

    Add operations

    Define the queries and mutations your client needs.

  3. 03

    Query the endpoint

    POST queries to https://graphql.mockapi.com with your API key.

FAQ

Common questions

Which GraphQL clients work?

Any spec-compliant client: Apollo Client, urql, Relay, graphql-request or plain fetch.

Can I mock REST and GraphQL in one project?

Yes. Models are shared, so both protocols return the same fields. GraphQL responses are generated on each request and do not read stateful records.

Build against a mock API that behaves like your real one

Create your first endpoint in under two minutes.

Free forever · No credit card required