grafserv
Version:
A highly optimized server for GraphQL, powered by Grafast
1,132 lines (870 loc) • 53.6 kB
Markdown
# grafserv
## 0.1.1-beta.24
### Patch Changes
- Updated dependencies
[[`658d46c9a5b246e3beb4ba2a004334278f7bb24d`](https://github.com/graphile/crystal/commit/658d46c9a5b246e3beb4ba2a004334278f7bb24d)]:
- ruru@2.0.0-beta.22
## 0.1.1-beta.23
### Patch Changes
- Updated dependencies
[[`d34014a9a3c469154cc796086ba13719954731e5`](https://github.com/graphile/crystal/commit/d34014a9a3c469154cc796086ba13719954731e5),
[`98516379ac355a0833a64e002f3717cc3a1d6473`](https://github.com/graphile/crystal/commit/98516379ac355a0833a64e002f3717cc3a1d6473),
[`f8602d05eed3247c90b87c55d7af580d1698effc`](https://github.com/graphile/crystal/commit/f8602d05eed3247c90b87c55d7af580d1698effc),
[`65df25534fa3f787ba2ab7fd9547d295ff2b1288`](https://github.com/graphile/crystal/commit/65df25534fa3f787ba2ab7fd9547d295ff2b1288),
[`1b3c76efd27df73eab3a5a1d221ce13de4cd6b1a`](https://github.com/graphile/crystal/commit/1b3c76efd27df73eab3a5a1d221ce13de4cd6b1a),
[`3c0a925f26f10cae627a23c49c75ccd8d76b60c8`](https://github.com/graphile/crystal/commit/3c0a925f26f10cae627a23c49c75ccd8d76b60c8),
[`fcaeb48844156e258a037f420ea1505edb50c52a`](https://github.com/graphile/crystal/commit/fcaeb48844156e258a037f420ea1505edb50c52a),
[`68926abc31c32ce527327ffbb1ede4b0b7be446b`](https://github.com/graphile/crystal/commit/68926abc31c32ce527327ffbb1ede4b0b7be446b),
[`4b49dbd2df3b339a2ba3f1e9ff400fa1a125298b`](https://github.com/graphile/crystal/commit/4b49dbd2df3b339a2ba3f1e9ff400fa1a125298b),
[`d7950e8e28ec6106a4ce2f7fe5e35d88b10eac48`](https://github.com/graphile/crystal/commit/d7950e8e28ec6106a4ce2f7fe5e35d88b10eac48),
[`c8f1971ea4198633ec97f72f82abf65089f71a88`](https://github.com/graphile/crystal/commit/c8f1971ea4198633ec97f72f82abf65089f71a88),
[`dd3d22eab73a8554715bf1111e30586251f69a88`](https://github.com/graphile/crystal/commit/dd3d22eab73a8554715bf1111e30586251f69a88),
[`a120a8e43b24dfc174950cdbb69e481272a0b45e`](https://github.com/graphile/crystal/commit/a120a8e43b24dfc174950cdbb69e481272a0b45e),
[`84f06eafa051e907a3050237ac6ee5aefb184652`](https://github.com/graphile/crystal/commit/84f06eafa051e907a3050237ac6ee5aefb184652),
[`4a3aeaa77c8b8d2e39c1a9d05581d0c613b812cf`](https://github.com/graphile/crystal/commit/4a3aeaa77c8b8d2e39c1a9d05581d0c613b812cf),
[`0fc2db95d90df918cf5c59ef85f22ac78d8000d3`](https://github.com/graphile/crystal/commit/0fc2db95d90df918cf5c59ef85f22ac78d8000d3),
[`90e81a5deeae554a8be2dd55dcd01489860e96e6`](https://github.com/graphile/crystal/commit/90e81a5deeae554a8be2dd55dcd01489860e96e6),
[`c59132eb7a93bc82493d2f1ca050db8aaea9f4d1`](https://github.com/graphile/crystal/commit/c59132eb7a93bc82493d2f1ca050db8aaea9f4d1),
[`7c38cdeffe034c9b4f5cdd03a8f7f446bd52dcb7`](https://github.com/graphile/crystal/commit/7c38cdeffe034c9b4f5cdd03a8f7f446bd52dcb7),
[`728888b28fcd2a6fc481e0ccdfe20d41181a091f`](https://github.com/graphile/crystal/commit/728888b28fcd2a6fc481e0ccdfe20d41181a091f),
[`f4f39092d7a51517668384945895d3b450237cce`](https://github.com/graphile/crystal/commit/f4f39092d7a51517668384945895d3b450237cce),
[`5cf3dc9d158891eaf324b2cd4f485d1d4bbb6b5e`](https://github.com/graphile/crystal/commit/5cf3dc9d158891eaf324b2cd4f485d1d4bbb6b5e),
[`83d3b533e702cc875b46ba2ca02bf3642b421be8`](https://github.com/graphile/crystal/commit/83d3b533e702cc875b46ba2ca02bf3642b421be8),
[`7001138c38e09822ad13db1018c62d2cac37941e`](https://github.com/graphile/crystal/commit/7001138c38e09822ad13db1018c62d2cac37941e),
[`e9e7e33665e22ec397e9ead054d2e4aad3eadc8c`](https://github.com/graphile/crystal/commit/e9e7e33665e22ec397e9ead054d2e4aad3eadc8c),
[`bb6ec8d834e3e630e28316196246f514114a2296`](https://github.com/graphile/crystal/commit/bb6ec8d834e3e630e28316196246f514114a2296),
[`2b1918d053f590cdc534c8cb81f7e74e96c1bbe6`](https://github.com/graphile/crystal/commit/2b1918d053f590cdc534c8cb81f7e74e96c1bbe6),
[`d1ecb39693a341f85762b27012ec4ea013857b0c`](https://github.com/graphile/crystal/commit/d1ecb39693a341f85762b27012ec4ea013857b0c),
[`042ebafe11fcf7e2ecac9b131265a55dddd42a6d`](https://github.com/graphile/crystal/commit/042ebafe11fcf7e2ecac9b131265a55dddd42a6d),
[`fa005eb0783c58a2476add984fbdd462e0e91dbe`](https://github.com/graphile/crystal/commit/fa005eb0783c58a2476add984fbdd462e0e91dbe),
[`df0e5a0f968cf6f9ae97b68745a9a2f391324bf5`](https://github.com/graphile/crystal/commit/df0e5a0f968cf6f9ae97b68745a9a2f391324bf5),
[`ef4cf75acd80e6b9c700c2b5a7ace899e565ef7f`](https://github.com/graphile/crystal/commit/ef4cf75acd80e6b9c700c2b5a7ace899e565ef7f),
[`c041fd250372c57601188b65a6411c8f440afab6`](https://github.com/graphile/crystal/commit/c041fd250372c57601188b65a6411c8f440afab6),
[`629b45aab49151810f6efc18ac18f7d735626433`](https://github.com/graphile/crystal/commit/629b45aab49151810f6efc18ac18f7d735626433),
[`6d19724330d50d076aab9442660fa8abddd095cb`](https://github.com/graphile/crystal/commit/6d19724330d50d076aab9442660fa8abddd095cb),
[`ca5bc1a834df7b894088fb8602a12f9fcff55b38`](https://github.com/graphile/crystal/commit/ca5bc1a834df7b894088fb8602a12f9fcff55b38),
[`da6f3c04efe3d8634c0bc3fcf93ac2518de85322`](https://github.com/graphile/crystal/commit/da6f3c04efe3d8634c0bc3fcf93ac2518de85322),
[`00d79e6f5608affc3f36bb0ce4ca2547230174e7`](https://github.com/graphile/crystal/commit/00d79e6f5608affc3f36bb0ce4ca2547230174e7),
[`f0bc64b71914dfdd3612f4b65370401fd85b97bc`](https://github.com/graphile/crystal/commit/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`](https://github.com/graphile/crystal/commit/fc9d64eb8002d3b72625bc505ed76c07f4296d68),
[`a2dbad945`](https://github.com/graphile/crystal/commit/a2dbad9457195bec797d72e4e6d45f45278f9f69),
[`31078842a`](https://github.com/graphile/crystal/commit/31078842ad0eeaa7111491fa9eb5e3bd026fb38a),
[`5a0ec31de`](https://github.com/graphile/crystal/commit/5a0ec31deae91f1dd17a77a4bb7c1a911a27e26a),
[`ba2847f3e`](https://github.com/graphile/crystal/commit/ba2847f3e87b3c081e4b9fc4e62a81cc8bd8bb15)]:
- grafast@0.1.1-beta.20
- ruru@2.0.0-beta.20
## 0.1.1-beta.21
### Patch Changes
- Updated dependencies
[[`83c546509`](https://github.com/graphile/crystal/commit/83c546509d24be2955a56120981363ad3c3a5f3f)]:
- 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`](https://github.com/graphile/crystal/commit/7580bc16a050fd8d916c6dabe9d1ded980090349),
[`b336a5829`](https://github.com/graphile/crystal/commit/b336a58291cfec7aef884d3843172d408abfaf3c)]:
- 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](https://github.com/graphile/crystal/pull/2252)
[`866673e14`](https://github.com/graphile/crystal/commit/866673e14f7ad76b6f6d83d1b4e3a4eff8fdba37)
Thanks [@benjie](https://github.com/benjie)! - Overhaul maskError types to
return GraphQLFormattedError.
- [#2240](https://github.com/graphile/crystal/pull/2240)
[`9a0f9e78c`](https://github.com/graphile/crystal/commit/9a0f9e78c4ee46f50f49bb068baddef7e1de4119)
Thanks [@benjie](https://github.com/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
that `await` was not necessary.
- Updated dependencies
[[`69ab227b5`](https://github.com/graphile/crystal/commit/69ab227b5e1c057a6fc8ebba87bde80d5aa7f3c8),
[`38163c86a`](https://github.com/graphile/crystal/commit/38163c86ae628fed84cf38fc6a1cc76a7bc7932a),
[`d13b76f0f`](https://github.com/graphile/crystal/commit/d13b76f0fef2a58466ecb44880af62d25910e83e),
[`b167bd849`](https://github.com/graphile/crystal/commit/b167bd8499be5866b71bac6594d55bd768fda1d0),
[`6a13ecbd4`](https://github.com/graphile/crystal/commit/6a13ecbd45534c39c846c1d8bc58242108426dd1)]:
- 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](https://github.com/graphile/crystal/pull/2204)
[`bf2a2e72a`](https://github.com/graphile/crystal/commit/bf2a2e72ab78a01f5aba6cda97b5a125563b1f3d)
Thanks [@Dodobibi](https://github.com/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`](https://github.com/graphile/crystal/commit/5626c7d3649285e11fe9857dfa319d2883d027eb),
[`76c7340b7`](https://github.com/graphile/crystal/commit/76c7340b74d257c454beec883384d19ef078b21e)]:
- 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`](https://github.com/graphile/crystal/commit/d5834def1fb84f3e2c0c0a6f146f8249a6df890a),
[`42b982463`](https://github.com/graphile/crystal/commit/42b9824637a6c05e02935f2b05b5e8e0c61965a6),
[`884a4b429`](https://github.com/graphile/crystal/commit/884a4b4297af90fdadaf73addd524f1fbbcfdcce),
[`38835313a`](https://github.com/graphile/crystal/commit/38835313ad93445206dccdd4cf07b90c5a6e4377),
[`cc0941731`](https://github.com/graphile/crystal/commit/cc0941731a1679bc04ce7b7fd4254009bb5f1f62),
[`b0865d169`](https://github.com/graphile/crystal/commit/b0865d1691105b5419009954c98c8109a27a5d81),
[`8b472cd51`](https://github.com/graphile/crystal/commit/8b472cd51cd66d8227f9f2722d09c0a774792b0f),
[`9cd9bb522`](https://github.com/graphile/crystal/commit/9cd9bb5222a9f0398ee4b8bfa4f741b6de2a2192)]:
- 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
- Updated dependencies
[[`871d32b2a`](https://github.com/graphile/crystal/commit/871d32b2a18df0d257880fc54a61d9e68c4607d6),
[`a26e3a30c`](https://github.com/graphile/crystal/commit/a26e3a30c02f963f8f5e9c9d021e871f33689e1b),
[`02c11a4d4`](https://github.com/graphile/crystal/commit/02c11a4d42bf434dffc9354b300e8d791c4eeb2d)]:
- grafast@0.1.1-beta.14
- ruru@2.0.0-beta.14
## 0.1.1-beta.15
### Patch Changes
- Updated dependencies
[[`807650035`](https://github.com/graphile/crystal/commit/8076500354a3e2bc2de1b6c4e947bd710cc5bddc)]:
- grafast@0.1.1-beta.13
- ruru@2.0.0-beta.14
## 0.1.1-beta.14
### Patch Changes
- [#2097](https://github.com/graphile/crystal/pull/2097)
[`61f8bbca5`](https://github.com/graphile/crystal/commit/61f8bbca5badda5b27872e0ee01a2d4c1372210d)
Thanks [@FelixZY](https://github.com/FelixZY)! - Improve logging of masked
errors (thanks @FelixZY)
- Updated dependencies
[[`1bd50b61e`](https://github.com/graphile/crystal/commit/1bd50b61ebb10b7d09b3612c2e2767c41cca3b78),
[`4e102b1a1`](https://github.com/graphile/crystal/commit/4e102b1a1cd232e6f6703df0706415f01831dab2),
[`7bb1573ba`](https://github.com/graphile/crystal/commit/7bb1573ba45a4d8b7fa9ad53cdd79686d2641383),
[`18addb385`](https://github.com/graphile/crystal/commit/18addb3852525aa91019a36d58fa2fecd8b5b443),
[`6ed615e55`](https://github.com/graphile/crystal/commit/6ed615e557b2ab1fb57f1e68c06730a8e3da7175),
[`b25cc539c`](https://github.com/graphile/crystal/commit/b25cc539c00aeda7a943c37509aaae4dc7812317),
[`867f33136`](https://github.com/graphile/crystal/commit/867f331365346fc46ed1e0d23c79719846e398f4),
[`cf535c210`](https://github.com/graphile/crystal/commit/cf535c21078da06c14dd12f30e9b4378da4ded03),
[`acf99b190`](https://github.com/graphile/crystal/commit/acf99b190954e3c5926e820daed68dfe8eb3ee1f),
[`4967a197f`](https://github.com/graphile/crystal/commit/4967a197fd2c71ee2a581fe29470ee9f30e74de5),
[`1908e1ba1`](https://github.com/graphile/crystal/commit/1908e1ba11883a34dac66f985fc20ab160e572b1),
[`084d80be6`](https://github.com/graphile/crystal/commit/084d80be6e17187c9a9932bcf079e3f460368782)]:
- grafast@0.1.1-beta.12
- ruru@2.0.0-beta.14
## 0.1.1-beta.13
### Patch Changes
- [#2071](https://github.com/graphile/crystal/pull/2071)
[`582bd768f`](https://github.com/graphile/crystal/commit/582bd768fec403ce3284f293b85b9fd86e4d3f40)
Thanks [@benjie](https://github.com/benjie)! - `GrafastExecutionArgs` now
accepts `resolvedPreset` and `requestContext` directly; passing these through
additional arguments is now deprecated and support will be removed in a future
revision. This affects:
- `grafast()`
- `execute()`
- `subscribe()`
- `hookArgs()`
`graphile-config` has 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.
`applyHooks` has been renamed to `orderedApply` (because it applies to more
than just hooks), calling `applyHooks` will still work but is deprecated.
🚨 `grafast` no longer automatically reads your `graphile.config.ts` or
similar; you must do that yourself and pass the `resolvedPreset` to grafast
via the `args`. This is to aid in bundling of grafast since it should not need
to read from filesystem or dynamically load modules.
`grafast` no longer outputs performance warning when you set
`GRAPHILE_ENV=development`.
🚨 `plugin.grafast.hooks.args` is now `plugin.grafast.middleware.prepareArgs`,
and the signature has changed - you must be sure to call the `next()` function
and ctx/resolvedPreset can be extracted directly from `args`:
```diff
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
middleware `plugin.grafserv.middleware.*` (note that call signatures have
changed slightly, similar to the diff above):
- `hooks.init` -> `middleware.setPreset`
- `hooks.processGraphQLRequestBody` -> `middleware.processGraphQLRequestBody`
- `hooks.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` -> `FunctionalityObject`
- `PluginHook` -> `CallbackOrDescriptor`
- `PluginHookObject` -> `CallbackDescriptor`
- `PluginHookCallback` -> `UnwrapCallback`
- Updated dependencies
[[`582bd768f`](https://github.com/graphile/crystal/commit/582bd768fec403ce3284f293b85b9fd86e4d3f40)]:
- 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
- Updated dependencies
[[`3c161f7e1`](https://github.com/graphile/crystal/commit/3c161f7e13375105b1035a7d5d1c0f2b507ca5c7),
[`a674a9923`](https://github.com/graphile/crystal/commit/a674a9923bc908c9315afa40e0cb256ee0953d16),
[`b7cfeffd1`](https://github.com/graphile/crystal/commit/b7cfeffd1019d61c713a5054c4f5929960a2a6ab)]:
- grafast@0.1.1-beta.10
- ruru@2.0.0-beta.12
## 0.1.1-beta.11
### Patch Changes
- Updated dependencies
[[`437570f97`](https://github.com/graphile/crystal/commit/437570f97e8520afaf3d0d0b514d1f4c31546b76)]:
- grafast@0.1.1-beta.9
- ruru@2.0.0-beta.12
## 0.1.1-beta.10
### Patch Changes
- Updated dependencies
[[`bd5a908a4`](https://github.com/graphile/crystal/commit/bd5a908a4d04310f90dfb46ad87398ffa993af3b)]:
- grafast@0.1.1-beta.8
- ruru@2.0.0-beta.12
## 0.1.1-beta.9
### Patch Changes
- [#2046](https://github.com/graphile/crystal/pull/2046)
[`a5a0816bd`](https://github.com/graphile/crystal/commit/a5a0816bddc85a841770202db57457ff13137852)
Thanks [@benjie](https://github.com/benjie)! - Massive refactor of Grafserv
internals.
- Updated dependencies
[[`357d475f5`](https://github.com/graphile/crystal/commit/357d475f54fecc8c51892e0346d6872b34132430),
[`3551725e7`](https://github.com/graphile/crystal/commit/3551725e71c3ed876554e19e5ab2c1dcb0fb1143),
[`80836471e`](https://github.com/graphile/crystal/commit/80836471e5cedb29dee63bc5002550c4f1713cfd),
[`a5c20fefb`](https://github.com/graphile/crystal/commit/a5c20fefb571dea6d1187515dc48dd547e9e6204),
[`1ce08980e`](https://github.com/graphile/crystal/commit/1ce08980e2a52ed9bc81564d248c19648ecd3616),
[`dff4f2535`](https://github.com/graphile/crystal/commit/dff4f2535ac6ce893089b312fcd5fffcd98573a5),
[`a287a57c2`](https://github.com/graphile/crystal/commit/a287a57c2765da0fb6a132ea0953f64453210ceb),
[`2fe56f9a6`](https://github.com/graphile/crystal/commit/2fe56f9a6dac03484ace45c29c2223a65f9ca1db),
[`fed603d71`](https://github.com/graphile/crystal/commit/fed603d719c02f33e12190f925c9e3b06c581fac),
[`ed6e0d278`](https://github.com/graphile/crystal/commit/ed6e0d2788217a1c419634837f4208013eaf2923),
[`e82e4911e`](https://github.com/graphile/crystal/commit/e82e4911e32138df1b90ec0fde555ea963018d21),
[`42ece5aa6`](https://github.com/graphile/crystal/commit/42ece5aa6ca05345ebc17fb5c7d55df3b79b7612),
[`e0d69e518`](https://github.com/graphile/crystal/commit/e0d69e518a98c70f9b90f59d243ce33978c1b5a1),
[`db8ceed0f`](https://github.com/graphile/crystal/commit/db8ceed0f17923eb78ff09c9f3f28800a5c7e3b6),
[`6699388ec`](https://github.com/graphile/crystal/commit/6699388ec167d35c71220ce5d9113cac578da6cb),
[`966203504`](https://github.com/graphile/crystal/commit/96620350467ab8c65b56adf2f055e19450f8e772),
[`c1645b249`](https://github.com/graphile/crystal/commit/c1645b249aae949a548cd916e536ccfb63e5ab35),
[`ed8bbaa3c`](https://github.com/graphile/crystal/commit/ed8bbaa3cd1563a7601ca8c6b0412633b0ea4ce9),
[`a0e82b9c5`](https://github.com/graphile/crystal/commit/a0e82b9c5f4e585f1af1e147299cd07944ece6f8),
[`14e2412ee`](https://github.com/graphile/crystal/commit/14e2412ee368e8d53abf6774c7f0069f32d4e8a3),
[`57ab0e1e7`](https://github.com/graphile/crystal/commit/57ab0e1e72c01213b21d3efc539cd655d83d993a),
[`8442242e4`](https://github.com/graphile/crystal/commit/8442242e43cac7d89ca0c413cf42c9fabf6f247f),
[`64ce7b765`](https://github.com/graphile/crystal/commit/64ce7b7650530251aec38a51089da66f914c19b4),
[`cba842357`](https://github.com/graphile/crystal/commit/cba84235786acbd77ade53bae7a3fba4a9be1eb7),
[`2fa77d0f2`](https://github.com/graphile/crystal/commit/2fa77d0f237cdb98d3dafb6b5e4083a2c6c38673)]:
- 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
- Updated dependencies
[[`9f85c614d`](https://github.com/graphile/crystal/commit/9f85c614d48dc745c5fed15333dbb75af7fddc88),
[`6c6be29f1`](https://github.com/graphile/crystal/commit/6c6be29f12b24782c926b2bc62ed2ede09ac05de),
[`8315e8d01`](https://github.com/graphile/crystal/commit/8315e8d01c118cebc4ebbc53a2f264b958b252ad)]:
- grafast@0.1.1-beta.6
- ruru@2.0.0-beta.11
## 0.1.1-beta.7
### Patch Changes
- [#1937](https://github.com/graphile/crystal/pull/1937)
[`c21252541`](https://github.com/graphile/crystal/commit/c212525410cb2d97a808964ad727d0a68dd15f8b)
Thanks [@benjie](https://github.com/benjie)! - Export `defaultMaskError` from
`grafserv`.
- Updated dependencies
[[`63dd7ea99`](https://github.com/graphile/crystal/commit/63dd7ea992d30ad711dd85a73a127484a0e35479),
[`d801c9778`](https://github.com/graphile/crystal/commit/d801c9778a86d61e060896460af9fe62a733534a),
[`ef44c29b2`](https://github.com/graphile/crystal/commit/ef44c29b24a1ad5a042ae1536a4546dd64b17195),
[`941e28003`](https://github.com/graphile/crystal/commit/941e280038a735014a9fe4e24fc534a197fac0f2),
[`068be2f51`](https://github.com/graphile/crystal/commit/068be2f51d7a9c17311f26c6c9451985397c9e1f),
[`5de3e86eb`](https://github.com/graphile/crystal/commit/5de3e86eba1ddfe5e07732d0325c63e5d72d4b5b)]:
- 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](https://github.com/graphile/crystal/pull/1903)
[`de7add402`](https://github.com/graphile/crystal/commit/de7add402bd4a45c8782fce69bf210635360cbe8)
Thanks [@benjie](https://github.com/benjie)! - Fix bug where stack traces are
added to masked errors
- Updated dependencies
[[`a2176ea32`](https://github.com/graphile/crystal/commit/a2176ea324db0801249661b30e9c9d314c6fb159),
[`886833e2e`](https://github.com/graphile/crystal/commit/886833e2e319f23d905d7184ca88fca701b94044)]:
- grafast@0.1.1-beta.4
- ruru@2.0.0-beta.10
## 0.1.1-beta.5
### Patch Changes
- Updated dependencies
[[`0df5511ac`](https://github.com/graphile/crystal/commit/0df5511ac8b79ea34f8d12ebf8feeb421f8fe971)]:
- 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](https://github.com/graphile/crystal/pull/1877)
[`8a0cdb95f`](https://github.com/graphile/crystal/commit/8a0cdb95f200b28b0ea1ab5caa12b23dce5f374f)
Thanks [@benjie](https://github.com/benjie)! - Move 'declare global' out of
'interfaces.ts' and into 'index.ts' or equivalent. Should make TypeScript more
aware of these types.
- [#1849](https://github.com/graphile/crystal/pull/1849)
[`995e25035`](https://github.com/graphile/crystal/commit/995e250352217fdf8f036b8ed6cad3fab520817f)
Thanks [@TimoStolz](https://github.com/TimoStolz)! - Tweak websocket
integration with Fastify: `wsHandlers` are only allowed if method is `GET`.
- Updated dependencies
[[`3fdc2bce4`](https://github.com/graphile/crystal/commit/3fdc2bce42418773f808c5b8309dfb361cd95ce9),
[`aeef362b5`](https://github.com/graphile/crystal/commit/aeef362b5744816f01e4a6f714bbd77f92332bc5),
[`8a76db07f`](https://github.com/graphile/crystal/commit/8a76db07f4c110cecc6225504f9a05ccbcbc7b92),
[`8a0cdb95f`](https://github.com/graphile/crystal/commit/8a0cdb95f200b28b0ea1ab5caa12b23dce5f374f),
[`1c9f1c0ed`](https://github.com/graphile/crystal/commit/1c9f1c0edf4e621a5b6345d3a41527a18143c6ae)]:
- 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](https://github.com/graphile/crystal/pull/1807)
[`9696a1b08`](https://github.com/graphile/crystal/commit/9696a1b0885442f44e3a6ca6a4909ec96a445884)
Thanks [@innermatrix](https://github.com/innermatrix)! - Export lambda server
from `grafserv/lambda/v1`
- Updated dependencies
[[`49fcb0d58`](https://github.com/graphile/crystal/commit/49fcb0d585b31b291c9072c339d6f5b550eefc9f),
[`7aef73319`](https://github.com/graphile/crystal/commit/7aef73319a8a147c700727be62427e1eefdefbf8)]:
- 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`](https://github.com/graphile/crystal/commit/3dd5d86d6c1ea7ba106c08e8a315ec47ed6cfa2d)]:
- ruru@2.0.0-beta.7
## 0.1.1-beta.1
### Patch Changes
- [`781a89758`](https://github.com/graphile/crystal/commit/781a89758fff2712f0080d8fafb4048da189b782)
Thanks [@benjie](https://github.com/benjie)! - Change the unimplemented status
code from 503 to 501.
- [#1777](https://github.com/graphile/crystal/pull/1777)
[`a38e650d6`](https://github.com/graphile/crystal/commit/a38e650d67d6c7ff0cf5b853377622090ede3a50)
Thanks [@innermatrix](https://github.com/innermatrix)! - Added AWS lambda
adapter for grafserv
- Updated dependencies
[[`ebb0b817e`](https://github.com/graphile/crystal/commit/ebb0b817e3efe210445d3f3396ff4bc53ebab3e7)]:
- ruru@2.0.0-beta.6
## 0.1.1-beta.0
### Patch Changes
- [#1781](https://github.com/graphile/crystal/pull/1781)
[`2d31f058b`](https://github.com/graphile/crystal/commit/2d31f058b34d3f5ef11699582b9a4960a4ebc471)
Thanks [@benjie](https://github.com/benjie)! - Improve handling of errors in
websocket server.
- Updated dependencies
[[`4a4d26d87`](https://github.com/graphile/crystal/commit/4a4d26d87ce74589429b8ca5126a7bfdf30351b8),
[`b2bce88da`](https://github.com/graphile/crystal/commit/b2bce88da26c7a8965468be16fc2d935eadd3434),
[`861a8a306`](https://github.com/graphile/crystal/commit/861a8a306ef42a821da19e77903ddd7e8130bfb3)]:
- grafast@0.1.1-beta.0
- ruru@2.0.0-beta.5
## 0.0.1-beta.9
### Patch Changes
- [#514](https://github.com/graphile/crystal-pre-merge/pull/514)
[`c9848f693`](https://github.com/graphile/crystal-pre-merge/commit/c9848f6936a5abd7740c0638bfb458fb5551f03b)
Thanks [@benjie](https://github.com/benjie)! - Update package.json repository
information
- Updated dependencies
[[`c9848f693`](https://github.com/graphile/crystal-pre-merge/commit/c9848f6936a5abd7740c0638bfb458fb5551f03b),
[`ede1092fe`](https://github.com/graphile/crystal-pre-merge/commit/ede1092fe197719b6fa786f4cfa75f6a1f4c56c1),
[`566983fbd`](https://github.com/graphile/crystal-pre-merge/commit/566983fbd99c4b2df8c4ebd6260521670a2b7dfc),
[`409bf6071`](https://github.com/graphile/crystal-pre-merge/commit/409bf607180d4d8faec658c803e5ec4d1a00c451)]:
- 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`](https://github.com/benjie/crystal/commit/4c39d7c0bae5acb6ae79cc1fec0a1eabdd40a234)]:
- ruru@2.0.0-beta.4
## 0.0.1-beta.7
### Patch Changes
- Updated dependencies
[[`3700e204f`](https://github.com/benjie/crystal/commit/3700e204f430db182c92ca7abc82017c81fa1f9b)]:
- grafast@0.0.1-beta.7
- ruru@2.0.0-beta.3
## 0.0.1-beta.6
### Patch Changes
- [#496](https://github.com/benjie/crystal/pull/496)
[`c9bfd9892`](https://github.com/benjie/crystal/commit/c9bfd989247f9433fb5b18c5175c9d8d64cd21a1)
Thanks [@benjie](https://github.com/benjie)! - Update dependencies (sometimes
through major versions).
- Updated dependencies
[[`c9bfd9892`](https://github.com/benjie/crystal/commit/c9bfd989247f9433fb5b18c5175c9d8d64cd21a1),
[`1867d365f`](https://github.com/benjie/crystal/commit/1867d365f360ac8411f622b0813ca76a19ab4013),
[`e613b476d`](https://github.com/benjie/crystal/commit/e613b476d6ee867d1f7509c895dabee40e7f9a31),
[`c747d91e9`](https://github.com/benjie/crystal/commit/c747d91e9646409c66e73c12195dbf6cbd97b211)]:
- 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
- Updated dependencies
[[`9f82b8612`](https://github.com/benjie/crystal/commit/9f82b861206fdd2b8a7c50ba5184112dfb57b54a),
[`53186213a`](https://github.com/benjie/crystal/commit/53186213ade962f4b66cb0d5ea8b57b5ce7ea85f)]:
- ruru@2.0.0-beta.2
- grafast@0.0.1-beta.5
## 0.0.1-beta.4
### Patch Changes
- [#463](https://github.com/benjie/crystal/pull/463)
[`22fa6230a`](https://github.com/benjie/crystal/commit/22fa6230aa7c7271e5360e619ec9e1f52c6ea49c)
Thanks [@benjie](https://github.com/benjie)! - Add experimental support for h3
server to grafserv.
- [#461](https://github.com/benjie/crystal/pull/461)
[`fa8cfcf9b`](https://github.com/benjie/crystal/commit/fa8cfcf9b4ce0c3e12511f3f6392051924a719e5)
Thanks [@benjie](https://github.com/benjie)! - Export
`getBodyFromFrameworkBody` helper, and a number of types.
- Updated dependencies
[[`f9cc88dc4`](https://github.com/benjie/crystal/commit/f9cc88dc442d371aee154a28d4e63c6da39f6b2e)]:
- grafast@0.0.1-beta.4
## 0.0.1-beta.3
### Patch Changes
- Updated dependencies
[[`46cd08aa1`](https://github.com/benjie/crystal/commit/46cd08aa13e3bac4d186c72c6ce24997f37658af)]:
- grafast@0.0.1-beta.3
## 0.0.1-beta.2
### Patch Changes
- Updated dependencies
[[`23bd3c291`](https://github.com/benjie/crystal/commit/23bd3c291246aebf27cf2784f40fc948485f43c9)]:
- grafast@0.0.1-beta.2
## 0.0.1-beta.1
### Patch Changes
- [`cbd987385`](https://github.com/benjie/crystal/commit/cbd987385f99bd1248bc093ac507cc2f641ba3e8)
Thanks [@benjie](https://github.com/benjie)! - Bump all packages to beta
- Updated dependencies
[[`cbd987385`](https://github.com/benjie/crystal/commit/cbd987385f99bd1248bc093ac507cc2f641ba3e8)]:
- 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`](https://github.com/benjie/crystal/commit/dfefdad3cd5a99c36d47eb0bddd914bab4ca9a1f)]:
- grafast@0.0.1-alpha.16
## 0.0.1-alpha.15
### Patch Changes
- [#422](https://github.com/benjie/crystal/pull/422)
[`9f87a26b1`](https://github.com/benjie/crystal/commit/9f87a26b10e5539aa88cfd9909e265513e941fd5)
Thanks [@benjie](https://github.com/benjie)! - Comments enabled in released
packages
- Updated dependencies
[[`ea003ca3a`](https://github.com/benjie/crystal/commit/ea003ca3a8f68fb87dca603582e47981ed033996),
[`57d88b5fa`](https://github.com/benjie/crystal/commit/57d88b5fa3ed296210c1fcb223452213fd57985b),
[`a22830b2f`](https://github.com/benjie/crystal/commit/a22830b2f293b50a244ac18e1601d7579b450c7d),
[`9f87a26b1`](https://github.com/benjie/crystal/commit/9f87a26b10e5539aa88cfd9909e265513e941fd5)]:
- 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`](https://github.com/benjie/crystal/commit/d99d666fb234eb02dd196610995fa480c596242a)]:
- grafast@0.0.1-alpha.14
## 0.0.1-alpha.13
### Patch Changes
- [#418](https://github.com/benjie/crystal/pull/418)
[`9ab2adba2`](https://github.com/benjie/crystal/commit/9ab2adba2c146b5d1bc91bbb2f25e4645ed381de)
Thanks [@benjie](https://github.com/benjie)! - Overhaul peerDependencies and
dependencies to try and eliminate duplicate modules error.
- Updated dependencies
[[`620f9e07e`](https://github.com/benjie/crystal/commit/620f9e07ec6f4d66a8dc01ed6bb054a75f7b1c8b),
[`1882e0185`](https://github.com/benjie/crystal/commit/1882e018576adf69bcae8a999224cb4d5e62a3e1),
[`881672305`](https://github.com/benjie/crystal/commit/88167230578393e3b24a364f0d673e36c5cb088d),
[`e5012f9a1`](https://github.com/benjie/crystal/commit/e5012f9a1901af63e1703ea4d717e8a22544f5e7),
[`9ab2adba2`](https://github.com/benjie/crystal/commit/9ab2adba2c146b5d1bc91bbb2f25e4645ed381de),
[`47f6f018b`](https://github.com/benjie/crystal/commit/47f6f018b11761cbfaa63d709edc0e3f4f9a9924),
[`ff4395bfc`](https://github.com/benjie/crystal/commit/ff4395bfc6e6b2fb263f644dae1e984c52dd84b9),
[`502b23340`](https://github.com/benjie/crystal/commit/502b233401975637bc0d516af78721b37f6f9b7b)]:
- grafast@0.0.1-alpha.13
- ruru@2.0.0-alpha.10
## 0.0.1-alpha.12
### Patch Changes
- Updated dependencies
[[`9281a2d88`](https://github.com/benjie/crystal/commit/9281a2d889ab1e72a3f6f9777779f31a6588d478),
[`675b7abb9`](https://github.com/benjie/crystal/commit/675b7abb93e11d955930b9026fb0b65a56ecc999),
[`c5050dd28`](https://github.com/benjie/crystal/commit/c5050dd286bd6d9fa4a5d9cfbf87ba609cb148dd),
[`0d1782869`](https://github.com/benjie/crystal/commit/0d1782869adc76f5bbcecfdcbb85a258c468ca37)]:
- 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`](https://github.com/benjie/crystal/commit/644938276ebd48c5486ba9736a525fcc66d7d714)]:
- 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](https://github.com/benjie/crystal/pull/399)
[`409581534`](https://github.com/benjie/crystal/commit/409581534f41ac2cf0ff21c77c2bcd8eaa8218fd)
Thanks [@benjie](https://github.com/benjie)! - Change many of the dependencies
to be instead (or also) peerDependencies, to avoid duplicate modules.
- Updated dependencies
[[`409581534`](https://github.com/benjie/crystal/commit/409581534f41ac2cf0ff21c77c2bcd8eaa8218fd),
[`b7533bd4d`](https://github.com/benjie/crystal/commit/b7533bd4dfc210cb8b113b8fa06f163a212aa5e4),
[`9feb769c2`](https://github.com/benjie/crystal/commit/9feb769c2df0c57971ed26a937be4a1bee7a7524),
[`7573bf374`](https://github.com/benjie/crystal/commit/7573bf374897228b613b19f37b4e076737db3279),
[`2c8586b36`](https://github.com/benjie/crystal/commit/2c8586b367b76af91d1785cc90455c70911fdec7),
[`c43802d74`](https://github.com/benjie/crystal/commit/c43802d7419f93d18964c654f16d0937a2e23ca0),
[`b118b8f6d`](https://github.com/benjie/crystal/commit/b118b8f6dc18196212cfb0a05486e1dd8d77ccf8),
[`9008c4f87`](https://github.com/benjie/crystal/commit/9008c4f87df53be4051c49f9836358dc2baa59df),
[`e8c81cd20`](https://github.com/benjie/crystal/commit/e8c81cd2046390ed5b6799aa7ff3d90b28a1861a)]:
- grafast@0.0.1-alpha.10
- ruru@2.0.0-alpha.7
## 0.0.1-alpha.9
### Patch Changes
- Updated dependencies
[[`56237691b`](https://github.com/benjie/crystal/commit/56237691bf3eed321b7159e17f36e3651356946f),
[`ed1982f31`](https://github.com/benjie/crystal/commit/ed1982f31a845ceb3aafd4b48d667649f06778f5),
[`1fe47a2b0`](https://github.com/benjie/crystal/commit/1fe47a2b08d6e7153a22dde3a99b7a9bf50c4f84),
[`198ac74d5`](https://github.com/benjie/crystal/commit/198ac74d52fe1e47d602fe2b7c52f216d5216b25),
[`6878c589c`](https://github.com/benjie/crystal/commit/6878c589cc9fc8f05a6efd377e1272ae24fbf256),
[`2ac706f18`](https://github.com/benjie/crystal/commit/2ac706f18660c855fe20f460b50694fdd04a7768)]:
- 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`](https://github.com/benjie/crystal/commit/dd3ef599c7f2530fd1a19a852d334b7349e49e70)]:
- grafast@0.0.1-alpha.8
## 0.0.1-alpha.7
### Patch Changes
- [#346](https://github.com/benjie/crystal/pull/346)
[`9ddaaaa96`](https://github.com/benjie/crystal/commit/9ddaaaa9617874cb44946acfcd252517ae427446)
Thanks [@benjie](https://github.com/benjie)! - Fix a bug in subscriptions
where variables were not recognized
- Updated dependencies
[[`5c9d32264`](https://github.com/benjie/crystal/commit/5c9d322644028e33f5273fb9bcaaf6a80f1f7360),
[`2fcbe688c`](https://github.com/benjie/crystal/commit/2fcbe688c11b355f0688b96e99012a829cf8b7cb),
[`3a984718a`](https://github.com/benjie/crystal/commit/3a984718a322685304777dec7cd48a1efa15539d),
[`adc7ae5e0`](https://github.com/benjie/crystal/commit/adc7ae5e002961c8b8286500527752f21139ab9e)]:
- 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`](https://github.com/benjie/crystal/commit/f75926f4b9aee33adff8bdf6b1a4137582cb47ba)]:
- grafast@0.0.1-alpha.6
## 0.0.1-alpha.5
### Patch Changes
- Updated dependencies
[[`86e503d78`](https://github.com/benjie/crystal/commit/86e503d785626ad9a2e91ec2e70b272dd632d425),
[`24822d0dc`](https://github.com/benjie/crystal/commit/24822d0dc87d41f0b0737d6e00cf4022de4bab5e)]:
- grafast@0.0.1-alpha.5
## 0.0.1-alpha.4
### Patch Changes
- Updated dependencies
[[`45dcf3a8f`](https://github.com/benjie/crystal/commit/45dcf3a8fd8bad5c8b82a7cbff2db4dacb916950),
[`f34bd5a3c`](https://github.com/benjie/crystal/commit/f34bd5a3c353693b86a0307357a3620110700e1c)]:
- grafast@0.0.1-alpha.4
- ruru@2.0.0-alpha.4
## 0.0.1-alpha.3
### Patch Changes
- [`7f857950a`](https://github.com/benjie/crystal/commit/7f857950a7e4ec763c936eb6bd1fb77824041d71)
Thanks [@benjie](https://github.com/benjie)! - Upgrade to the latest
TypeScript/tslib
- Updated dependencies
[[`98ae00f59`](https://github.com/benjie/crystal/commit/98ae00f59a8ab3edc5718ad8437a0dab734a7d69),
[`2389f47ec`](https://github.com/benjie/crystal/commit/2389f47ecf3b708f1085fdeb818eacaaeb257a2d),
[`2fe247f75`](https://github.com/benjie/crystal/commit/2fe247f751377e18b3d6809cba39a01aa1602dbc),
[`e91ee201d`](https://github.com/benjie/crystal/commit/e91ee201d80d3b32e4e632b101f4c25362a1a05b),
[`865bec590`](https://github.com/benjie/crystal/commit/865bec5901f666e147f5d4088152d1f0d2584827),
[`7f857950a`](https://github.com/benjie/crystal/commit/7f857950a7e4ec763c936eb6bd1fb77824041d71),
[`d39a5d409`](https://github.com/benjie/crystal/commit/d39a5d409ffe1a5855740ecbff1ad11ec0bf6660)]:
- @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](https://github.com/benjie/crystal/pull/305)
[`3cf35fdb4`](https://github.com/benjie/crystal/commit/3cf35fdb41d08762e9ff838a55dd7fc6004941f8)
Thanks [@benjie](https://github.com/benjie)! - 🚨 Ruru is now a CommonJS
module, no longer an ESM module.
Ruru CLI now reads options from a `graphile.config.ts` file 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:
```ts
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:
```ts
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](https://github.com/benjie/crystal/pull/307)
[`7c45eaf4e`](https://github.com/benjie/crystal/commit/7c45eaf4ed6edf3b9e7bb17846d553f5504e0fb4)
Thanks [@benjie](https://github.com/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 using `SameSite` cookie
policies, by checking the `Origin` of 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 an `Content-Type: application/json` request
cross origins (unless you've enabled CORS), so this content type doesn't open
CSRF issues on its own, but `Content-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:
```ts
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:
```ts
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](https://graphql.github.io/graphql-over-http/draft/#sec-Media-Types)
so disabling it does not make your server non-compliant.
- Updated dependencies
[[`3cf35fdb4`](https://github.com/benjie/crystal/commit/3cf35fdb41d08762e9ff838a55dd7fc6004941f8),
[`3df3f1726`](https://github.com/benjie/crystal/commit/3df3f17269bb896cdee90ed8c4ab46fb821a1509)]:
- ruru@2.0.0-alpha.2
- grafast@0.0.1-alpha.2
## 0.0.1-alpha.1
### Patch Changes
- [`759ad403d`](https://github.com/benjie/crystal/commit/759ad403d71363312c5225c165873ae84b8a098c)
Thanks [@benjie](https://github.com/benjie)! - Alpha release - see
https://postgraphile.org/news/2023-04-26-version-5-alpha
- Updated dependencies
[[`759ad403d`](https://github.com/benjie/crystal/commit/759ad403d71363312c5225c165873ae84b8a098c)]:
- 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](https://github.com/benjie/crystal/pull/297)
[`90ed0cb7a`](https://github.com/benjie/crystal/commit/90ed0cb7a78479b85115cd1ce045ac253107b3eb)
Thanks [@benjie](https://github.com/benjie)! - Overhaul websocket handling in
Grafserv providing cleaner integration with Grafast.
- [#297](https://github.com/benjie/crystal/pull/297)
[`56be761c2`](https://github.com/benjie/crystal/commit/56be761c29343e28ba4980c62c955b5adaef25c0)
Thanks [@benjie](https://github.com/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](https://github.com/benjie/crystal/pull/297)
[`1a012bdd7`](https://github.com/benjie/crystal/commit/1a012bdd7d3748ac9a4ca9b1f771876654988f25)
Thanks [@benjie](https://github.com/benjie)! - Tweaked error handling
codepaths, extensions can be passed through now and status codes improved.
- Updated dependencies
[[`8d270ead3`](https://github.com/benjie/crystal/commit/8d270ead3fa8331e28974aae052bd48ad537d1bf),
[`b4eaf89f4`](https://github.com/benjie/crystal/commit/b4eaf89f401ca207de08770361d07903f6bb9cb0)]:
- 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`](https://github.com/benjie/crystal/commit/7dcb0e008bc3a60c9ef325a856d16e0baab0b9f0)]:
- grafast@0.0.1-1.2
## 0.0.1-1.1
### Patch Changes
- [#260](https://github.com/benjie/crystal/pull/260)
[`d5312e6b9`](https://github.com/benjie/crystal/commit/d5312e6b968fbeb46d074b82a41b4bdbc166598c)
Thanks [@benjie](https://github.com/benjie)! - TypeScript v5 is now required
- [#282](https://github.com/benjie/crystal/pull/282)
[`f6e644bd3`](https://github.com/benjie/crystal/commit/f6e644bd35be1ee2b63c8636785a241d863b8b5d)
Thanks [@benjie](https://github.com/benjie)! - Allow accessing websocket
connection params via `(ctx as Grafast.RequestContext).ws?.connectionParams`.
- Updated dependencies
[[`ae304b33c`](https://github.com/benjie/crystal/commit/ae304b33c7c5a04d36b552177ae24a7b7b522645),
[`159735204`](https://github.com/benjie/crystal/commit/15973520462d4a95e3cdf04fdacfc71ca851122f),
[`d5312e6b9`](https://github.com/benjie/crystal/commit/d5312e6b968fbeb46d074b82a41b4bdbc166598c),
[`22ec50e36`](https://github.com/benjie/crystal/commit/22ec50e360d90de41c586c5c220438f780c10ee8),
[`0f4709356`](https://github.com/benjie/crystal/commit/0f47093560cf4f8b1f215853bc91d7f6531278cc),
[`395b4a2dd`](https://github.com/benjie/crystal/commit/395b4a2dd24044bad25f5e411a7a7cfa43883eef)]:
- 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`](https://github.com/benjie/crystal/commit/89d16c972f12659de091b0b866768cacfccc8f6b),
[`8f323bdc8`](https://github.com/benjie/crystal/commit/8f323bdc88e39924de50775891bd40f1acb9b7cf),
[`9e7183c02`](https://github.com/benjie/crystal/commit/9e7183c02cb82d5f5c684c4f73962035e0267c83),
[`612092359`](undefined)]:
- grafast@0.0.1-0.23
- ruru@2.0.0-0.13
## 0.0.1-0.24
### Patch Changes
- Updated dependencies
[[`11e7c12c5`](https://github.com/benjie/crystal/commit/11e7c12c5a3545ee24b5e39392fbec190aa1cf85)]:
- 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](https://github.com/benjie/crystal/pull/229)
[`a06b8933f`](https://github.com/benjie/crystal/commit/a06b8933f9365627c2eab019af0c12393e29e509)
Thanks [@benjie](https://github.com/benjie)! - Rename 'eventStreamRoute' to
'eventStreamPath' for consistency with 'graphqlPath' and 'graphiqlPath'. V4
preset unaffected.
- Updated dependencies
[[`f5a04cf66`](https://github.com/benjie/crystal/commit/f5a04cf66f220c11a6a82db8c1a78b1d91606faa),
[`b795b3da5`](https://github.com/benjie/crystal/commit/b795b3da5f8e8f13c495be3a8cf71667f3d149f8)]:
- grafast@0.0.1-0.21
- ruru@2.0.0-0.11
## 0.0.1-0.22
### Patch Changes
- [#226](https://github.com/benjie/crystal/pull/226)
[`6a846e009`](https://github.com/benjie/crystal/commit/6a846e00945ba2dcea0cd89f5e6a8ecc5a32775d)
Thanks [@benjie](https://github.com/benjie)! - Enable users to use Grafserv
alongside other websocket-enabled entities in their final server.
- Updated dependencies [[`aac8732f9`](undefined)]:
- grafast@0.0.1-0.20
## 0.0.1-0.21
### Patch Changes
- Updated dependencies
[[`397e8bb40`](https://github.com/benjie/crystal/commit/397e8bb40fe3783995172356a39ab7cb33e3bd36)]:
- grafast@0.0.1-0.19
## 0.0.1-0.20
### Patch Changes
- Updated dependencies
[[`4c2b7d1ca`](https://github.com/benjie/crystal/commit/4c2b7d1ca1afbda1e47da22c346cc3b03d01b7f0),
[`c8a56cdc8`](https://github.com/benjie/crystal/commit/c8a56cdc83390e5735beb9b90f004e7975cab28c)]:
- grafast@0.0.1-0.18
## 0.0.1-0.19
### Patch Changes
- Updated dependencies [[`f48860d4f`](undefined)]:
- grafast@0.0.1-0.17
## 0.0.1-0.18
### Patch Changes
- Updated dependencies
[[`df89aba52`](https://github.com/benjie/crystal/commit/df89aba524270e52f82987fcc4ab5d78ce180fc5)]:
- grafast@0.0.1-0.16
## 0.0.1-0.17
### Patch Changes
- [#210](https://github.com/benjie/crystal/pull/210)
[`b523118fe`](https://github.com/benjie/crystal/commit/b523118fe6217c027363fea91252a3a1764e17df)
Thanks [@benjie](https://github.com/benjie)! - Replace BaseGraphQLContext with
Grafast.Context throughout.
- [#210](https://github.com/benjie/crystal/pull/210)
[`461c03b72`](https://github.com/benjie/crystal/commit/461c03b72477821ec26cbf703011542e453d083c)
Thanks [@benjie](https://github.com/benjie)! - Make servers releasable where
possible.
- Updated dependencies
[[`b523118fe`](https://github.com/benjie/crystal/commit/b523118fe6217c027363fea91252a3a1764e17df)]:
- grafast@0.0.1-0.15
## 0.0.1-0.16
### Patch Changes
- [#207](https://github.com/benjie/crystal/pull/207)
[`c850dd4ec`](https://github.com/benjie/crystal/commit/c850dd4ec0e42e37122f5bca55a079b53bfd895e)
Thanks [@benjie](https://github.com/benjie)! - Rename 'preset.server' to
'preset.grafserv'.
- [#207](https://github.com/benjie/crystal/pull/207)
[`afa0ea5f6`](https://github.com/benjie/crystal/commit/afa0ea5f6c508d9a0ba5946ab153b13ddbd274a0)
Thanks [@benjie](https://github.com/benjie)! - Fix bug in subscriptions where
termination of underlying stream wouldn't terminate the subscription.
- [#206](https://github.com/benjie/crystal/pull/206)
[`851b78ef2`](https://github.com/benjie/crystal/commit/851b78ef20d430164507ec9b3f41a5a0b8a18ed7)
Thanks [@benjie](https://github.com/benjie)! - Grafserv now masks untrusted
errors by default; trusted errors are constructed via GraphQL's GraphQLError
or Grafast's SafeError.
- Updated dependencies
[[`d76043453`](https://github.com/benjie/crystal/commit/d7604345362c58bf7eb43ef1ac1795a2ac22ae79),
[`afa0ea5f6`](https://github.com/benjie/crystal/commit/afa0ea5f6c508d9a0ba5946ab153b13ddbd274a0),
[`851b78ef2`](https://github.com/benjie/crystal/commit/851b78ef20d430164507ec9b3f41a5a0b8a18ed7),
[`384b3594f`](https://github.com/benjie/crystal/commit/384b3594f543d113650c1b6b02b276360dd2d15f)]:
- grafast@0.0.1-0.14
## 0.0.1-0.15
### Patch Changes
- Updated dependencies [[`e5b664b6f`](undefined)]:
- grafast@0.0.1-0.13
## 0.0.1-0.14
### Patch Changes
- [#200](https://github.com/benjie/crystal/pull/200)
[`1e5671cdb`](https://github.com/benjie/crystal/commit/1e5671cdbbf9f4600b74c43eaa7e33b7bfd75fb9)
Thanks [@benjie](https://github.com/benjie)! - Add support for websocket
GraphQL subscriptions (via graphql-ws) to grafserv and PostGraphile (currently
supporting Node, Express, Koa and Fastify)
- [#200](https://github.com/benjie/crystal/pull/200)
[`5b634a78e`](https://github.com/benjie/crystal/commit/5b634a78e51816071447aceb1edfb813d77d563b)
Thanks [@benjie](https://github.com/benjie)! - Standardize on `serv.addTo`
interface, even for Node
- Updated dependencies
[[`4f5d5bec7`](https://github.com/benjie/crystal/commit/4f5d5bec72f949b17b39cd07acc848ce7a8bfa36),
[`e11698473`](https://github.com/benjie/crystal/commit/e1169847303790570bfafa07eb25d8fce53a0391),
[`25f5a6cbf`](https://github.com/benjie/crystal/commit/25f5a6cbff6cd5a94ebc4f411f7fa89c209fc383)]:
- grafast@0.0.1-0.12
- ruru@2.0.0-0.10
## 0.0.1-0.13
### Patch Changes
- [`0ab95d0b1`](undefined) - Update sponsors.
- [#195](https://github.com/benjie/crystal/pull/195)
[`752ec9c51`](https://github.com/benjie/crystal/commit