Vyriy Preset - GraphQL API
Calm cloud-ready GraphQL application.
This repository is a Yarn workspace monorepo with a reusable GraphQL API package and a runtime workspace that serves it over HTTP.
Create this example
npm create vyriy@latest
Choose the gql preset.
Requirements
- Node.js
>=24.0.0 - Yarn
4.16.0
Workspaces
packages/graphql- reusable@p/graphqlpackage that owns the GraphQL schema, embedded GraphiQL page, and public router export.workspaces/graphql-@w/graphqlruntime workspace that mounts the shared router through@vyriy/handlerand@vyriy/server.
Development
Install dependencies:
yarn install
Start the local GraphQL server:
yarn start:graphql
Open http://localhost:3000 to use GraphiQL, or send a request directly:
curl http://localhost:3000 \
--header 'Content-Type: application/json' \
--data '{"query":"{ hello test { ok message } }"}'
Scripts
yarn start- starts all runtime workspaces.yarn start:graphql- starts the GraphQL HTTP server.yarn build- builds all deployable outputs.yarn build:graphql- builds the GraphQL runtime todist/graphql.yarn test- runs the Jest test suite.yarn lint- runs TypeScript, Prettier, and ESLint checks.yarn check- runs linting, builds, and tests.
GraphQL
The root endpoint is handled by @p/graphql:
GET /serves the embedded GraphiQL page.POST /executes GraphQL requests.
Current schema fields:
type Query {
hello: String
test: Test
}
type Test {
ok: Boolean
message: String
}
type Mutation {
ping(message: String): String
}
See the package and runtime READMEs for the detailed API and deployment notes:
packages/graphql/README.mdworkspaces/graphql/README.md
Project Guidance
These articles describe the development approach behind this preset and provide practical guidance for evolving a project on top of it:
- Calm Development Environment: Node.js, Corepack, Yarn and Static Preview - how to keep the local development environment predictable and easy to reproduce.
- Calm App Structure for the Vyriy Ecosystem - a practical project structure for Vyriy applications: shared configs, small packages, thin workspaces, Storybook docs, tests, and deployable entry points.
- One Handler, Many Runtimes - how @vyriy/handler, @vyriy/router, and @vyriy/server compose a calm Lambda-compatible API that can run locally, in Docker, Fargate-style HTTP runtimes, and AWS Lambda.
- Storybook as Project Documentation - how to use Storybook as living project documentation and a component playground.