โ† All guides

A free GraphQL mock API in 30 seconds โ€” with GraphiQL built in

You're building a GraphQL frontend โ€” Apollo, urql, Relay, or plain fetch โ€” and the backend isn't ready. Your options today are mostly local: graphql-tools mocks or a @graphql-tools/mock server you wire up yourself, MSW handlers you maintain by hand, or json-graphql-server running in a terminal. All fine on your machine; gone the moment you need a deploy preview, a teammate's laptop, or a workshop.

Every Mockbird project is a hosted GraphQL endpoint as well as a REST one โ€” same records, zero extra setup. Try it right now on the public demo, no signup:

curl https://HOST/m/demo/graphql \
  -H 'content-type: application/json' \
  -d '{"query":"{ products(limit: 2, sortBy: \"price\", order: \"desc\") { id name price reviews { rating body } } }"}'

Or just open /m/demo/graphql in your browser โ€” you get a full GraphiQL IDE with autocomplete and schema docs, pointed at live data.

Make your own

One request creates a seeded multi-resource backend (blog, e-commerce, or SaaS preset โ€” or define your own fields):

curl -X POST https://HOST/api/projects \
  -H 'content-type: application/json' \
  -d '{"name": "my shop", "preset": "ecommerce"}'

The response contains your project id. Your endpoints are then:

https://HOST/m/<id>/products        # REST
https://HOST/m/<id>/graphql         # GraphQL (open in a browser for GraphiQL)
https://HOST/m/<id>/openapi.json    # OpenAPI 3.0 spec

What the schema looks like

Mockbird generates a typed schema from your resources. For an e-commerce project:

You writeYou get
{ products(limit: 5, where: {category: "books"}) { id name price } }filtered, paginated list
{ product(id: 3) { name reviews { rating } } }single record + child records (via the productId convention)
{ review(id: 1) { body product { name } } }parent expansion โ€” any <x>Id field becomes an x object field
{ productsCount(where: {inStock: true}) }totals for pagination UIs
mutation { createProduct(input: {name: "X", price: 9.5}) { id } }real writes โ€” REST sees them too, and your webhooks fire

Introspection is fully on, so GraphQL Code Generator, Apollo devtools, Postman, and Insomnia all work against your mock endpoint:

npx graphql-codegen --config codegen.yml   # schema: https://HOST/m/<id>/graphql

Using it from Apollo Client

import { ApolloClient, InMemoryCache, gql } from "@apollo/client";

const client = new ApolloClient({
  uri: "https://HOST/m/<id>/graphql",
  cache: new InMemoryCache(),
});

const { data } = await client.query({
  query: gql`{ products(limit: 10) { id name price } }`,
});

CORS is on by default, so this works from localhost, CodePen, or a deployed preview with no proxy.

Simulating slowness

Point your client at /m/<id>/graphql?mock_delay=2000 to test loading states. (Error states are easier to test per-operation on the REST side with mock_status โ€” see testing loading & error states.)

Fair-use limits

GraphQL requests share the project's 10,000 requests/day cap. Queries are limited to depth 8 and 8 KB โ€” plenty for real app queries, enough to stop pathological nesting. Everything is free while Mockbird is in beta.

Mock the REST and GraphQL halves of your app from one schema, watch every call in the request inspector, and throw the project away when the real backend lands โ€” or keep it for tests. Create a project โ†’