Releases
Changelog
Every release of gratos and gratos-server, newest first. The two packages share one version, and each release lists what changed in each.
gratos 0.2.0
No changes in this release.
gratos-server 0.2.0
Minor Changes
Incremental delivery speaks graphql 17's own format beside the 2022 one. A client that sends
Accept: multipart/mixed; incrementalSpec=v0.2getspending,incremental(withid) andcompleted, fromexperimentalExecuteIncrementally, which runs a field selected both deferred and not once.deferSpec=20220824, a baremultipart/mixed, a wildcard or no Accept header still get the 2022 format, and only a range that namesincrementalSpec=v0.2selects the new one; quality values decide when both are listed, and the Content-Type names the format sent.ExecuteInput.incrementalFormatis the negotiated format (undefinedwhen the client accepts no multipart type).incremental()and the default executor run the matching graphql function. An executor of your own that returns incremental results in the other format gets a 500, its result closed unsent.IncrementalResultsnow covers both formats: annotate an object literal you build as one of them (LegacyExperimentalIncrementalExecutionResults, say) if TypeScript cannot tell which.payloadErrors()andmapPayloadErrors()readcompleted[].errorstoo (a failed deferred fragment or stream), somaskErrors(),reportErrors()and the Effect layer's error count cover them.- An
onResultreplacement of graphql 17's initial payload keeps thependingit leaves out, so a hook that rebuilds the initial payload from its data, errors and extensions no longer drops the work it announces. Every other member is the hook's to keep or leave out. - New exports:
INCREMENTAL_SPEC("v0.2") and theIncrementalFormattype.
Trusted documents and an SSE heartbeat.
- The core reads a top-level
documentId(the GraphQL over HTTP persisted documents proposal). AdocumentIdthat is not a string, or one sent with aquery, is a 400. - A new plugin hook,
onReady({ schema, validationRules }), checks every schema before the server serves it, and throws to refuse it: once at startup, after everyonServerhook (a refusal throws fromcreateServer, or fails an async startup), and on every latercontrol.replaceSchema, which then keeps the current schema and rethrows. trustedDocuments({ documents })runs only the documents of a map of id to text, the shape relay-compiler's persisted queries write. It validates every entry inonReady, serves a knowndocumentIdover JSON,multipart/mixedand SSE, and refuses an unknown id (PERSISTED_DOCUMENT_NOT_FOUND) or a query sent as text (PERSISTED_DOCUMENT_REQUIRED) before anything executes.- GraphQL-over-SSE streams send a
:comment line after 30 seconds without an event, while the client reads, so proxies that close idle responses keep them open.createServer({ sseHeartbeatMs })sets the interval, andfalseturns it off. - A failed async startup is logged once, not again for every request.
gratos-server/effect: a subscription's Stream now sees why it stopped. When the client leaves, the Stream (itsStream.onExit, the finalizers of its scope) is interrupted withHttpServerError.ClientAbort, as a field resolver is, instead of a bare interrupt.
- The core reads a top-level
gratos 0.1.0
Minor Changes
The first release of Gratos.
gratosis Grats, the GraphQL server generator for TypeScript, on the TypeScript 7 API: annotate your types and functions with docblock tags, and thegratosCLI writes the GraphQL schema. Resolvers can returnEffect.EffectandStream.Stream, andgratos/devkeeps a dev server up while it rebuilds the schema on every save.gratos-serveris a small, plugin-based GraphQL-over-HTTP server for WebRequestandResponse. It streams@deferand@streamresults and subscriptions over SSE, bounds the request body, can run ongraphql-jit, andgratos-server/effectruns Effect and Stream resolvers with one trace per request and a drained shutdown.Both packages need Node 26.13 or later, and share one version.
gratos-server 0.1.0
Minor Changes
The first release of Gratos.
gratosis Grats, the GraphQL server generator for TypeScript, on the TypeScript 7 API: annotate your types and functions with docblock tags, and thegratosCLI writes the GraphQL schema. Resolvers can returnEffect.EffectandStream.Stream, andgratos/devkeeps a dev server up while it rebuilds the schema on every save.gratos-serveris a small, plugin-based GraphQL-over-HTTP server for WebRequestandResponse. It streams@deferand@streamresults and subscriptions over SSE, bounds the request body, can run ongraphql-jit, andgratos-server/effectruns Effect and Stream resolvers with one trace per request and a drained shutdown.Both packages need Node 26.13 or later, and share one version.