grafserv
1.0.0-rc.7
Patch Changes
- #2990
5d408bd
Thanks @benjie! - No code changes. Updates the
release process, cleans up package.json, uses fixed identifiers for peer
dependencies (unless they're explicit dependencies also). Hopefully move to
trusted publishing. - Updated dependencies
[5d408bd]:- graphile-config@1.0.0-rc.6
- ruru@2.0.0-rc.7
- @graphile/lru@5.0.0-rc.5
1.0.0-rc.6
Patch Changes
-
#2940
04a7a75
Thanks @benjaie! - Ensure unambiguous koa
context type -
#2937
8f50146
Thanks @benjie! - Eliminate dangling promises,
reducing chance of process exit due to unhandled promise rejection. -
#2945
0971ae0
Thanks @benjaie! - Load ruru asynchronously, no
need to load if not used. -
Updated dependencies
[8f50146,
5e83533,
03e5ce5,
f213a8e]:- graphile-config@1.0.0-rc.5
- grafast@1.0.0-rc.7
- ruru@2.0.0-rc.6
1.0.0-rc.5
Patch Changes
-
a3722d6
Thanks @benjie! - Refactor to enable TypeScript
options rewriteRelativeImportExtensions and erasableSyntaxOnly (including
using .ts extensions in source code) -
#2927
1d5d63e
Thanks @benjie! - Added Fastify v5 adaptor
(copy/paste of v4 adaptor) -
Updated dependencies
[9eb3829,
a3722d6,
ebe1d22,
be9792b,
5fc379e]:- graphile-config@1.0.0-rc.4
- grafast@1.0.0-rc.5
- ruru@2.0.0-rc.5
- @graphile/lru@5.0.0-rc.4
1.0.0-rc.4
Patch Changes
-
#2873
0772086
Thanks @benjie! - Update TypeScript configuration
to support Node 22 minimum -
#2887
a565503
Thanks @benjie! - Internals reworked to use
Promise.withResolvers()instead of removeddefer()function. -
#2878
d9ccc82
Thanks @benjie! - Eliminate a number of potential
unhandled promise rejection issues by adding noop-handling. -
#2888
1a56db2
Thanks @benjaie! - Node v22+ is required for
this module. -
Updated dependencies
[44555c7,
1e45a3d,
0772086,
1606298,
a565503,
d9ccc82,
1a56db2,
eafa3f0,
2e770df,
d758351,
b27c562,
f23f0cf]:- grafast@1.0.0-rc.4
- ruru@2.0.0-rc.4
- graphile-config@1.0.0-rc.3
- @graphile/lru@5.0.0-rc.3
1.0.0-rc.3
Patch Changes
-
Updated dependencies
[c4f2e52]:- grafast@1.0.0-rc.3
- ruru@2.0.0-rc.3
1.0.0-rc.2
Patch Changes
-
Updated dependencies
[f3a9869,
68f61cd,
a82e6fa]:- grafast@1.0.0-rc.2
- graphile-config@1.0.0-rc.2
- ruru@2.0.0-rc.2
- @graphile/lru@5.0.0-rc.2
1.0.0-rc.1
Patch Changes
-
#2777
6a4e3b9
Thanks @benjie! - Implement queue for
watchGather/watchSchema/etc and integrate with grafserv'ssetPreset
middleware. Promises returned by such now delay schema application, preventing
growing concurrent work. -
#2777
c6cbe61
Thanks @benjie! - Tighten our public API surface
by:- renaming
EventStreamHeandlerResultto the correctly spelt
EventStreamHandlerResult(and keeping only a deprecated alias for the old
name) - dropping the long-deprecated Grafast exports
InterfaceOrUnionPlans(use
InterfacePlanorUnionPlanas appropriate),deepEval(should be
applyTransforms) andDeepEvalStep(should beApplyTransformsStep) - removing the
PgAdaptorOptionsalias in favour ofPgAdaptorSettings - deleting the PostGraphile preset aliases
postgraphilePresetAmbershould be
PostGraphileAmberPreset) andPgRelayPreset(should be
PostGraphileRelayPreset), and updating all first-party usage to the
canonical names
- renaming
-
#2792
f23e0e0
Thanks @malyzeli! - Add support for event
streams (e.g. schema watch mode) to Hono Grafserv adaptor. (Thanks @malyzeli!) -
Updated dependencies
[abb623d,
7b86454,
42a0785,
d196d60,
c6cbe61,
d4ac603,
8a5a7c5,
ea0135f,
b6821f5]:- grafast@1.0.0-rc.1
- graphile-config@1.0.0-rc.1
- ruru@2.0.0-rc.1
- @graphile/lru@5.0.0-rc.1
0.1.1-beta.29
Patch Changes
-
#2730
4c3cf22
Thanks @benjie! - Updategraphqlversion range -
#2713
a26ad3e
Thanks @benjie! - Fix bug with error masking (or
lack thereof!) in subscriptions -
#2142
ab96e5f
Thanks @benjie! - Support for@deferand
@streamno longer requiresgraphql@16.1.0-experimental-stream-defer.6.
graphql@^16.9.0should now work, since we ponyfill everything we need. -
Updated dependencies
[4c3cf22,
71e0af2,
ab96e5f,
278b4d3,
eaa771b,
d0c15cc,
bffbb77,
c48ca48]:- grafast@0.1.1-beta.27
- ruru@2.0.0-beta.31
0.1.1-beta.28
Patch Changes
-
#2690
208364f
Thanks @benjie! - Add keepalive to grafserv
websocket connections. -
#2694
13513dd
Thanks @benjie! - Add support foronErrorRFC
withPROPAGATE,NULLandHALTbehaviors implemented. -
#2678
6dafac1
Thanks @benjie! - Remove peer dependency
optionality in an attempt to satisfy pnpm's installation algorithms -
#2666
33c7784
Thanks @valerii15298! - Fix support for
HTTP 304 in @whatwg/node adaptor, thereby fixing serving of static assets with
ETag headers (thanks @valerii15298!) -
#2657
f83b191
Thanks @dependabot! - Add support for
Koa v3 (via v2 code) and update package exports. -
Updated dependencies
[cfd4c3c,
c3f9c38,
13513dd,
bc2b188,
c13813e,
4a9072b,
6dafac1,
e15f886,
34efed0,
185d449]:- graphile-config@0.0.1-beta.18
- grafast@0.1.1-beta.26
- ruru@2.0.0-beta.30
0.1.1-beta.27
Patch Changes
-
#2578
1d76d2f
Thanks @benjie! - 🚨 Ruru has been "rebuilt"!
The loading methods and APIs have changed!Ruru is now built on top of GraphiQL v5, which moves to using the Monaco
editor (the same editor used in VSCode) enabling more familiar keybindings and
more features (e.g. press F1 in the editor to see the command palette, and you
can now add comments in the variables JSON). This has required a
rearchitecture to Ruru's previously "single file" approach since Monaco uses
workers which require additional files.In this release we have embraced the bundle splitting approach. We now bundle
bothprettierandmermaid, and they are now loaded on-demand.Usage instructions for all environments have had to change since we can no
longer serve Ruru as a single HTML file. We now include helpers for serving
Ruru's static files from whatever JS-based webserver you are using.We've also added some additional improvements:
- Formatting with prettier now maintains the cursor position
(Ctrl-Shift-P/Meta-Shift-P/Cmd-Shift-Pdepending on platform) - All editors are now formatted, not just the GraphQL editor
- Prettier and mermaid should now work offline
- Even more GraphiQL props are now passed through, including
inputValueDeprecationandschemaDeprecationwhich you can set to false
if your GraphQL server is, ahem, a little behind the GraphQL spec draft.
🚨 Changes you need to make: 🚨
- If you are using Ruru directly (i.e. importing from
ruru/server), please
see the new Ruru README for setup instructions, you'll want to switch out
your previous setup. In particular,ruru/bundleno longer exists and you
now need to serve the static files (viaruru/static). defaultHTMLPartsis no more; insteadconfig.htmlParts(also
preset.ruru.htmlPartsfor Graphile Config users) now allows the entries to
be callback functions reducing boilerplate:(alternatively you can use-import { defaultHTMLParts } from "ruru/server"; const config = { htmlParts: { - metaTags: defaultHTMLParts.metaTags + "<!-- local override -->", + metaTags: (base) => base + "<!-- local override -->", } }
makeHTMLParts(config))- Grafserv users:
plugin.grafserv.middleware.ruruHTMLPartsis renamed to
ruruHTMLand wraps the generation of the HTML - simply trimPartsfrom
the name and be sure callingnext()is the final line of the functionconst plugin = { grafserv: { middleware: { - ruruHTMLParts(next, event) { + ruruHTML(next, event) { const { htmlParts, request } = event; htmlParts.titleTag = `<title>${escapeHTML( "Ruru | " + request.getHeader("host"), )}</title>`; return next(); }, }, }, };
Additional changes:
RuruConfig.clientConfighas been added for props to explicitly pass to
Ruru making it explicit that these will be sent to the clientRuruServerConfighas deprecated the client optionseditorTheme,
debugToolsandeventSourceInitat the top level; instead these should be
passed viaRuruServerConfig.clientConfigmaking it explicit these will be
sent to the client and expanding to cover more propsconst config = { endpoint: "/graphql", + clientConfig: { editorTheme: "dark", + }, }
- Formatting with prettier now maintains the cursor position
-
#2622
a480f6d
Thanks @benjie! - 🚨 Since Ruru now needs to
serve static assets due to the upgrade to GraphiQL v5 and Monaco, we've had to
extend Grafserv to do so. We've (theoretically) added support in the H3, Hono
and Fastify adaptors, along with the base node adaptor (used by Node, Express,
Koa); however - if you have your own adaptor for a different server, you'll
need to be sure to call the.graphiqlStaticHandlerfor URLs that start with
dynamicOptions.graphiqlStaticPath.Whilst at it, we've added more places where headers can be added, and we've
added a new "raw" ResultType which can be used to serve a Node Buffer with
entirely custom headers (e.g. set your ownContent-Type). -
#2600
ad588ec
Thanks @benjie! - Mark all
peerDependencies=dependencies modules as optional peerDependencies to make
pnpm marginally happier hopefully. -
Updated dependencies
[1d76d2f,
c54c6db,
24d379a,
ad588ec]:- ruru@2.0.0-beta.25
- grafast@0.1.1-beta.24
0.1.1-beta.26
Patch Changes
-
#2577
1f4544d
Thanks @benjie! - Fix bug in Hono adaptor where
Content-Type header might be set more than once. -
Updated dependencies
[00b3b8b,
0c6b1f1,
826f2cb,
5311f9c,
e0cdabe,
faee38b]:- ruru@2.0.0-beta.24
- graphile-config@0.0.1-beta.17
- grafast@0.1.1-beta.23
0.1.1-beta.25
Patch Changes
-
#2444
192a27e08763ea26607344a2ea6c7f5c595cc2a3
Thanks @benjie! - Upgrade to Mermaid 11, and
reduce verbosity of polymorphism in plan diagrams. -
#2433
6ef6abce15936a896156d5316020df55cf7d18e3
Thanks @benjie! - Add
ctx.ws?.normalizedConnectionParamswhich can be treated as headers (i.e. has
lower-cased keys). -
#2437
873b24dc70cea68e236e5dcf5bc7ff8f46fa43fe
Thanks @benjie! - Naked GraphQL errors (such as
those you'd see from coercion) are now treated as safe to output. -
#2288
eb771be5e8b06a0cd53476cb36495e7e1aca56b7
Thanks @kzlar! - Add@whatwg-node/serverHTTP
adaptor, thanks to @kzlar 🎉 -
#2482
459e1869a2ec58925b2bac5458af487c52a8ca37
Thanks @benjie! - Minimum version of Node.js
bumped to Node 22 (the latest LTS). -
Updated dependencies
[0e36cb9077c76710d2e407830323f86c5038126e,
c0c3f48fa9f60cb9a4436ea135979b779ecc71ec,
cef9a37f846b4af105ac20960530d65c9f44afa9,
56ce94a847c6a4094643665cbf5d3712f56140b6,
192a27e08763ea26607344a2ea6c7f5c595cc2a3,
6ef6abce15936a896156d5316020df55cf7d18e3,
0239c2d519300a72f545e0db7c371adae4ade2a9,
0ea439d33ccef7f8d01ac5f54893ab2bbf1cbd4d,
997c49648b62a93e5b915c65c49cdad1654bef3e,
8034614d1078b1bd177b6e7fcc949420614e3245,
459e1869a2ec58925b2bac5458af487c52a8ca37,
c350e49e372ec12a4cbf04fb6b4260e01832d12b,
3176ea3e57d626b39613a73117ef97627370ec83,
46a42f5547c041289aa98657ebc6815f4b6c8539,
be3f174c5aae8fe78a240e1bc4e1de7f18644b43,
576fb8bad56cb940ab444574d752e914d462018a,
9f459101fa4428aa4bac71531e75f99e33da8e17,
921665df8babe2651ab3b5886ab68bb518f2125b,
78bb1a615754d772a5fda000e96073c91fa9eba7,
ab0bcda5fc3c136eea09493a7d9ed4542975858e,
455f4811d37ad8fff91183c7a88621bcf9d79acf,
45adaff886e7cd72b864150927be6c0cb4a7dfe8]:- grafast@0.1.1-beta.22
- ruru@2.0.0-beta.23
- graphile-config@0.0.1-beta.16
- @graphile/lru@5.0.0-beta.4
0.1.1-beta.24
Patch Changes
- Updated dependencies
[658d46c9a5b246e3beb4ba2a004334278f7bb24d]:- ruru@2.0.0-beta.22
0.1.1-beta.23
Patch Changes
- Updated dependencies
[d34014a9a3c469154cc796086ba13719954731e5,
98516379ac355a0833a64e002f3717cc3a1d6473,
f8602d05eed3247c90b87c55d7af580d1698effc,
65df25534fa3f787ba2ab7fd9547d295ff2b1288,
1b3c76efd27df73eab3a5a1d221ce13de4cd6b1a,
3c0a925f26f10cae627a23c49c75ccd8d76b60c8,
fcaeb48844156e258a037f420ea1505edb50c52a,
68926abc31c32ce527327ffbb1ede4b0b7be446b,
4b49dbd2df3b339a2ba3f1e9ff400fa1a125298b,
d7950e8e28ec6106a4ce2f7fe5e35d88b10eac48,
c8f1971ea4198633ec97f72f82abf65089f71a88,
dd3d22eab73a8554715bf1111e30586251f69a88,
a120a8e43b24dfc174950cdbb69e481272a0b45e,
84f06eafa051e907a3050237ac6ee5aefb184652,
4a3aeaa77c8b8d2e39c1a9d05581d0c613b812cf,
0fc2db95d90df918cf5c59ef85f22ac78d8000d3,
90e81a5deeae554a8be2dd55dcd01489860e96e6,
c59132eb7a93bc82493d2f1ca050db8aaea9f4d1,
7c38cdeffe034c9b4f5cdd03a8f7f446bd52dcb7,
728888b28fcd2a6fc481e0ccdfe20d41181a091f,
f4f39092d7a51517668384945895d3b450237cce,
5cf3dc9d158891eaf324b2cd4f485d1d4bbb6b5e,
83d3b533e702cc875b46ba2ca02bf3642b421be8,
7001138c38e09822ad13db1018c62d2cac37941e,
e9e7e33665e22ec397e9ead054d2e4aad3eadc8c,
bb6ec8d834e3e630e28316196246f514114a2296,
2b1918d053f590cdc534c8cb81f7e74e96c1bbe6,
d1ecb39693a341f85762b27012ec4ea013857b0c,
042ebafe11fcf7e2ecac9b131265a55dddd42a6d,
fa005eb0783c58a2476add984fbdd462e0e91dbe,
df0e5a0f968cf6f9ae97b68745a9a2f391324bf5,
ef4cf75acd80e6b9c700c2b5a7ace899e565ef7f,
c041fd250372c57601188b65a6411c8f440afab6,
629b45aab49151810f6efc18ac18f7d735626433,
6d19724330d50d076aab9442660fa8abddd095cb,
ca5bc1a834df7b894088fb8602a12f9fcff55b38,
da6f3c04efe3d8634c0bc3fcf93ac2518de85322,
00d79e6f5608affc3f36bb0ce4ca2547230174e7,
f0bc64b71914dfdd3612f4b65370401fd85b97bc]:- grafast@0.1.1-beta.21
- graphile-config@0.0.1-beta.15
- ruru@2.0.0-beta.21
0.1.1-beta.22
Patch Changes
- Updated dependencies
[fc9d64eb8,
a2dbad945,
31078842a,
5a0ec31de,
ba2847f3e]:- grafast@0.1.1-beta.20
- ruru@2.0.0-beta.20
0.1.1-beta.21
Patch Changes
- Updated dependencies
[83c546509]:- graphile-config@0.0.1-beta.14
- grafast@0.1.1-beta.19
- ruru@2.0.0-beta.19
0.1.1-beta.20
Patch Changes
- Updated dependencies
[7580bc16a,
b336a5829]:- graphile-config@0.0.1-beta.13
- grafast@0.1.1-beta.18
- ruru@2.0.0-beta.18
0.1.1-beta.19
Patch Changes
-
#2252
866673e14
Thanks @benjie! - Overhaul maskError types to
return GraphQLFormattedError. -
#2240
9a0f9e78c
Thanks @benjie! - Adopt new MiddlewareHandlers
type for simplicity, and in doing so fix type of middleware (for plugins) that
incorrectly unwrapped promise resulting in TypeScript incorrectly suggesting
thatawaitwas not necessary. -
Updated dependencies
[69ab227b5,
38163c86a,
d13b76f0f,
b167bd849,
6a13ecbd4]:- grafast@0.1.1-beta.17
- ruru@2.0.0-beta.17
- graphile-config@0.0.1-beta.12
0.1.1-beta.18
Patch Changes
- #2204
bf2a2e72a
Thanks @Dodobibi! - Overhaul websocket support
in nuxt/h3 server adaptor. Removes experimental methods since they are no
longer needed. Docs have been updated - please follow the docs. Any issues,
please let us know (or better: open a PR!) - Updated dependencies
[5626c7d36,
76c7340b7]:- graphile-config@0.0.1-beta.11
- grafast@0.1.1-beta.16
- ruru@2.0.0-beta.16
0.1.1-beta.17
Patch Changes
- Updated dependencies
[d5834def1,
42b982463,
884a4b429,
38835313a,
cc0941731,
b0865d169,
8b472cd51,
9cd9bb522]:- grafast@0.1.1-beta.15
- graphile-config@0.0.1-beta.10
- ruru@2.0.0-beta.15
0.1.1-beta.16
Patch Changes
0.1.1-beta.15
Patch Changes
- Updated dependencies
[807650035]:- grafast@0.1.1-beta.13
- ruru@2.0.0-beta.14
0.1.1-beta.14
Patch Changes
-
#2097
61f8bbca5
Thanks @FelixZY! - Improve logging of masked
errors (thanks @FelixZY) -
Updated dependencies
[1bd50b61e,
4e102b1a1,
7bb1573ba,
18addb385,
6ed615e55,
b25cc539c,
867f33136,
cf535c210,
acf99b190,
4967a197f,
1908e1ba1,
084d80be6]:- grafast@0.1.1-beta.12
- ruru@2.0.0-beta.14
0.1.1-beta.13
Patch Changes
-
#2071
582bd768f
Thanks @benjie! -GrafastExecutionArgsnow
acceptsresolvedPresetandrequestContextdirectly; passing these through
additional arguments is now deprecated and support will be removed in a future
revision. This affects:grafast()execute()subscribe()hookArgs()
graphile-confighas gained a middleware system which is more powerful than
it's AsyncHooks system. Old hooks can be emulated through the middleware
system safely since middleware is a superset of hooks' capabilities.
applyHookshas been renamed toorderedApply(because it applies to more
than just hooks), callingapplyHookswill still work but is deprecated.🚨
grafastno longer automatically reads yourgraphile.config.tsor
similar; you must do that yourself and pass theresolvedPresetto grafast
via theargs. This is to aid in bundling of grafast since it should not need
to read from filesystem or dynamically load modules.grafastno longer outputs performance warning when you set
GRAPHILE_ENV=development.🚨
plugin.grafast.hooks.argsis nowplugin.grafast.middleware.prepareArgs,
and the signature has changed - you must be sure to call thenext()function
and ctx/resolvedPreset can be extracted directly fromargs:const plugin = { grafast: { - hooks: { + middleware: { - args({ args, ctx, resolvedPreset }) { + prepareArgs(next, { args }) { + const { requestContext: ctx, resolvedPreset } = args; // ... + return next(); } } } }Many more middleware have been added; use TypeScript's autocomplete to see
what's available until we have proper documentation for them.plugin.grafserv.hooks.*are still supported but deprecated; instead use
middlewareplugin.grafserv.middleware.*(note that call signatures have
changed slightly, similar to the diff above):hooks.init->middleware.setPresethooks.processGraphQLRequestBody->middleware.processGraphQLRequestBodyhooks.ruruHTMLParts->middleware.ruruHTMLParts
A few TypeScript types related to Hooks have been renamed, but their old names
are still available, just deprecated. They will be removed in a future update:HookObject->FunctionalityObjectPluginHook->CallbackOrDescriptorPluginHookObject->CallbackDescriptorPluginHookCallback->UnwrapCallback
-
Updated dependencies
[582bd768f]:- graphile-config@0.0.1-beta.9
- grafast@0.1.1-beta.11
- ruru@2.0.0-beta.13
0.1.1-beta.12
Patch Changes
0.1.1-beta.11
Patch Changes
- Updated dependencies
[437570f97]:- grafast@0.1.1-beta.9
- ruru@2.0.0-beta.12
0.1.1-beta.10
Patch Changes
- Updated dependencies
[bd5a908a4]:- grafast@0.1.1-beta.8
- ruru@2.0.0-beta.12
0.1.1-beta.9
Patch Changes
-
#2046
a5a0816bd
Thanks @benjie! - Massive refactor of Grafserv
internals. -
Updated dependencies
[357d475f5,
3551725e7,
80836471e,
a5c20fefb,
1ce08980e,
dff4f2535,
a287a57c2,
2fe56f9a6,
fed603d71,
ed6e0d278,
e82e4911e,
42ece5aa6,
e0d69e518,
db8ceed0f,
6699388ec,
966203504,
c1645b249,
ed8bbaa3c,
a0e82b9c5,
14e2412ee,
57ab0e1e7,
8442242e4,
64ce7b765,
cba842357,
2fa77d0f2]:- grafast@0.1.1-beta.7
- graphile-config@0.0.1-beta.8
- ruru@2.0.0-beta.12
0.1.1-beta.8
Patch Changes
0.1.1-beta.7
Patch Changes
-
#1937
c21252541
Thanks @benjie! - ExportdefaultMaskErrorfrom
grafserv. -
Updated dependencies
[63dd7ea99,
d801c9778,
ef44c29b2,
941e28003,
068be2f51,
5de3e86eb]:- grafast@0.1.1-beta.5
- ruru@2.0.0-beta.11
- graphile-config@0.0.1-beta.7
0.1.1-beta.6
Patch Changes
-
#1903
de7add402
Thanks @benjie! - Fix bug where stack traces are
added to masked errors -
Updated dependencies
[a2176ea32,
886833e2e]:- grafast@0.1.1-beta.4
- ruru@2.0.0-beta.10
0.1.1-beta.5
Patch Changes
- Updated dependencies
[0df5511ac]:- graphile-config@0.0.1-beta.6
- grafast@0.1.1-beta.3
- ruru@2.0.0-beta.10
0.1.1-beta.4
Patch Changes
-
#1877
8a0cdb95f
Thanks @benjie! - Move 'declare global' out of
'interfaces.ts' and into 'index.ts' or equivalent. Should make TypeScript more
aware of these types. -
#1849
995e25035
Thanks @TimoStolz! - Tweak websocket
integration with Fastify:wsHandlersare only allowed if method isGET. -
Updated dependencies
[3fdc2bce4,
aeef362b5,
8a76db07f,
8a0cdb95f,
1c9f1c0ed]:- grafast@0.1.1-beta.2
- graphile-config@0.0.1-beta.5
- ruru@2.0.0-beta.9
0.1.1-beta.3
Patch Changes
-
#1807
9696a1b08
Thanks @innermatrix! - Export lambda server
fromgrafserv/lambda/v1 -
Updated dependencies
[49fcb0d58,
7aef73319]:- grafast@0.1.1-beta.1
- graphile-config@0.0.1-beta.4
- ruru@2.0.0-beta.8
0.1.1-beta.2
Patch Changes
- Updated dependencies
[3dd5d86d6]:- ruru@2.0.0-beta.7
0.1.1-beta.1
Patch Changes
-
781a89758
Thanks @benjie! - Change the unimplemented status
code from 503 to 501. -
#1777
a38e650d6
Thanks @innermatrix! - Added AWS lambda
adapter for grafserv -
Updated dependencies
[ebb0b817e]:- ruru@2.0.0-beta.6
0.1.1-beta.0
Patch Changes
-
#1781
2d31f058b
Thanks @benjie! - Improve handling of errors in
websocket server. -
Updated dependencies
[4a4d26d87,
b2bce88da,
861a8a306]:- grafast@0.1.1-beta.0
- ruru@2.0.0-beta.5
0.0.1-beta.9
Patch Changes
-
#514
c9848f693
Thanks @benjie! - Update package.json repository
information -
Updated dependencies
[c9848f693,
ede1092fe,
566983fbd,
409bf6071]:- graphile-config@0.0.1-beta.3
- grafast@0.0.1-beta.8
- ruru@2.0.0-beta.5
- @graphile/lru@5.0.0-beta.3
0.0.1-beta.8
Patch Changes
- Updated dependencies
[4c39d7c0b]:- ruru@2.0.0-beta.4
0.0.1-beta.7
Patch Changes
- Updated dependencies
[3700e204f]:- grafast@0.0.1-beta.7
- ruru@2.0.0-beta.3
0.0.1-beta.6
Patch Changes
-
#496
c9bfd9892
Thanks @benjie! - Update dependencies (sometimes
through major versions). -
Updated dependencies
[c9bfd9892,
1867d365f,
e613b476d,
c747d91e9]:- graphile-config@0.0.1-beta.2
- grafast@0.0.1-beta.6
- ruru@2.0.0-beta.3
- @graphile/lru@5.0.0-beta.2
0.0.1-beta.5
Patch Changes
0.0.1-beta.4
Patch Changes
-
#463
22fa6230a
Thanks @benjie! - Add experimental support for h3
server to grafserv. -
#461
fa8cfcf9b
Thanks @benjie! - Export
getBodyFromFrameworkBodyhelper, and a number of types. -
Updated dependencies
[f9cc88dc4]:- grafast@0.0.1-beta.4
0.0.1-beta.3
Patch Changes
- Updated dependencies
[46cd08aa1]:- grafast@0.0.1-beta.3
0.0.1-beta.2
Patch Changes
- Updated dependencies
[23bd3c291]:- grafast@0.0.1-beta.2
0.0.1-beta.1
Patch Changes
-
Updated dependencies
[cbd987385]:- grafast@0.0.1-beta.1
- ruru@2.0.0-beta.1
- graphile-config@0.0.1-beta.1
- @graphile/lru@5.0.0-beta.1
0.0.1-alpha.16
Patch Changes
- Updated dependencies
[dfefdad3c]:- grafast@0.0.1-alpha.16
0.0.1-alpha.15
Patch Changes
-
#422
9f87a26b1
Thanks @benjie! - Comments enabled in released
packages -
Updated dependencies
[ea003ca3a,
57d88b5fa,
a22830b2f,
9f87a26b1]:- grafast@0.0.1-alpha.15
- graphile-config@0.0.1-alpha.7
- ruru@2.0.0-alpha.11
0.0.1-alpha.14
Patch Changes
- Updated dependencies
[d99d666fb]:- grafast@0.0.1-alpha.14
0.0.1-alpha.13
Patch Changes
- #418
9ab2adba2
Thanks @benjie! - Overhaul peerDependencies and
dependencies to try and eliminate duplicate modules error. - Updated dependencies
[620f9e07e,
1882e0185,
881672305,
e5012f9a1,
9ab2adba2,
47f6f018b,
ff4395bfc,
502b23340]:- grafast@0.0.1-alpha.13
- ruru@2.0.0-alpha.10
0.0.1-alpha.12
Patch Changes
- Updated dependencies
[9281a2d88,
675b7abb9,
c5050dd28,
0d1782869]:- grafast@0.0.1-alpha.12
- graphile-config@0.0.1-alpha.6
- ruru@2.0.0-alpha.9
0.0.1-alpha.11
Patch Changes
- Updated dependencies
[644938276]:- graphile-config@0.0.1-alpha.5
- grafast@0.0.1-alpha.11
- ruru@2.0.0-alpha.8
0.0.1-alpha.10
Patch Changes
- #399
409581534
Thanks @benjie! - Change many of the dependencies
to be instead (or also) peerDependencies, to avoid duplicate modules. - Updated dependencies
[409581534,
b7533bd4d,
9feb769c2,
7573bf374,
2c8586b36,
c43802d74,
b118b8f6d,
9008c4f87,
e8c81cd20]:- grafast@0.0.1-alpha.10
- ruru@2.0.0-alpha.7
0.0.1-alpha.9
Patch Changes
- Updated dependencies
[56237691b,
ed1982f31,
1fe47a2b0,
198ac74d5,
6878c589c,
2ac706f18]:- grafast@0.0.1-alpha.9
- graphile-config@0.0.1-alpha.4
- ruru@2.0.0-alpha.6
0.0.1-alpha.8
Patch Changes
- Updated dependencies
[dd3ef599c]:- grafast@0.0.1-alpha.8
0.0.1-alpha.7
Patch Changes
-
#346
9ddaaaa96
Thanks @benjie! - Fix a bug in subscriptions
where variables were not recognized -
Updated dependencies
[5c9d32264,
2fcbe688c,
3a984718a,
adc7ae5e0]:- grafast@0.0.1-alpha.7
- graphile-config@0.0.1-alpha.3
- ruru@2.0.0-alpha.5
0.0.1-alpha.6
Patch Changes
- Updated dependencies
[f75926f4b]:- grafast@0.0.1-alpha.6
0.0.1-alpha.5
Patch Changes
0.0.1-alpha.4
Patch Changes
0.0.1-alpha.3
Patch Changes
-
7f857950a
Thanks @benjie! - Upgrade to the latest
TypeScript/tslib -
Updated dependencies
[98ae00f59,
2389f47ec,
2fe247f75,
e91ee201d,
865bec590,
7f857950a,
d39a5d409]:- @graphile/lru@5.0.0-alpha.2
- grafast@0.0.1-alpha.3
- ruru@2.0.0-alpha.3
- graphile-config@0.0.1-alpha.2
0.0.1-alpha.2
Patch Changes
-
#305
3cf35fdb4
Thanks @benjie! - 🚨 Ruru is now a CommonJS
module, no longer an ESM module.Ruru CLI now reads options from a
graphile.config.tsfile if present.It's now possible to customize the HTML that Ruru is served with (specifically
the meta, title, stylesheets, header JS, body content, body JS, and init
script), either via configuration:import { defaultHTMLParts } from "ruru/server"; const preset: GraphileConfig.Preset = { //... ruru: { htmlParts: { titleTag: "<title>GraphiQL with Grafast support - Ruru!</title>", metaTags: defaultHTMLParts.metaTags + `<meta name="viewport" content="width=device-width, initial-scale=1" />`, }, }, };
or via a plugin, which allows you to change it on a per-request (per-user)
basis:const RuruMetaPlugin: GraphileConfig.Plugin = { name: "RuruMetaPlugin", version: "0.0.0", grafserv: { hooks: { ruruHTMLParts(_info, parts, extra) { // extra.request gives you access to request details, so you can customize `parts` for the user parts.metaTags += `<meta name="viewport" content="width=device-width, initial-scale=1" />`; }, }, }, };
-
#307
7c45eaf4e
Thanks @benjie! - 🚨
'application/x-www-form-urlencoded' is now opt-in (unless you're using the V4
preset).CSRF and CORS are tricky topics. When you use PostGraphile as part of a larger
system, it's your responsibility to ensure that you don't open yourself up to
CSRF/etc issues (e.g. by using CSRF/XSRF tokens, by usingSameSitecookie
policies, by checking theOriginof requests, or by using a combination of
these or other techniques).Out of the box, PostGraphile does not use cookies, so any cross-origin
requests are harmless because an attacker without the actual user token in
hand can only execute unauthenticated requests.However, once cookies (and sessions) enter the equation, suddenly CSRF becomes
a risk. Normally you cannot submit anContent-Type: application/jsonrequest
cross origins (unless you've enabled CORS), so this content type doesn't open
CSRF issues on its own, butContent-Type: application/x-www-form-urlencoded
can be submitted cross origins without CORS policies. The attacker won't be
able to view the response, but that doesn't mean they can't cause havoc by
triggering dangerous mutations using the user's credentials.We've decided to take the stance of making
application/x-www-form-urlencoded
opt-in; you can opt-in via your graphile.config.ts (or equivalent) like so:import { DEFAULT_ALLOWED_REQUEST_CONTENT_TYPES } from "grafserv"; const preset: GraphileConfig.Preset = { //... grafserv: { //... allowedRequestContentTypes: [ ...DEFAULT_ALLOWED_REQUEST_CONTENT_TYPES, "application/x-www-form-urlencoded", ], }, };
If you're using the V4 preset then we pull in the V4 behavior of enabling this
content type by default (since you presumably already have protections in
place); however we recommend disabling this media type if you're not using it:import { DEFAULT_ALLOWED_REQUEST_CONTENT_TYPES } from "grafserv"; const preset: GraphileConfig.Preset = { //... extends V4 preset ... grafserv: { //... allowedRequestContentTypes: DEFAULT_ALLOWED_REQUEST_CONTENT_TYPES, }, };
Note that this media type is not currently part of the
GraphQL-over-HTTP specification
so disabling it does not make your server non-compliant. -
Updated dependencies
[3cf35fdb4,
3df3f1726]:- ruru@2.0.0-alpha.2
- grafast@0.0.1-alpha.2
0.0.1-alpha.1
Patch Changes
-
759ad403d
Thanks @benjie! - Alpha release - see
https://postgraphile.org/news/2023-04-26-version-5-alpha -
Updated dependencies
[759ad403d]:- grafast@0.0.1-alpha.1
- ruru@2.0.0-alpha.1
- graphile-config@0.0.1-alpha.1
- @graphile/lru@5.0.0-alpha.1
0.0.1-1.3
Patch Changes
-
#297
90ed0cb7a
Thanks @benjie! - Overhaul websocket handling in
Grafserv providing cleaner integration with Grafast. -
#297
56be761c2
Thanks @benjie! - Grafserv now has a plugin
system (via graphile-config), first plugin hook enables manipulating the
incoming request body which is useful for persisted operations. -
#297
1a012bdd7
Thanks @benjie! - Tweaked error handling
codepaths, extensions can be passed through now and status codes improved. -
Updated dependencies
[8d270ead3,
b4eaf89f4]:- grafast@0.0.1-1.3
- graphile-config@0.0.1-1.2
- ruru@2.0.0-1.2
0.0.1-1.2
Patch Changes
- Updated dependencies
[7dcb0e008]:- grafast@0.0.1-1.2
0.0.1-1.1
Patch Changes
-
#260
d5312e6b9
Thanks @benjie! - TypeScript v5 is now required -
#282
f6e644bd3
Thanks @benjie! - Allow accessing websocket
connection params via(ctx as Grafast.RequestContext).ws?.connectionParams. -
Updated dependencies
[ae304b33c,
159735204,
d5312e6b9,
22ec50e36,
0f4709356,
395b4a2dd]:- grafast@0.0.1-1.1
- ruru@2.0.0-1.1
- graphile-config@0.0.1-1.1
- @graphile/lru@5.0.0-1.1
0.0.1-0.25
Patch Changes
- Updated dependencies
[89d16c972,
8f323bdc8,
9e7183c02,
612092359]:- grafast@0.0.1-0.23
- ruru@2.0.0-0.13
0.0.1-0.24
Patch Changes
- Updated dependencies
[11e7c12c5]:- graphile-config@0.0.1-0.6
- grafast@0.0.1-0.22
- ruru@2.0.0-0.12
0.0.1-0.23
Patch Changes
- #229
a06b8933f
Thanks @benjie! - Rename 'eventStreamRoute' to
'eventStreamPath' for consistency with 'graphqlPath' and 'graphiqlPath'. V4
preset unaffected. - Updated dependencies
[f5a04cf66,
b795b3da5]:- grafast@0.0.1-0.21
- ruru@2.0.0-0.11
0.0.1-0.22
Patch Changes
- #226
6a846e009
Thanks @benjie! - Enable users to use Grafserv
alongside other websocket-enabled entities in their final server. - Updated dependencies [
aac8732f9]:- grafast@0.0.1-0.20
0.0.1-0.21
Patch Changes
- Updated dependencies
[397e8bb40]:- grafast@0.0.1-0.19
0.0.1-0.20
Patch Changes
0.0.1-0.19
Patch Changes
- Updated dependencies [
f48860d4f]:- grafast@0.0.1-0.17
0.0.1-0.18
Patch Changes
- Updated dependencies
[df89aba52]:- grafast@0.0.1-0.16
0.0.1-0.17
Patch Changes
-
#210
b523118fe
Thanks @benjie! - Replace BaseGraphQLContext with
Grafast.Context throughout. -
#210
461c03b72
Thanks @benjie! - Make servers releasable where
possible. -
Updated dependencies
[b523118fe]:- grafast@0.0.1-0.15
0.0.1-0.16
Patch Changes
-
#207
c850dd4ec
Thanks @benjie! - Rename 'preset.server' to
'preset.grafserv'. -
#207
afa0ea5f6
Thanks @benjie! - Fix bug in subscriptions where
termination of underlying stream wouldn't terminate the subscription. -
#206
851b78ef2
Thanks @benjie! - Grafserv now masks untrusted
errors by default; trusted errors are constructed via GraphQL's GraphQLError
or Grafast's SafeError. -
Updated dependencies
[d76043453,
afa0ea5f6,
851b78ef2,
384b3594f]:- grafast@0.0.1-0.14
0.0.1-0.15
Patch Changes
- Updated dependencies [
e5b664b6f]:- grafast@0.0.1-0.13
0.0.1-0.14
Patch Changes
-
#200
1e5671cdb
Thanks @benjie! - Add support for websocket
GraphQL subscriptions (via graphql-ws) to grafserv and PostGraphile (currently
supporting Node, Express, Koa and Fastify) -
#200
5b634a78e
Thanks @benjie! - Standardize onserv.addTo
interface, even for Node -
Updated dependencies
[4f5d5bec7,
e11698473,
25f5a6cbf]:- grafast@0.0.1-0.12
- ruru@2.0.0-0.10
0.0.1-0.13
Patch Changes
-
0ab95d0b1- Update sponsors. -
#195
752ec9c51
Thanks @benjie! - Fix handling of HTTP errors and
allow for 204 status code responses. Add CORS hack to enable graphql-http
auditing. -
Updated dependencies [
0ab95d0b1,
4783bdd7c,
652cf1073]:- grafast@0.0.1-0.11
- graphile-config@0.0.1-0.5
- ruru@2.0.0-0.9
0.0.1-0.12
Patch Changes
- Updated dependencies
[842f6ccbb]:- graphile-config@0.0.1-0.4
- grafast@0.0.1-0.10
- ruru@2.0.0-0.8
0.0.1-0.11
Patch Changes
- #176
11d6be65e
Thanks @benjie! - Fix issue with plugin
versioning. Add more TSDoc comments. New getTerminalWidth() helper. - Updated dependencies
[19e2961de,
11d6be65e]:- graphile-config@0.0.1-0.3
- grafast@0.0.1-0.9
- ruru@2.0.0-0.7
0.0.1-0.10
Patch Changes
- Updated dependencies
[208166269]:- grafast@0.0.1-0.8
0.0.1-0.9
Patch Changes
- Updated dependencies [
a40fa6966,
8f04af08d]:- ruru@2.0.0-0.6
- grafast@0.0.1-0.7
0.0.1-0.8
Patch Changes
c4213e91d- Add pgl.getResolvedPreset() API; fix Ruru
respecting graphqlPath setting; replace 'instance' with 'pgl'/'serv' as
appropriate; forbid subscriptions on GET
0.0.1-0.7
Patch Changes
-
9b296ba54- More secure, more compatible, and lots of fixes
across the monorepo -
Updated dependencies [
9b296ba54]:- grafast@0.0.1-0.6
- ruru@2.0.0-0.5
- graphile-config@0.0.1-0.2
0.0.1-0.6
Patch Changes
- Updated dependencies [
cd37fd02a]:- grafast@0.0.1-0.5
0.0.1-0.5
Patch Changes
-
768f32681- Fix peerDependencies ranges -
Updated dependencies [
768f32681]:- grafast@0.0.1-0.4
- ruru@2.0.0-0.4
0.0.1-0.4
Patch Changes
- Updated dependencies [
0983df3f6]:- ruru@2.0.0-0.3
0.0.1-0.3
Patch Changes
-
d11c1911c- Fix dependencies -
Updated dependencies [
d11c1911c]:- grafast@0.0.1-0.3
- ruru@2.0.0-0.2
- graphile-config@0.0.1-0.1
0.0.1-0.2
Patch Changes
- Updated dependencies [
6576bd37b,25037fc15]:- ruru@2.0.0-0.1
- grafast@0.0.1-0.2
0.0.1-0.1
Patch Changes
- Updated dependencies [
55f15cf35]:- grafast@0.0.1-0.1