grafserv 0.1.1-beta.2 → 0.1.1-beta.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/CHANGELOG.md +364 -0
  2. package/README.md +3 -5
  3. package/dist/core/base.d.ts +14 -7
  4. package/dist/core/base.d.ts.map +1 -1
  5. package/dist/core/base.js +271 -38
  6. package/dist/core/base.js.map +1 -1
  7. package/dist/envelop/index.d.ts +19 -0
  8. package/dist/envelop/index.d.ts.map +1 -0
  9. package/dist/envelop/index.js +71 -0
  10. package/dist/envelop/index.js.map +1 -0
  11. package/dist/hooks.d.ts +6 -2
  12. package/dist/hooks.d.ts.map +1 -1
  13. package/dist/hooks.js +64 -10
  14. package/dist/hooks.js.map +1 -1
  15. package/dist/index.d.ts +118 -1
  16. package/dist/index.d.ts.map +1 -1
  17. package/dist/index.js +3 -1
  18. package/dist/index.js.map +1 -1
  19. package/dist/interfaces.d.ts +38 -100
  20. package/dist/interfaces.d.ts.map +1 -1
  21. package/dist/interfaces.js.map +1 -1
  22. package/dist/middleware/graphiql.d.ts +3 -1
  23. package/dist/middleware/graphiql.d.ts.map +1 -1
  24. package/dist/middleware/graphiql.js +8 -5
  25. package/dist/middleware/graphiql.js.map +1 -1
  26. package/dist/middleware/graphql.d.ts +4 -4
  27. package/dist/middleware/graphql.d.ts.map +1 -1
  28. package/dist/middleware/graphql.js +43 -69
  29. package/dist/middleware/graphql.js.map +1 -1
  30. package/dist/options.d.ts +4 -2
  31. package/dist/options.d.ts.map +1 -1
  32. package/dist/options.js +7 -4
  33. package/dist/options.js.map +1 -1
  34. package/dist/servers/fastify/v4/index.d.ts.map +1 -1
  35. package/dist/servers/fastify/v4/index.js +33 -27
  36. package/dist/servers/fastify/v4/index.js.map +1 -1
  37. package/dist/servers/h3/v1/index.d.ts +2 -10
  38. package/dist/servers/h3/v1/index.d.ts.map +1 -1
  39. package/dist/servers/h3/v1/index.js +39 -41
  40. package/dist/servers/h3/v1/index.js.map +1 -1
  41. package/dist/servers/node/index.d.ts.map +1 -1
  42. package/dist/servers/node/index.js +3 -0
  43. package/dist/servers/node/index.js.map +1 -1
  44. package/dist/utils.d.ts +7 -2
  45. package/dist/utils.d.ts.map +1 -1
  46. package/dist/utils.js +90 -98
  47. package/dist/utils.js.map +1 -1
  48. package/dist/version.d.ts +2 -0
  49. package/dist/version.d.ts.map +1 -0
  50. package/dist/version.js +6 -0
  51. package/dist/version.js.map +1 -0
  52. package/package.json +23 -9
package/CHANGELOG.md CHANGED
@@ -1,5 +1,369 @@
1
1
  # grafserv
2
2
 
3
+ ## 0.1.1-beta.21
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+ [[`83c546509`](https://github.com/graphile/crystal/commit/83c546509d24be2955a56120981363ad3c3a5f3f)]:
9
+ - graphile-config@0.0.1-beta.14
10
+ - grafast@0.1.1-beta.19
11
+ - ruru@2.0.0-beta.19
12
+
13
+ ## 0.1.1-beta.20
14
+
15
+ ### Patch Changes
16
+
17
+ - Updated dependencies
18
+ [[`7580bc16a`](https://github.com/graphile/crystal/commit/7580bc16a050fd8d916c6dabe9d1ded980090349),
19
+ [`b336a5829`](https://github.com/graphile/crystal/commit/b336a58291cfec7aef884d3843172d408abfaf3c)]:
20
+ - graphile-config@0.0.1-beta.13
21
+ - grafast@0.1.1-beta.18
22
+ - ruru@2.0.0-beta.18
23
+
24
+ ## 0.1.1-beta.19
25
+
26
+ ### Patch Changes
27
+
28
+ - [#2252](https://github.com/graphile/crystal/pull/2252)
29
+ [`866673e14`](https://github.com/graphile/crystal/commit/866673e14f7ad76b6f6d83d1b4e3a4eff8fdba37)
30
+ Thanks [@benjie](https://github.com/benjie)! - Overhaul maskError types to
31
+ return GraphQLFormattedError.
32
+
33
+ - [#2240](https://github.com/graphile/crystal/pull/2240)
34
+ [`9a0f9e78c`](https://github.com/graphile/crystal/commit/9a0f9e78c4ee46f50f49bb068baddef7e1de4119)
35
+ Thanks [@benjie](https://github.com/benjie)! - Adopt new MiddlewareHandlers
36
+ type for simplicity, and in doing so fix type of middleware (for plugins) that
37
+ incorrectly unwrapped promise resulting in TypeScript incorrectly suggesting
38
+ that `await` was not necessary.
39
+ - Updated dependencies
40
+ [[`69ab227b5`](https://github.com/graphile/crystal/commit/69ab227b5e1c057a6fc8ebba87bde80d5aa7f3c8),
41
+ [`38163c86a`](https://github.com/graphile/crystal/commit/38163c86ae628fed84cf38fc6a1cc76a7bc7932a),
42
+ [`d13b76f0f`](https://github.com/graphile/crystal/commit/d13b76f0fef2a58466ecb44880af62d25910e83e),
43
+ [`b167bd849`](https://github.com/graphile/crystal/commit/b167bd8499be5866b71bac6594d55bd768fda1d0),
44
+ [`6a13ecbd4`](https://github.com/graphile/crystal/commit/6a13ecbd45534c39c846c1d8bc58242108426dd1)]:
45
+ - grafast@0.1.1-beta.17
46
+ - ruru@2.0.0-beta.17
47
+ - graphile-config@0.0.1-beta.12
48
+
49
+ ## 0.1.1-beta.18
50
+
51
+ ### Patch Changes
52
+
53
+ - [#2204](https://github.com/graphile/crystal/pull/2204)
54
+ [`bf2a2e72a`](https://github.com/graphile/crystal/commit/bf2a2e72ab78a01f5aba6cda97b5a125563b1f3d)
55
+ Thanks [@Dodobibi](https://github.com/Dodobibi)! - Overhaul websocket support
56
+ in nuxt/h3 server adaptor. Removes experimental methods since they are no
57
+ longer needed. Docs have been updated - please follow the docs. Any issues,
58
+ please let us know (or better: open a PR!)
59
+ - Updated dependencies
60
+ [[`5626c7d36`](https://github.com/graphile/crystal/commit/5626c7d3649285e11fe9857dfa319d2883d027eb),
61
+ [`76c7340b7`](https://github.com/graphile/crystal/commit/76c7340b74d257c454beec883384d19ef078b21e)]:
62
+ - graphile-config@0.0.1-beta.11
63
+ - grafast@0.1.1-beta.16
64
+ - ruru@2.0.0-beta.16
65
+
66
+ ## 0.1.1-beta.17
67
+
68
+ ### Patch Changes
69
+
70
+ - Updated dependencies
71
+ [[`d5834def1`](https://github.com/graphile/crystal/commit/d5834def1fb84f3e2c0c0a6f146f8249a6df890a),
72
+ [`42b982463`](https://github.com/graphile/crystal/commit/42b9824637a6c05e02935f2b05b5e8e0c61965a6),
73
+ [`884a4b429`](https://github.com/graphile/crystal/commit/884a4b4297af90fdadaf73addd524f1fbbcfdcce),
74
+ [`38835313a`](https://github.com/graphile/crystal/commit/38835313ad93445206dccdd4cf07b90c5a6e4377),
75
+ [`cc0941731`](https://github.com/graphile/crystal/commit/cc0941731a1679bc04ce7b7fd4254009bb5f1f62),
76
+ [`b0865d169`](https://github.com/graphile/crystal/commit/b0865d1691105b5419009954c98c8109a27a5d81),
77
+ [`8b472cd51`](https://github.com/graphile/crystal/commit/8b472cd51cd66d8227f9f2722d09c0a774792b0f),
78
+ [`9cd9bb522`](https://github.com/graphile/crystal/commit/9cd9bb5222a9f0398ee4b8bfa4f741b6de2a2192)]:
79
+ - grafast@0.1.1-beta.15
80
+ - graphile-config@0.0.1-beta.10
81
+ - ruru@2.0.0-beta.15
82
+
83
+ ## 0.1.1-beta.16
84
+
85
+ ### Patch Changes
86
+
87
+ - Updated dependencies
88
+ [[`871d32b2a`](https://github.com/graphile/crystal/commit/871d32b2a18df0d257880fc54a61d9e68c4607d6),
89
+ [`a26e3a30c`](https://github.com/graphile/crystal/commit/a26e3a30c02f963f8f5e9c9d021e871f33689e1b),
90
+ [`02c11a4d4`](https://github.com/graphile/crystal/commit/02c11a4d42bf434dffc9354b300e8d791c4eeb2d)]:
91
+ - grafast@0.1.1-beta.14
92
+ - ruru@2.0.0-beta.14
93
+
94
+ ## 0.1.1-beta.15
95
+
96
+ ### Patch Changes
97
+
98
+ - Updated dependencies
99
+ [[`807650035`](https://github.com/graphile/crystal/commit/8076500354a3e2bc2de1b6c4e947bd710cc5bddc)]:
100
+ - grafast@0.1.1-beta.13
101
+ - ruru@2.0.0-beta.14
102
+
103
+ ## 0.1.1-beta.14
104
+
105
+ ### Patch Changes
106
+
107
+ - [#2097](https://github.com/graphile/crystal/pull/2097)
108
+ [`61f8bbca5`](https://github.com/graphile/crystal/commit/61f8bbca5badda5b27872e0ee01a2d4c1372210d)
109
+ Thanks [@FelixZY](https://github.com/FelixZY)! - Improve logging of masked
110
+ errors (thanks @FelixZY)
111
+
112
+ - Updated dependencies
113
+ [[`1bd50b61e`](https://github.com/graphile/crystal/commit/1bd50b61ebb10b7d09b3612c2e2767c41cca3b78),
114
+ [`4e102b1a1`](https://github.com/graphile/crystal/commit/4e102b1a1cd232e6f6703df0706415f01831dab2),
115
+ [`7bb1573ba`](https://github.com/graphile/crystal/commit/7bb1573ba45a4d8b7fa9ad53cdd79686d2641383),
116
+ [`18addb385`](https://github.com/graphile/crystal/commit/18addb3852525aa91019a36d58fa2fecd8b5b443),
117
+ [`6ed615e55`](https://github.com/graphile/crystal/commit/6ed615e557b2ab1fb57f1e68c06730a8e3da7175),
118
+ [`b25cc539c`](https://github.com/graphile/crystal/commit/b25cc539c00aeda7a943c37509aaae4dc7812317),
119
+ [`867f33136`](https://github.com/graphile/crystal/commit/867f331365346fc46ed1e0d23c79719846e398f4),
120
+ [`cf535c210`](https://github.com/graphile/crystal/commit/cf535c21078da06c14dd12f30e9b4378da4ded03),
121
+ [`acf99b190`](https://github.com/graphile/crystal/commit/acf99b190954e3c5926e820daed68dfe8eb3ee1f),
122
+ [`4967a197f`](https://github.com/graphile/crystal/commit/4967a197fd2c71ee2a581fe29470ee9f30e74de5),
123
+ [`1908e1ba1`](https://github.com/graphile/crystal/commit/1908e1ba11883a34dac66f985fc20ab160e572b1),
124
+ [`084d80be6`](https://github.com/graphile/crystal/commit/084d80be6e17187c9a9932bcf079e3f460368782)]:
125
+ - grafast@0.1.1-beta.12
126
+ - ruru@2.0.0-beta.14
127
+
128
+ ## 0.1.1-beta.13
129
+
130
+ ### Patch Changes
131
+
132
+ - [#2071](https://github.com/graphile/crystal/pull/2071)
133
+ [`582bd768f`](https://github.com/graphile/crystal/commit/582bd768fec403ce3284f293b85b9fd86e4d3f40)
134
+ Thanks [@benjie](https://github.com/benjie)! - `GrafastExecutionArgs` now
135
+ accepts `resolvedPreset` and `requestContext` directly; passing these through
136
+ additional arguments is now deprecated and support will be removed in a future
137
+ revision. This affects:
138
+
139
+ - `grafast()`
140
+ - `execute()`
141
+ - `subscribe()`
142
+ - `hookArgs()`
143
+
144
+ `graphile-config` has gained a middleware system which is more powerful than
145
+ it's AsyncHooks system. Old hooks can be emulated through the middleware
146
+ system safely since middleware is a superset of hooks' capabilities.
147
+ `applyHooks` has been renamed to `orderedApply` (because it applies to more
148
+ than just hooks), calling `applyHooks` will still work but is deprecated.
149
+
150
+ 🚨 `grafast` no longer automatically reads your `graphile.config.ts` or
151
+ similar; you must do that yourself and pass the `resolvedPreset` to grafast
152
+ via the `args`. This is to aid in bundling of grafast since it should not need
153
+ to read from filesystem or dynamically load modules.
154
+
155
+ `grafast` no longer outputs performance warning when you set
156
+ `GRAPHILE_ENV=development`.
157
+
158
+ 🚨 `plugin.grafast.hooks.args` is now `plugin.grafast.middleware.prepareArgs`,
159
+ and the signature has changed - you must be sure to call the `next()` function
160
+ and ctx/resolvedPreset can be extracted directly from `args`:
161
+
162
+ ```diff
163
+ const plugin = {
164
+ grafast: {
165
+ - hooks: {
166
+ + middleware: {
167
+ - args({ args, ctx, resolvedPreset }) {
168
+ + prepareArgs(next, { args }) {
169
+ + const { requestContext: ctx, resolvedPreset } = args;
170
+ // ...
171
+ + return next();
172
+ }
173
+ }
174
+ }
175
+ }
176
+ ```
177
+
178
+ Many more middleware have been added; use TypeScript's autocomplete to see
179
+ what's available until we have proper documentation for them.
180
+
181
+ `plugin.grafserv.hooks.*` are still supported but deprecated; instead use
182
+ middleware `plugin.grafserv.middleware.*` (note that call signatures have
183
+ changed slightly, similar to the diff above):
184
+
185
+ - `hooks.init` -> `middleware.setPreset`
186
+ - `hooks.processGraphQLRequestBody` -> `middleware.processGraphQLRequestBody`
187
+ - `hooks.ruruHTMLParts` -> `middleware.ruruHTMLParts`
188
+
189
+ A few TypeScript types related to Hooks have been renamed, but their old names
190
+ are still available, just deprecated. They will be removed in a future update:
191
+
192
+ - `HookObject` -> `FunctionalityObject`
193
+ - `PluginHook` -> `CallbackOrDescriptor`
194
+ - `PluginHookObject` -> `CallbackDescriptor`
195
+ - `PluginHookCallback` -> `UnwrapCallback`
196
+
197
+ - Updated dependencies
198
+ [[`582bd768f`](https://github.com/graphile/crystal/commit/582bd768fec403ce3284f293b85b9fd86e4d3f40)]:
199
+ - graphile-config@0.0.1-beta.9
200
+ - grafast@0.1.1-beta.11
201
+ - ruru@2.0.0-beta.13
202
+
203
+ ## 0.1.1-beta.12
204
+
205
+ ### Patch Changes
206
+
207
+ - Updated dependencies
208
+ [[`3c161f7e1`](https://github.com/graphile/crystal/commit/3c161f7e13375105b1035a7d5d1c0f2b507ca5c7),
209
+ [`a674a9923`](https://github.com/graphile/crystal/commit/a674a9923bc908c9315afa40e0cb256ee0953d16),
210
+ [`b7cfeffd1`](https://github.com/graphile/crystal/commit/b7cfeffd1019d61c713a5054c4f5929960a2a6ab)]:
211
+ - grafast@0.1.1-beta.10
212
+ - ruru@2.0.0-beta.12
213
+
214
+ ## 0.1.1-beta.11
215
+
216
+ ### Patch Changes
217
+
218
+ - Updated dependencies
219
+ [[`437570f97`](https://github.com/graphile/crystal/commit/437570f97e8520afaf3d0d0b514d1f4c31546b76)]:
220
+ - grafast@0.1.1-beta.9
221
+ - ruru@2.0.0-beta.12
222
+
223
+ ## 0.1.1-beta.10
224
+
225
+ ### Patch Changes
226
+
227
+ - Updated dependencies
228
+ [[`bd5a908a4`](https://github.com/graphile/crystal/commit/bd5a908a4d04310f90dfb46ad87398ffa993af3b)]:
229
+ - grafast@0.1.1-beta.8
230
+ - ruru@2.0.0-beta.12
231
+
232
+ ## 0.1.1-beta.9
233
+
234
+ ### Patch Changes
235
+
236
+ - [#2046](https://github.com/graphile/crystal/pull/2046)
237
+ [`a5a0816bd`](https://github.com/graphile/crystal/commit/a5a0816bddc85a841770202db57457ff13137852)
238
+ Thanks [@benjie](https://github.com/benjie)! - Massive refactor of Grafserv
239
+ internals.
240
+
241
+ - Updated dependencies
242
+ [[`357d475f5`](https://github.com/graphile/crystal/commit/357d475f54fecc8c51892e0346d6872b34132430),
243
+ [`3551725e7`](https://github.com/graphile/crystal/commit/3551725e71c3ed876554e19e5ab2c1dcb0fb1143),
244
+ [`80836471e`](https://github.com/graphile/crystal/commit/80836471e5cedb29dee63bc5002550c4f1713cfd),
245
+ [`a5c20fefb`](https://github.com/graphile/crystal/commit/a5c20fefb571dea6d1187515dc48dd547e9e6204),
246
+ [`1ce08980e`](https://github.com/graphile/crystal/commit/1ce08980e2a52ed9bc81564d248c19648ecd3616),
247
+ [`dff4f2535`](https://github.com/graphile/crystal/commit/dff4f2535ac6ce893089b312fcd5fffcd98573a5),
248
+ [`a287a57c2`](https://github.com/graphile/crystal/commit/a287a57c2765da0fb6a132ea0953f64453210ceb),
249
+ [`2fe56f9a6`](https://github.com/graphile/crystal/commit/2fe56f9a6dac03484ace45c29c2223a65f9ca1db),
250
+ [`fed603d71`](https://github.com/graphile/crystal/commit/fed603d719c02f33e12190f925c9e3b06c581fac),
251
+ [`ed6e0d278`](https://github.com/graphile/crystal/commit/ed6e0d2788217a1c419634837f4208013eaf2923),
252
+ [`e82e4911e`](https://github.com/graphile/crystal/commit/e82e4911e32138df1b90ec0fde555ea963018d21),
253
+ [`42ece5aa6`](https://github.com/graphile/crystal/commit/42ece5aa6ca05345ebc17fb5c7d55df3b79b7612),
254
+ [`e0d69e518`](https://github.com/graphile/crystal/commit/e0d69e518a98c70f9b90f59d243ce33978c1b5a1),
255
+ [`db8ceed0f`](https://github.com/graphile/crystal/commit/db8ceed0f17923eb78ff09c9f3f28800a5c7e3b6),
256
+ [`6699388ec`](https://github.com/graphile/crystal/commit/6699388ec167d35c71220ce5d9113cac578da6cb),
257
+ [`966203504`](https://github.com/graphile/crystal/commit/96620350467ab8c65b56adf2f055e19450f8e772),
258
+ [`c1645b249`](https://github.com/graphile/crystal/commit/c1645b249aae949a548cd916e536ccfb63e5ab35),
259
+ [`ed8bbaa3c`](https://github.com/graphile/crystal/commit/ed8bbaa3cd1563a7601ca8c6b0412633b0ea4ce9),
260
+ [`a0e82b9c5`](https://github.com/graphile/crystal/commit/a0e82b9c5f4e585f1af1e147299cd07944ece6f8),
261
+ [`14e2412ee`](https://github.com/graphile/crystal/commit/14e2412ee368e8d53abf6774c7f0069f32d4e8a3),
262
+ [`57ab0e1e7`](https://github.com/graphile/crystal/commit/57ab0e1e72c01213b21d3efc539cd655d83d993a),
263
+ [`8442242e4`](https://github.com/graphile/crystal/commit/8442242e43cac7d89ca0c413cf42c9fabf6f247f),
264
+ [`64ce7b765`](https://github.com/graphile/crystal/commit/64ce7b7650530251aec38a51089da66f914c19b4),
265
+ [`cba842357`](https://github.com/graphile/crystal/commit/cba84235786acbd77ade53bae7a3fba4a9be1eb7),
266
+ [`2fa77d0f2`](https://github.com/graphile/crystal/commit/2fa77d0f237cdb98d3dafb6b5e4083a2c6c38673)]:
267
+ - grafast@0.1.1-beta.7
268
+ - graphile-config@0.0.1-beta.8
269
+ - ruru@2.0.0-beta.12
270
+
271
+ ## 0.1.1-beta.8
272
+
273
+ ### Patch Changes
274
+
275
+ - Updated dependencies
276
+ [[`9f85c614d`](https://github.com/graphile/crystal/commit/9f85c614d48dc745c5fed15333dbb75af7fddc88),
277
+ [`6c6be29f1`](https://github.com/graphile/crystal/commit/6c6be29f12b24782c926b2bc62ed2ede09ac05de),
278
+ [`8315e8d01`](https://github.com/graphile/crystal/commit/8315e8d01c118cebc4ebbc53a2f264b958b252ad)]:
279
+ - grafast@0.1.1-beta.6
280
+ - ruru@2.0.0-beta.11
281
+
282
+ ## 0.1.1-beta.7
283
+
284
+ ### Patch Changes
285
+
286
+ - [#1937](https://github.com/graphile/crystal/pull/1937)
287
+ [`c21252541`](https://github.com/graphile/crystal/commit/c212525410cb2d97a808964ad727d0a68dd15f8b)
288
+ Thanks [@benjie](https://github.com/benjie)! - Export `defaultMaskError` from
289
+ `grafserv`.
290
+
291
+ - Updated dependencies
292
+ [[`63dd7ea99`](https://github.com/graphile/crystal/commit/63dd7ea992d30ad711dd85a73a127484a0e35479),
293
+ [`d801c9778`](https://github.com/graphile/crystal/commit/d801c9778a86d61e060896460af9fe62a733534a),
294
+ [`ef44c29b2`](https://github.com/graphile/crystal/commit/ef44c29b24a1ad5a042ae1536a4546dd64b17195),
295
+ [`941e28003`](https://github.com/graphile/crystal/commit/941e280038a735014a9fe4e24fc534a197fac0f2),
296
+ [`068be2f51`](https://github.com/graphile/crystal/commit/068be2f51d7a9c17311f26c6c9451985397c9e1f),
297
+ [`5de3e86eb`](https://github.com/graphile/crystal/commit/5de3e86eba1ddfe5e07732d0325c63e5d72d4b5b)]:
298
+ - grafast@0.1.1-beta.5
299
+ - ruru@2.0.0-beta.11
300
+ - graphile-config@0.0.1-beta.7
301
+
302
+ ## 0.1.1-beta.6
303
+
304
+ ### Patch Changes
305
+
306
+ - [#1903](https://github.com/graphile/crystal/pull/1903)
307
+ [`de7add402`](https://github.com/graphile/crystal/commit/de7add402bd4a45c8782fce69bf210635360cbe8)
308
+ Thanks [@benjie](https://github.com/benjie)! - Fix bug where stack traces are
309
+ added to masked errors
310
+
311
+ - Updated dependencies
312
+ [[`a2176ea32`](https://github.com/graphile/crystal/commit/a2176ea324db0801249661b30e9c9d314c6fb159),
313
+ [`886833e2e`](https://github.com/graphile/crystal/commit/886833e2e319f23d905d7184ca88fca701b94044)]:
314
+ - grafast@0.1.1-beta.4
315
+ - ruru@2.0.0-beta.10
316
+
317
+ ## 0.1.1-beta.5
318
+
319
+ ### Patch Changes
320
+
321
+ - Updated dependencies
322
+ [[`0df5511ac`](https://github.com/graphile/crystal/commit/0df5511ac8b79ea34f8d12ebf8feeb421f8fe971)]:
323
+ - graphile-config@0.0.1-beta.6
324
+ - grafast@0.1.1-beta.3
325
+ - ruru@2.0.0-beta.10
326
+
327
+ ## 0.1.1-beta.4
328
+
329
+ ### Patch Changes
330
+
331
+ - [#1877](https://github.com/graphile/crystal/pull/1877)
332
+ [`8a0cdb95f`](https://github.com/graphile/crystal/commit/8a0cdb95f200b28b0ea1ab5caa12b23dce5f374f)
333
+ Thanks [@benjie](https://github.com/benjie)! - Move 'declare global' out of
334
+ 'interfaces.ts' and into 'index.ts' or equivalent. Should make TypeScript more
335
+ aware of these types.
336
+
337
+ - [#1849](https://github.com/graphile/crystal/pull/1849)
338
+ [`995e25035`](https://github.com/graphile/crystal/commit/995e250352217fdf8f036b8ed6cad3fab520817f)
339
+ Thanks [@TimoStolz](https://github.com/TimoStolz)! - Tweak websocket
340
+ integration with Fastify: `wsHandlers` are only allowed if method is `GET`.
341
+ - Updated dependencies
342
+ [[`3fdc2bce4`](https://github.com/graphile/crystal/commit/3fdc2bce42418773f808c5b8309dfb361cd95ce9),
343
+ [`aeef362b5`](https://github.com/graphile/crystal/commit/aeef362b5744816f01e4a6f714bbd77f92332bc5),
344
+ [`8a76db07f`](https://github.com/graphile/crystal/commit/8a76db07f4c110cecc6225504f9a05ccbcbc7b92),
345
+ [`8a0cdb95f`](https://github.com/graphile/crystal/commit/8a0cdb95f200b28b0ea1ab5caa12b23dce5f374f),
346
+ [`1c9f1c0ed`](https://github.com/graphile/crystal/commit/1c9f1c0edf4e621a5b6345d3a41527a18143c6ae)]:
347
+ - grafast@0.1.1-beta.2
348
+ - graphile-config@0.0.1-beta.5
349
+ - ruru@2.0.0-beta.9
350
+
351
+ ## 0.1.1-beta.3
352
+
353
+ ### Patch Changes
354
+
355
+ - [#1807](https://github.com/graphile/crystal/pull/1807)
356
+ [`9696a1b08`](https://github.com/graphile/crystal/commit/9696a1b0885442f44e3a6ca6a4909ec96a445884)
357
+ Thanks [@innermatrix](https://github.com/innermatrix)! - Export lambda server
358
+ from `grafserv/lambda/v1`
359
+
360
+ - Updated dependencies
361
+ [[`49fcb0d58`](https://github.com/graphile/crystal/commit/49fcb0d585b31b291c9072c339d6f5b550eefc9f),
362
+ [`7aef73319`](https://github.com/graphile/crystal/commit/7aef73319a8a147c700727be62427e1eefdefbf8)]:
363
+ - grafast@0.1.1-beta.1
364
+ - graphile-config@0.0.1-beta.4
365
+ - ruru@2.0.0-beta.8
366
+
3
367
  ## 0.1.1-beta.2
4
368
 
5
369
  ### Patch Changes
package/README.md CHANGED
@@ -26,12 +26,10 @@ And please give some love to our featured sponsors 🤩:
26
26
  <table><tr>
27
27
  <td align="center"><a href="https://www.the-guild.dev/"><img src="https://graphile.org/images/sponsors/theguild.png" width="90" height="90" alt="The Guild" /><br />The Guild</a> *</td>
28
28
  <td align="center"><a href="https://dovetailapp.com/"><img src="https://graphile.org/images/sponsors/dovetail.png" width="90" height="90" alt="Dovetail" /><br />Dovetail</a> *</td>
29
- <td align="center"><a href="https://www.netflix.com/"><img src="https://graphile.org/images/sponsors/Netflix.png" width="90" height="90" alt="Netflix" /><br />Netflix</a> *</td>
30
- <td align="center"><a href=""><img src="https://graphile.org/images/sponsors/chadf.png" width="90" height="90" alt="Chad Furman" /><br />Chad Furman</a> *</td>
31
- </tr><tr>
32
29
  <td align="center"><a href="https://stellate.co/"><img src="https://graphile.org/images/sponsors/Stellate.png" width="90" height="90" alt="Stellate" /><br />Stellate</a> *</td>
33
- <td align="center"><a href="https://www.accenture.com/"><img src="https://graphile.org/images/sponsors/accenture.svg" width="90" height="90" alt="Accenture" /><br />Accenture</a> *</td>
34
- <td align="center"><a href="https://microteam.io/"><img src="https://graphile.org/images/sponsors/micro.png" width="90" height="90" alt="We Love Micro" /><br />We Love Micro</a> *</td>
30
+ <td align="center"><a href="https://gosteelhead.com/"><img src="https://graphile.org/images/sponsors/steelhead.svg" width="90" height="90" alt="Steelhead" /><br />Steelhead</a> *</td>
31
+ </tr><tr>
32
+ <td align="center"><a href=""><img src="https://graphile.org/images/sponsors/latchbio.jpg" width="90" height="90" alt="LatchBio" /><br />LatchBio</a> *</td>
35
33
  </tr></table>
36
34
 
37
35
  <em>\* Sponsors the entire Graphile suite</em>
@@ -1,34 +1,41 @@
1
1
  import type { PromiseOrDirect, TypedEventEmitter } from "grafast";
2
2
  import type { GraphQLSchema } from "grafast/graphql";
3
- import type { ErrorResult, GrafservConfig, HandlerResult, RequestDigest, Result, SchemaChangeEvent } from "../interfaces.js";
3
+ import type { Middleware } from "graphile-config";
4
+ import type { DynamicOptions, ErrorResult, ExecutionConfig, GrafservConfig, HandlerResult, RequestDigest, Result, SchemaChangeEvent } from "../interfaces.js";
4
5
  import { makeGraphiQLHandler } from "../middleware/graphiql.js";
5
6
  import { makeGraphQLHandler } from "../middleware/graphql.js";
6
- import type { OptionsFromConfig } from "../options.js";
7
7
  export declare class GrafservBase {
8
8
  private releaseHandlers;
9
9
  private releasing;
10
- /** @internal */
11
- dynamicOptions: OptionsFromConfig;
10
+ dynamicOptions: DynamicOptions;
11
+ getExecutionConfig(_ctx: Partial<Grafast.RequestContext>): PromiseOrDirect<ExecutionConfig>;
12
12
  resolvedPreset: GraphileConfig.ResolvedPreset;
13
+ grafastMiddleware: Middleware<GraphileConfig.GrafastMiddleware> | null;
13
14
  protected schema: GraphQLSchema | PromiseLike<GraphQLSchema> | null;
14
15
  protected schemaError: PromiseLike<GraphQLSchema> | null;
15
16
  protected eventEmitter: TypedEventEmitter<{
16
17
  "schema:ready": GraphQLSchema;
17
18
  "schema:error": any;
19
+ "dynamicOptions:ready": Record<string, never>;
20
+ "dynamicOptions:error": any;
18
21
  }>;
19
22
  private initialized;
20
23
  graphqlHandler: ReturnType<typeof makeGraphQLHandler>;
21
24
  graphiqlHandler: ReturnType<typeof makeGraphiQLHandler>;
22
25
  constructor(config: GrafservConfig);
23
- private _processRequest;
24
- protected processRequest(request: RequestDigest): PromiseOrDirect<Result | null>;
26
+ protected processRequest(requestDigest: RequestDigest): PromiseOrDirect<Result | null>;
25
27
  getPreset(): GraphileConfig.ResolvedPreset;
26
28
  getSchema(): PromiseOrDirect<GraphQLSchema>;
27
29
  release(): Promise<void>;
28
30
  onRelease(cb: () => PromiseOrDirect<void>): void;
29
- setPreset(newPreset: GraphileConfig.Preset): void;
31
+ private _settingPreset;
32
+ setPreset(newPreset: GraphileConfig.Preset): PromiseOrDirect<void>;
30
33
  setSchema(newSchema: GraphQLSchema): void;
31
34
  private refreshHandlers;
35
+ private waitForGraphqlHandler;
36
+ private waitForGraphiqlHandler;
37
+ private failedGraphqlHandler;
38
+ private failedGraphiqlHandler;
32
39
  makeStream(): AsyncIterableIterator<SchemaChangeEvent>;
33
40
  }
34
41
  export declare function convertHandlerResultToResult(handlerResult: HandlerResult | null): PromiseOrDirect<Result | null>;
@@ -1 +1 @@
1
- {"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../src/core/base.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAElE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAIrD,OAAO,KAAK,EAEV,WAAW,EAEX,cAAc,EACd,aAAa,EAIb,aAAa,EACb,MAAM,EACN,iBAAiB,EAClB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAMvD,qBAAa,YAAY;IACvB,OAAO,CAAC,eAAe,CAA0C;IACjE,OAAO,CAAC,SAAS,CAAS;IAC1B,gBAAgB;IACT,cAAc,EAAG,iBAAiB,CAAC;IACnC,cAAc,EAAG,cAAc,CAAC,cAAc,CAAC;IACtD,SAAS,CAAC,MAAM,EAAE,aAAa,GAAG,WAAW,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC;IACpE,SAAS,CAAC,WAAW,EAAE,WAAW,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC;IACzD,SAAS,CAAC,YAAY,EAAE,iBAAiB,CAAC;QACxC,cAAc,EAAE,aA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