grafserv 0.0.1-beta.8 → 0.1.0
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.
- package/CHANGELOG.md +19 -0
- package/README.md +5 -5
- package/dist/servers/h3/v1/index.d.ts +18 -1
- package/dist/servers/h3/v1/index.d.ts.map +1 -1
- package/dist/servers/h3/v1/index.js +82 -1
- package/dist/servers/h3/v1/index.js.map +1 -1
- package/package.json +11 -11
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# grafserv
|
|
2
2
|
|
|
3
|
+
## 0.0.1-beta.9
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#514](https://github.com/graphile/crystal-pre-merge/pull/514)
|
|
8
|
+
[`c9848f693`](https://github.com/graphile/crystal-pre-merge/commit/c9848f6936a5abd7740c0638bfb458fb5551f03b)
|
|
9
|
+
Thanks [@benjie](https://github.com/benjie)! - Update package.json repository
|
|
10
|
+
information
|
|
11
|
+
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
[[`c9848f693`](https://github.com/graphile/crystal-pre-merge/commit/c9848f6936a5abd7740c0638bfb458fb5551f03b),
|
|
14
|
+
[`ede1092fe`](https://github.com/graphile/crystal-pre-merge/commit/ede1092fe197719b6fa786f4cfa75f6a1f4c56c1),
|
|
15
|
+
[`566983fbd`](https://github.com/graphile/crystal-pre-merge/commit/566983fbd99c4b2df8c4ebd6260521670a2b7dfc),
|
|
16
|
+
[`409bf6071`](https://github.com/graphile/crystal-pre-merge/commit/409bf607180d4d8faec658c803e5ec4d1a00c451)]:
|
|
17
|
+
- graphile-config@0.0.1-beta.3
|
|
18
|
+
- grafast@0.0.1-beta.8
|
|
19
|
+
- ruru@2.0.0-beta.5
|
|
20
|
+
- @graphile/lru@5.0.0-beta.3
|
|
21
|
+
|
|
3
22
|
## 0.0.1-beta.8
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -15,9 +15,9 @@ _**A highly performant GraphQL server for Node.js, powered by
|
|
|
15
15
|
|
|
16
16
|
## Crowd-funded open-source software
|
|
17
17
|
|
|
18
|
-
To help us develop this software sustainably
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
To help us develop this software sustainably, we ask all individuals and
|
|
19
|
+
businesses that use it to help support its ongoing maintenance and development
|
|
20
|
+
via sponsorship.
|
|
21
21
|
|
|
22
22
|
### [Click here to find out more about sponsors and sponsorship.](https://www.graphile.org/sponsor/)
|
|
23
23
|
|
|
@@ -26,12 +26,12 @@ 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://qwick.com/"><img src="https://graphile.org/images/sponsors/qwick.png" width="90" height="90" alt="Qwick" /><br />Qwick</a> *</td>
|
|
30
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>
|
|
31
|
-
</tr><tr>
|
|
32
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>
|
|
33
32
|
<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>
|
|
34
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>
|
|
35
35
|
</tr></table>
|
|
36
36
|
|
|
37
37
|
<em>\* Sponsors the entire Graphile suite</em>
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
|
|
2
|
+
/// <reference types="node" />
|
|
3
|
+
/// <reference types="node" />
|
|
4
|
+
/// <reference types="node" />
|
|
5
|
+
import type { IncomingMessage, Server as HTTPServer } from "node:http";
|
|
6
|
+
import type { Server as HTTPSServer } from "node:https";
|
|
7
|
+
import type { Duplex } from "node:stream";
|
|
8
|
+
import type { App, H3Event } from "h3";
|
|
3
9
|
import { GrafservBase } from "../../../index.js";
|
|
4
10
|
import type { GrafservConfig, Result } from "../../../interfaces.js";
|
|
5
11
|
declare global {
|
|
@@ -13,8 +19,19 @@ declare global {
|
|
|
13
19
|
}
|
|
14
20
|
export declare class H3Grafserv extends GrafservBase {
|
|
15
21
|
constructor(config: GrafservConfig);
|
|
22
|
+
/**
|
|
23
|
+
* @deprecated use handleGraphQLEvent instead
|
|
24
|
+
*/
|
|
16
25
|
handleEvent(event: H3Event): Promise<Buffer | import("../../../interfaces.js").JSONValue | undefined>;
|
|
26
|
+
handleGraphQLEvent(event: H3Event): Promise<Buffer | import("../../../interfaces.js").JSONValue | undefined>;
|
|
27
|
+
handleGraphiqlEvent(event: H3Event): Promise<Buffer | import("../../../interfaces.js").JSONValue | undefined>;
|
|
28
|
+
handleEventStreamEvent(event: H3Event): Promise<Buffer | import("../../../interfaces.js").JSONValue | undefined>;
|
|
17
29
|
send(event: H3Event, result: Result | null): Promise<Buffer | import("../../../interfaces.js").JSONValue | undefined>;
|
|
30
|
+
addTo(app: App): Promise<void>;
|
|
31
|
+
getUpgradeHandler_experimental(): Promise<((req: IncomingMessage, socket: Duplex, head: Buffer) => void) | null>;
|
|
32
|
+
shouldHandleUpgrade_experimental(req: IncomingMessage, _socket: Duplex, _head: Buffer): boolean;
|
|
33
|
+
addTo_experimental(app: App, server: HTTPServer | HTTPSServer | undefined, addExclusiveWebsocketHandler?: boolean): Promise<void>;
|
|
34
|
+
attachWebsocketsToServer_experimental(server: HTTPServer | HTTPSServer): Promise<void>;
|
|
18
35
|
}
|
|
19
36
|
export declare function grafserv(config: GrafservConfig): H3Grafserv;
|
|
20
37
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/servers/h3/v1/index.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/servers/h3/v1/index.ts"],"names":[],"mappings":";;;;AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,WAAW,CAAC;AACvE,OAAO,KAAK,EAAE,MAAM,IAAI,WAAW,EAAE,MAAM,YAAY,CAAC;AACxD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAG1C,OAAO,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;AAcvC,OAAO,EAEL,YAAY,EAGb,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAGV,cAAc,EAEd,MAAM,EACP,MAAM,wBAAwB,CAAC;AAGhC,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,OAAO,CAAC;QAChB,UAAU,cAAc;YACtB,IAAI,EAAE;gBACJ,KAAK,EAAE,OAAO,CAAC;aAChB,CAAC;SACH;KACF;CACF;AAqCD,qBAAa,UAAW,SAAQ,YAAY;gBAC9B,MAAM,EAAE,cAAc;IAIlC;;OAEG;IACU,WAAW,CAAC,KAAK,EAAE,OAAO;IAI1B,kBAAkB,CAAC,KAAK,EAAE,OAAO;IAWjC,mBAAmB,CAAC,KAAK,EAAE,OAAO;IAQlC,sBAAsB,CAAC,KAAK,EAAE,OAAO;IAcrC,IAAI,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI;IA0F1C,KAAK,CAAC,GAAG,EAAE,GAAG;IA8BrB,8BAA8B;IAQpC,gCAAgC,CAC9B,GAAG,EAAE,eAAe,EACpB,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,MAAM;IAYF,kBAAkB,CAC7B,GAAG,EAAE,GAAG,EACR,MAAM,EAAE,UAAU,GAAG,WAAW,GAAG,SAAS,EAC5C,4BAA4B,UAAO;IASxB,qCAAqC,CAChD,MAAM,EAAE,UAAU,GAAG,WAAW;CAiBnC;AAED,wBAAgB,QAAQ,CAAC,MAAM,EAAE,cAAc,cAE9C"}
|
|
@@ -4,6 +4,7 @@ exports.grafserv = exports.H3Grafserv = void 0;
|
|
|
4
4
|
const node_stream_1 = require("node:stream");
|
|
5
5
|
const h3_1 = require("h3");
|
|
6
6
|
const index_js_1 = require("../../../index.js");
|
|
7
|
+
const index_js_2 = require("../../node/index.js");
|
|
7
8
|
function getDigest(event) {
|
|
8
9
|
const req = event.node.req;
|
|
9
10
|
const res = event.node.res;
|
|
@@ -11,7 +12,7 @@ function getDigest(event) {
|
|
|
11
12
|
httpVersionMajor: req.httpVersionMajor,
|
|
12
13
|
httpVersionMinor: req.httpVersionMinor,
|
|
13
14
|
isSecure: (0, h3_1.getRequestProtocol)(event) === "https",
|
|
14
|
-
method:
|
|
15
|
+
method: event.method,
|
|
15
16
|
path: event.path,
|
|
16
17
|
headers: (0, index_js_1.processHeaders)((0, h3_1.getRequestHeaders)(event)),
|
|
17
18
|
getQueryParams() {
|
|
@@ -42,12 +43,36 @@ class H3Grafserv extends index_js_1.GrafservBase {
|
|
|
42
43
|
constructor(config) {
|
|
43
44
|
super(config);
|
|
44
45
|
}
|
|
46
|
+
/**
|
|
47
|
+
* @deprecated use handleGraphQLEvent instead
|
|
48
|
+
*/
|
|
45
49
|
async handleEvent(event) {
|
|
50
|
+
return this.handleGraphQLEvent(event);
|
|
51
|
+
}
|
|
52
|
+
async handleGraphQLEvent(event) {
|
|
46
53
|
const digest = getDigest(event);
|
|
47
54
|
const handlerResult = await this.graphqlHandler((0, index_js_1.normalizeRequest)(digest), this.graphiqlHandler);
|
|
48
55
|
const result = await (0, index_js_1.convertHandlerResultToResult)(handlerResult);
|
|
49
56
|
return this.send(event, result);
|
|
50
57
|
}
|
|
58
|
+
async handleGraphiqlEvent(event) {
|
|
59
|
+
const digest = getDigest(event);
|
|
60
|
+
const handlerResult = await this.graphiqlHandler((0, index_js_1.normalizeRequest)(digest));
|
|
61
|
+
const result = await (0, index_js_1.convertHandlerResultToResult)(handlerResult);
|
|
62
|
+
return this.send(event, result);
|
|
63
|
+
}
|
|
64
|
+
async handleEventStreamEvent(event) {
|
|
65
|
+
const digest = getDigest(event);
|
|
66
|
+
const handlerResult = {
|
|
67
|
+
type: "event-stream",
|
|
68
|
+
request: (0, index_js_1.normalizeRequest)(digest),
|
|
69
|
+
dynamicOptions: this.dynamicOptions,
|
|
70
|
+
payload: this.makeStream(),
|
|
71
|
+
statusCode: 200,
|
|
72
|
+
};
|
|
73
|
+
const result = await (0, index_js_1.convertHandlerResultToResult)(handlerResult);
|
|
74
|
+
return this.send(event, result);
|
|
75
|
+
}
|
|
51
76
|
async send(event, result) {
|
|
52
77
|
if (result === null) {
|
|
53
78
|
// 404
|
|
@@ -138,6 +163,62 @@ class H3Grafserv extends index_js_1.GrafservBase {
|
|
|
138
163
|
}
|
|
139
164
|
}
|
|
140
165
|
}
|
|
166
|
+
async addTo(app) {
|
|
167
|
+
const dynamicOptions = this.dynamicOptions;
|
|
168
|
+
const router = (0, h3_1.createRouter)();
|
|
169
|
+
app.use(router);
|
|
170
|
+
router.use(this.dynamicOptions.graphqlPath, (0, h3_1.eventHandler)((event) => this.handleGraphQLEvent(event)), this.dynamicOptions.graphqlOverGET ||
|
|
171
|
+
this.dynamicOptions.graphiqlOnGraphQLGET
|
|
172
|
+
? ["get", "post"]
|
|
173
|
+
: ["post"]);
|
|
174
|
+
if (dynamicOptions.graphiql) {
|
|
175
|
+
router.get(this.dynamicOptions.graphiqlPath, (0, h3_1.eventHandler)((event) => this.handleGraphiqlEvent(event)));
|
|
176
|
+
}
|
|
177
|
+
if (dynamicOptions.watch) {
|
|
178
|
+
router.get(this.dynamicOptions.eventStreamPath, (0, h3_1.eventHandler)((event) => this.handleEventStreamEvent(event)));
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
async getUpgradeHandler_experimental() {
|
|
182
|
+
if (this.resolvedPreset.grafserv?.websockets) {
|
|
183
|
+
return (0, index_js_2.makeNodeUpgradeHandler)(this);
|
|
184
|
+
}
|
|
185
|
+
else {
|
|
186
|
+
return null;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
shouldHandleUpgrade_experimental(req, _socket, _head) {
|
|
190
|
+
const fullUrl = req.url;
|
|
191
|
+
if (!fullUrl) {
|
|
192
|
+
return false;
|
|
193
|
+
}
|
|
194
|
+
const q = fullUrl.indexOf("?");
|
|
195
|
+
const url = q >= 0 ? fullUrl.substring(0, q) : fullUrl;
|
|
196
|
+
const graphqlPath = this.dynamicOptions.graphqlPath;
|
|
197
|
+
return url === graphqlPath;
|
|
198
|
+
}
|
|
199
|
+
async addTo_experimental(app, server, addExclusiveWebsocketHandler = true) {
|
|
200
|
+
this.addTo(app);
|
|
201
|
+
if (addExclusiveWebsocketHandler && server) {
|
|
202
|
+
await this.attachWebsocketsToServer_experimental(server);
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
async attachWebsocketsToServer_experimental(server) {
|
|
206
|
+
const grafservUpgradeHandler = await this.getUpgradeHandler_experimental();
|
|
207
|
+
if (grafservUpgradeHandler) {
|
|
208
|
+
const upgrade = (req, socket, head) => {
|
|
209
|
+
if (this.shouldHandleUpgrade_experimental(req, socket, head)) {
|
|
210
|
+
grafservUpgradeHandler(req, socket, head);
|
|
211
|
+
}
|
|
212
|
+
else {
|
|
213
|
+
socket.destroy();
|
|
214
|
+
}
|
|
215
|
+
};
|
|
216
|
+
server.on("upgrade", upgrade);
|
|
217
|
+
this.onRelease(() => {
|
|
218
|
+
server.off("upgrade", upgrade);
|
|
219
|
+
});
|
|
220
|
+
}
|
|
221
|
+
}
|
|
141
222
|
}
|
|
142
223
|
exports.H3Grafserv = H3Grafserv;
|
|
143
224
|
function grafserv(config) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/servers/h3/v1/index.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/servers/h3/v1/index.ts"],"names":[],"mappings":";;;AAGA,6CAA0C;AAG1C,2BAWY;AAEZ,gDAK2B;AAQ3B,kDAA6D;AAY7D,SAAS,SAAS,CAAC,KAAc;IAC/B,MAAM,GAAG,GAAG,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC;IAC3B,MAAM,GAAG,GAAG,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC;IAC3B,OAAO;QACL,gBAAgB,EAAE,GAAG,CAAC,gBAAgB;QACtC,gBAAgB,EAAE,GAAG,CAAC,gBAAgB;QACtC,QAAQ,EAAE,IAAA,uBAAkB,EAAC,KAAK,CAAC,KAAK,OAAO;QAC/C,MAAM,EAAE,KAAK,CAAC,MAAM;QACpB,IAAI,EAAE,KAAK,CAAC,IAAI;QAChB,OAAO,EAAE,IAAA,yBAAc,EAAC,IAAA,sBAAiB,EAAC,KAAK,CAAC,CAAC;QACjD,cAAc;YACZ,OAAO,IAAA,aAAQ,EAAC,KAAK,CAAsC,CAAC;QAC9D,CAAC;QACD,KAAK,CAAC,OAAO;YACX,MAAM,MAAM,GAAG,MAAM,IAAA,gBAAW,EAAC,KAAK,EAAE,KAAK,CAAC,CAAC;YAC/C,IAAI,CAAC,MAAM,EAAE;gBACX,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;aACpD;YACD,OAAO;gBACL,IAAI,EAAE,QAAQ;gB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": "A highly optimized server for GraphQL, powered by Grafast",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
},
|
|
53
53
|
"repository": {
|
|
54
54
|
"type": "git",
|
|
55
|
-
"url": "git+https://github.com/graphile/
|
|
55
|
+
"url": "git+https://github.com/graphile/crystal.git"
|
|
56
56
|
},
|
|
57
57
|
"keywords": [
|
|
58
58
|
"server",
|
|
@@ -65,24 +65,24 @@
|
|
|
65
65
|
"author": "Benjie Gillam <code@benjiegillam.com>",
|
|
66
66
|
"license": "MIT",
|
|
67
67
|
"bugs": {
|
|
68
|
-
"url": "https://github.com/graphile/
|
|
68
|
+
"url": "https://github.com/graphile/crystal/issues"
|
|
69
69
|
},
|
|
70
|
-
"homepage": "https://github.com/graphile/
|
|
70
|
+
"homepage": "https://github.com/graphile/crystal/tree/main/grafast/grafserv",
|
|
71
71
|
"dependencies": {
|
|
72
|
-
"@graphile/lru": "^5.0.0-beta.
|
|
72
|
+
"@graphile/lru": "^5.0.0-beta.3",
|
|
73
73
|
"debug": "^4.3.4",
|
|
74
74
|
"eventemitter3": "^5.0.1",
|
|
75
|
-
"graphile-config": "^0.0.1-beta.
|
|
75
|
+
"graphile-config": "^0.0.1-beta.3",
|
|
76
76
|
"graphql-ws": "^5.14.0",
|
|
77
|
-
"ruru": "^2.0.0-beta.
|
|
77
|
+
"ruru": "^2.0.0-beta.5",
|
|
78
78
|
"tslib": "^2.6.2"
|
|
79
79
|
},
|
|
80
80
|
"engines": {
|
|
81
81
|
"node": ">=16.10"
|
|
82
82
|
},
|
|
83
83
|
"peerDependencies": {
|
|
84
|
-
"grafast": "^0.
|
|
85
|
-
"graphile-config": "^0.0.1-beta.
|
|
84
|
+
"grafast": "^0.1.0",
|
|
85
|
+
"graphile-config": "^0.0.1-beta.3",
|
|
86
86
|
"graphql": "^16.1.0-experimental-stream-defer.6",
|
|
87
87
|
"h3": "^1.7.1",
|
|
88
88
|
"ws": "^8.12.1"
|
|
@@ -102,11 +102,11 @@
|
|
|
102
102
|
"@whatwg-node/fetch": "^0.9.10",
|
|
103
103
|
"express": "^4.18.2",
|
|
104
104
|
"fastify": "^4.22.1",
|
|
105
|
-
"grafast": "^0.
|
|
105
|
+
"grafast": "^0.1.0",
|
|
106
106
|
"graphql-http": "^1.22.0",
|
|
107
107
|
"h3": "^1.8.1",
|
|
108
108
|
"jest": "^29.6.4",
|
|
109
|
-
"jest-serializer-graphql-schema": "^5.0.0-beta.
|
|
109
|
+
"jest-serializer-graphql-schema": "^5.0.0-beta.3",
|
|
110
110
|
"koa": "^2.14.2",
|
|
111
111
|
"koa-bodyparser": "^4.4.1",
|
|
112
112
|
"nodemon": "^3.0.1",
|