An in-memory data store for GraphQL schemas, version 0.6.0, released under graphql-mocks ecosystem. It provides a stateful, immutable store that can be used standalone with default GraphQL resolvers or integrated with graphql-mocks for end-to-end mocking. Key differentiators include support for relationships, connections, hooks, events, transactions, and validations, all built in TypeScript. Works in both browser and Node.js environments (Node >= 24). Released regularly as part of the graphql-mocks monorepo. Alternative to mock databases or simple in-memory maps, offering GraphQL-aware querying and mutation.
npm install graphql-paperNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a store from a GraphQL schema, seeds initial data, queries users, and performs a mutation with a custom resolver.
Upgrade Node.js to version 24 or later, or use an older version of graphql-paper if compatible.
Use createStore(schema, { resolvers: {...} }) instead of createStore(schema, resolvers).Use import syntax or dynamic import() in CommonJS modules.
Always use store methods (insert, update, delete) or mutate() to change state.
Use import { createStore } from 'graphql-paper' or const { createStore } = await import('graphql-paper');Use import { createStore } from 'graphql-paper' and call createStore(schema, options).Use graphql's buildSchema() or makeExecutableSchema() to create a valid GraphQLSchema first.