GraphQL Rest Router (v1.0.0-beta.0) converts an internal GraphQL API into a REST API using a simple DSL, without exposing the full GraphQL schema. It ships with TypeScript types, supports caching (including Redis), generates Swagger/OpenAPI docs, and integrates with Express and Koa. Key differentiators: security against introspection attacks, client-side caching, and a declarative endpoint mapping DSL. Release cadence is irregular; currently in beta.
npm install graphql-rest-routerNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a REST router that exposes three GraphQL queries as REST endpoints with caching and different HTTP methods.
Review the 'Upgrading From Alpha' section in the README; use new method signatures.
Use ESM imports (import) or use dynamic import() in a CJS context.
Ensure the schema file contains the exact operation names used in api.mount().
Pass a Redis client or custom cache store in options.
Define the variable in the query (e.g., $id: ID!) and map it via the : parameter.
Switch to ESM: use import or set type: 'module' in package.json.
Run 'npm install graphql-rest-router' and verify import path.
Use 'import GraphQLRestRouter from ...' without curly braces.
Add 'import fs from 'fs';' at the top.
No dependency data recorded yet.