@reventlessdev/reventless-graphql-server
v1.0.0-alpha.3
Published
Transport-neutral GraphQL server runtime for Reventless: schema-from-fragments, resolver registration, an HTTP + graphql-ws listener, and a subscription fan-out bridge with a pluggable PubSub backend
Readme
@reventlessdev/reventless-graphql-server
⚠️ Alpha. APIs and on-disk formats can change without notice between releases. Pin exact versions and expect breaking changes.
A transport-neutral GraphQL server runtime shared across
Reventless — a spec-driven, event-sourced CQRS
framework written in ReScript. It stands up
Yoga-backed GraphQL servers from
stitched SDL fragments plus a resolver map, with an optional graphql-ws
WebSocket endpoint and a subscription fan-out bridge over a pluggable PubSub
backend.
What it provides
Two ReScript modules:
GraphQL_ServerInstance— a server-instance factory. Each instance keeps an isolated registry, so a backend can stand up one or more independent servers from SDL fragments + a resolver dict, exposed over HTTP with an optionalgraphql-wsWebSocket transport for subscriptions. Includes registry diagnostics (registered type/field/resolver inventories and SDL-vs-resolver mismatch reporting).GraphQL_SubscriptionBridge— transport-neutral wiring between a server instance and a PubSub backend forgraphql-wsfan-out. The topic vocabulary is fixed to core's generated subscription SDL (raw event-stream and state-changed fields), but the PubSub instance is a parameter: an in-process server passescreatePubSub(), a multi-process gateway passes a cross-process implementation of the same interface.
Where it fits
reventless-graphql-server builds on
@reventlessdev/reventless-core
(for the subscription-schema topic vocabulary and logging) and the framework's
graphql-yoga bindings. It is the reusable serving layer that storage/deployment
adapters and local platforms wire their generated schema and resolvers into; it
holds no domain or storage logic of its own.
Install
pnpm add @reventlessdev/reventless-graphql-serverRegister it as a ReScript dependency in rescript.json:
{
"dependencies": ["@reventlessdev/reventless-graphql-server"]
}Requires ReScript ^12.3.0 (peer dependency).
Links
- 📚 Documentation — docs.reventless.dev
- 📦 Repository — ReventlessDev/reventless-core
- 📋 Changelog
