@reventlessdev/reventless-graphql-server 1.0.0-alpha.3 → 1.0.0-alpha.5
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
CHANGED
|
@@ -3,6 +3,21 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# 1.0.0-alpha.5 (2026-07-12)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @reventlessdev/reventless-graphql-server
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# 1.0.0-alpha.4 (2026-07-12)
|
|
15
|
+
|
|
16
|
+
### Features
|
|
17
|
+
|
|
18
|
+
* **api:** neutralize core-emitted SDL — [@aws](https://github.com/aws)_subscribe moves to the AWS adapter (Phase 2a) ([9b27ec8](https://github.com/ReventlessDev/reventless-core/commit/9b27ec8f6ab2b7453b1c50b9891e89781ec3b31a))
|
|
19
|
+
|
|
20
|
+
|
|
6
21
|
# 1.0.0-alpha.3 (2026-07-11)
|
|
7
22
|
|
|
8
23
|
**Note:** Version bump only for package @reventlessdev/reventless-graphql-server
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reventlessdev/reventless-graphql-server",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.5",
|
|
4
4
|
"description": "Transport-neutral GraphQL server runtime for Reventless: schema-from-fragments, resolver registration, an HTTP + graphql-ws listener, and a subscription fan-out bridge with a pluggable PubSub backend",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"@reventlessdev/rescript-graphql-yoga": "1.0.0-alpha.20",
|
|
8
|
-
"@reventlessdev/reventless-core": "3.0.0-alpha.
|
|
8
|
+
"@reventlessdev/reventless-core": "3.0.0-alpha.158"
|
|
9
9
|
},
|
|
10
10
|
"devDependencies": {
|
|
11
11
|
"rescript": "^12.3.0"
|
|
@@ -54,8 +54,9 @@ type subscriptionEntry = {
|
|
|
54
54
|
* The bus→PubSub bridge for each source must already be wired (by the
|
|
55
55
|
* backend) so the topics carry payloads before this registers subscribers.
|
|
56
56
|
*
|
|
57
|
-
* `sdlFields`: the `subscriptions` SDL field strings from the plugin fragment
|
|
58
|
-
*
|
|
57
|
+
* `sdlFields`: the `subscriptions` SDL field strings from the plugin fragment.
|
|
58
|
+
* Core emits provider-neutral subscription SDL (no provider directives), so
|
|
59
|
+
* the fields register as-is.
|
|
59
60
|
*
|
|
60
61
|
* `pubSub`: the backend's PubSub instance; the resolvers subscribe on it.
|
|
61
62
|
*/
|
|
@@ -66,12 +67,6 @@ let registerAll = (
|
|
|
66
67
|
~sourceBEntries: array<subscriptionEntry>,
|
|
67
68
|
~pubSub: YG.pubSub,
|
|
68
69
|
) => {
|
|
69
|
-
// Strip @aws_subscribe directives — only valid in AppSync, not yoga
|
|
70
|
-
let cleanedFields =
|
|
71
|
-
sdlFields->Array.map(field =>
|
|
72
|
-
field->String.split("\n")->Array.filter(line => !(line->String.includes("@aws_subscribe")))->Array.join("\n")
|
|
73
|
-
)
|
|
74
|
-
|
|
75
70
|
let resolvers: dict<YG.resolverFn> = Dict.make()
|
|
76
71
|
|
|
77
72
|
sourceAEntries->Array.forEach(({fieldName, topic}) => {
|
|
@@ -81,7 +76,7 @@ let registerAll = (
|
|
|
81
76
|
resolvers->Dict.set(fieldName, makeFieldResolver(~pubSub, topic))
|
|
82
77
|
})
|
|
83
78
|
|
|
84
|
-
server.registerSubscriptions(~sdlFields
|
|
79
|
+
server.registerSubscriptions(~sdlFields, ~resolvers)
|
|
85
80
|
|
|
86
81
|
// Inject scalar AWSJSON so yoga accepts it in Source A event log types
|
|
87
82
|
server.registerTypes(~sdlTypes=["scalar AWSJSON"])
|
|
@@ -17,7 +17,6 @@ function makeFieldResolver(pubSub, topic) {
|
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
function registerAll(server, sdlFields, sourceAEntries, sourceBEntries, pubSub) {
|
|
20
|
-
let cleanedFields = sdlFields.map(field => field.split("\n").filter(line => !line.includes("@aws_subscribe")).join("\n"));
|
|
21
20
|
let resolvers = {};
|
|
22
21
|
sourceAEntries.forEach(param => {
|
|
23
22
|
resolvers[param.fieldName] = makeFieldResolver(pubSub, param.topic);
|
|
@@ -25,7 +24,7 @@ function registerAll(server, sdlFields, sourceAEntries, sourceBEntries, pubSub)
|
|
|
25
24
|
sourceBEntries.forEach(param => {
|
|
26
25
|
resolvers[param.fieldName] = makeFieldResolver(pubSub, param.topic);
|
|
27
26
|
});
|
|
28
|
-
server.registerSubscriptions(
|
|
27
|
+
server.registerSubscriptions(sdlFields, resolvers);
|
|
29
28
|
server.registerTypes(["scalar AWSJSON"]);
|
|
30
29
|
}
|
|
31
30
|
|