Graphql data simulation
Skill kjuhwa/skills-hub/skills/workflow/graphql-data-simulation
Self-correcting knowledge corpus for Claude Code — 9 stable shape clusters, bias-correction pipeline baked into contribution flow. 47 papers, 45 techniques, 1.1k skills.
npx -y skills add kjuhwa/skills-hub --skill graphql-data-simulationAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Faking GraphQL responses, schemas, and subscription streams for offline demos without a live server
SKILL.md
1.9 KB, 362 tokens by cl100k_base, as published. Nobody here has run it
graphql-data-simulation
For demo apps that showcase GraphQL tooling, running a real Apollo/Yoga server is overkill and brittle in static hosting. Instead, simulate in three layers. Schema layer: ship a hand-written SDL string (or a small JSON introspection dump) as a module export — this is what the schema-graph and query-builder introspect against. Keep it representative (object types, interfaces, unions, enums, input types, custom scalars, @deprecated) so every UI branch has something to render. Query execution layer: implement a tiny resolver over a seeded in-memory dataset, or a Map<queryHash, fixtureResponse> lookup keyed by the normalized query string. Return results via Promise.resolve() wrapped in an artificial setTimeout so loading states actually appear.
Subscription layer: simulate push with setInterval emitting synthetic events into an EventTarget or RxJS Subject, and have the feed component subscribe to that. Vary the cadence (burst of 5 in 200ms, then idle 3s) so backpressure, batching, and deduplication UI behaviors are visible in a demo. Seed event payloads from a small pool with deterministic-but-jittered fields (timestamps Date.now(), IDs from a counter, enum values cycled) so the feed looks alive without being random noise.
Gate the simulation behind a single USE_MOCK_GRAPHQL flag or a createClient({mode: 'mock' | 'real'}) factory so the same components run against a real endpoint later with zero changes. Keep fixtures colocated with the mock client (mocks/schema.graphql, mocks/fixtures.ts) — not scattered across components — so updating the demo story is a one-file edit.