Credit where due: graphql-faker is a classic β 2,700+ GitHub stars, from the APIs-guru team behind GraphQL Voyager. Its core idea is genuinely elegant: write any GraphQL SDL, sprinkle @fake(type: productName) and @examples directives on the fields, and get a running mock with an interactive editor and a Voyager schema map. Its --extend mode β proxy a real GraphQL API and fake only the fields you're proposing to add β is still one of the best schema-prototyping ideas anyone has shipped.
But if you're on this page, you've probably hit one of two things: the install that doesn't work, or the mock that won't hold still. Both are real. We verified everything below ourselves in August 2026.
graphql-faker's last release β 2.0.0, tagged latest on npm since August 14, 2023 (the same day as the repo's last commit) β is broken in an unusually complete way: the published tarball contains no JavaScript at all. We downloaded it and listed the contents: Dockerfile, LICENSE, README.md, package.json. That's the whole package. Its bin entry points at dist/index.js, which doesn't exist, so after npm install graphql-faker succeeds there is simply no graphql-faker executable in node_modules/.bin.
It gets worse before it gets better: on a default npm setup, npm install graphql-faker often doesn't even finish β the resolver hangs at the idealTree stage backtracking through the old dependency range (we watched it spin at full CPU for 5+ minutes, twice; the repo's open issue #196 "Cannot install graphql-faker" describes the same stall). The repo also has an open issue from February 2024 titled, verbatim, "Any alternatives to this package?" Meanwhile the package still gets 3,557 downloads a week (Aug 18β24, 2026) β thousands of installs of a mock server with no server in it.
The honest first answer if you want to stay on graphql-faker: install a version that contains code, and skip the resolver hang:
# the last releases that actually ship dist/ :
npm install graphql-faker@2.0.0-rc.25 --legacy-peer-deps # last 2.x with code
# or
npm install graphql-faker@1.9.2 --legacy-peer-deps # last stable 1.x
We ran it with a small SDL β a Product type with @fake/@examples directives, a products(limit: Int) query, and createProduct/deleteProduct mutations. Every claim below is observed behavior.
Wall 1: every request invents new data. The same { products { id title } } query returned a completely different set of products each time β different ids, titles, prices, even a different number of items. Fine for eyeballing a UI; hopeless for tests. You can't assert on anything, snapshot anything, or reproduce anything.
Wall 2: arguments are decoration. products(limit: 2) returned lists of length 2, 2, 4, 4, 2, 4 across six calls β the argument is part of the schema, not the behavior. Pagination, filtering and sorting simply don't exist.
Wall 3: you can never test the not-found path. product(id: "does-not-exist") cheerfully returned a fake product. No input reaches a null β the code path where half of real-world GraphQL bugs live is unreachable.
Wall 4: mutations are theater β convincing theater. createProduct(title: "Dyson V15", price: 599) echoed our arguments back in a plausible response objectβ¦ and persisted nothing: the very next query returned fresh random products with no Dyson in sight. deleteProduct returned a coin-flip boolean. A createβread-back test cannot pass against it.
Wall 5: it's a localhost process. The mock lives on your machine. A teammate, a deployed preview, CI, or your phone can't reach it without you running and babysitting a server somewhere. (It also pins graphql@14.7.0, from 2020, into your tree.)
Mockbird works from the other end: instead of a hand-written SDL, you define resources (or one-click a preset) and get a typed GraphQL endpoint and a REST API over the same live data β queries, relations, and mutations that really write:
curl -X POST https://mockbird.mockbird.workers.dev/api/projects \
-H 'content-type: application/json' -d '{"name":"my-api","preset":"ecommerce"}'
# β {"id":"β¦","adminKey":"β¦","baseUrl":"https://mockbird.mockbird.workers.dev/m/β¦"}
# GraphQL endpoint: <baseUrl>/graphql (open it in a browser β embedded GraphiQL)
This transcript ran against the shared demo project before publishing β the exact behaviors graphql-faker can't do:
# deterministic: same query, same data, every time β and limit means limit
curl https://mockbird.mockbird.workers.dev/m/demo/graphql \
-H 'content-type: application/json' \
-d '{"query":"{ products(limit: 2) { id name price } }"}'
# β ids 1 and 2, same records on every call
# the not-found path exists:
# { product(id: 99999) { id } } β {"data":{"product":null}}
# mutations persist:
# mutation { createProduct(input: { name: \"Dyson V15\", price: 599 }) { id } }
# β id 31 β¦ and { product(id: 31) } returns it, REST GET /products/31 returns it,
# mutation { deleteProduct(id: 31) } β true, then product(id: 31) β null
Data is seeded faker-style at create time (realistic names, prices, emails β 30+ field types, no LLM involved) and then it behaves like a database, because it is one.
| graphql-faker | Mockbird | Notes |
|---|---|---|
SDL file + @fake directives | resources with typed fields | schema is generated for you β docs; import an OpenAPI spec or db.json to skip even that |
| random data every request | seeded, persistent records | deterministic β assert, snapshot, reproduce |
products(limit:) ignored | limit/page/sortBy/order/q/where honored | typed where filter input per resource |
| mutations echo args, persist nothing | create/update/delete write to the store | REST and GraphQL see the same data; webhooks fire |
| interactive editor | embedded GraphiQL | GET the /graphql URL in a browser |
| localhost:9002 | hosted URL | shareable with teammates, CI, deployed previews β 10,000 req/project/day free |
| fixed fake data β scenarios | snapshot pinning | save named data states; pin one per request with X-Mockbird-Snapshot β parallel test workers, zero races |
| no failure simulation | ?mock_delay, ?mock_chaos | works on the GraphQL endpoint too (measured 2.1 s with mock_delay=2000) |
--extend real-API proxy mode | no equivalent | honest: graphql-faker's best idea, and we don't have it |
# GraphiQL in your browser:
# https://mockbird.mockbird.workers.dev/m/demo/graphql
curl https://mockbird.mockbird.workers.dev/m/demo/graphql \
-H 'content-type: application/json' \
-d '{"query":"{ products(sortBy: \"price\", order: \"desc\", limit: 2) { id name price } }"}'
# same data over REST β one store, two protocols:
curl 'https://mockbird.mockbird.workers.dev/m/demo/products?sortBy=price&order=desc&limit=2'
| graphql-faker | Mockbird | |
|---|---|---|
| Price | free, open source (MIT) | free while in beta |
| Schema source | any hand-written SDL β unions, interfaces, arbitrary nesting | generated from resources (flat-ish types + relations); no SDL import |
| Data across requests | random every time | deterministic, persistent |
| Arguments (limit/filter/sort) | ignored | honored, incl. typed where |
| Mutations | echo args, persist nothing | really write; visible over REST too |
| Not-found path testable | no β every id resolves to fake data | yes β missing id β null |
| Hosted URL others can hit | no β localhost (Docker image available to self-host) | yes, no signup |
| Extend/proxy a real GraphQL API | excellent (--extend) | none |
| Fake-data directive richness | dozens of @fake types placed per field in SDL | 30+ field types on resource fields |
| Works offline | yes | no |
| Maintenance | last commit Aug 2023; latest npm release ships no code; open "alternatives?" issue since Feb 2024 | actively developed |
Written by the Mockbird maker β bias disclosed. Where graphql-faker genuinely wins: it consumes any SDL you write β if your workflow starts from a hand-crafted schema full of unions and interfaces, Mockbird cannot host that shape today and a patched-up graphql-faker (or a hand-rolled @graphql-tools/mock setup) is the right tool; its @fake directive placement is finer-grained than our field types; --extend proxy mode has no equivalent here; and it runs offline with no request caps. Every claim above was verified by us in August 2026: the 2.0.0 tarball listing came from npm's own registry (four files, no dist/), the behavioral walls from a local run of 2.0.0-rc.25 (port 9002, SDL as described), download counts from npm's public API for the Aug 18β24, 2026 week, and the Mockbird transcript from the live demo project before publishing. If any of this changes, we'll update the page.
Full GraphQL reference in the docs. More guides: free GraphQL mock API Β· @graphql-tools/mock alternative Β· json-graphql-server alternative Β· Prism alternative Β· mountebank alternative Β· deterministic test data Β· free mock API tools compared. Create your API β