@reventlessdev/reventless-graphql-server 1.0.0-alpha.30 → 1.0.0-alpha.32
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.32 (2026-07-27)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* **graphql:** keep a repeat mutation registration from duplicating SDL ([b54e844](https://github.com/ReventlessDev/reventless-core/commit/b54e8446236e16196a40a1a7df9f7ba84b03b167))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
# 1.0.0-alpha.31 (2026-07-27)
|
|
14
|
+
|
|
15
|
+
**Note:** Version bump only for package @reventlessdev/reventless-graphql-server
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
6
21
|
# 1.0.0-alpha.30 (2026-07-27)
|
|
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.32",
|
|
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.25",
|
|
8
|
-
"@reventlessdev/reventless-core": "3.0.0-alpha.
|
|
8
|
+
"@reventlessdev/reventless-core": "3.0.0-alpha.184"
|
|
9
9
|
},
|
|
10
10
|
"devDependencies": {
|
|
11
11
|
"rescript": "12.3.0"
|
|
@@ -85,7 +85,16 @@ let make = (~label: string="GraphQL"): t => {
|
|
|
85
85
|
let lastFullSdl: ref<option<string>> = ref(None)
|
|
86
86
|
|
|
87
87
|
let registerMutations = (~sdlFields: array<string>, ~resolvers: dict<resolverFn>) => {
|
|
88
|
-
|
|
88
|
+
// A mutation field has two legitimate writers: the admin base fragment
|
|
89
|
+
// carries the Plugin aggregate's lifecycle fields, and the aggregate
|
|
90
|
+
// auto-flow registers the same fields when the admin is constructed again
|
|
91
|
+
// for a later deploy onto the same server. buildASTSchema rejects a schema
|
|
92
|
+
// that defines a field twice, so keep the first SDL definition and drop
|
|
93
|
+
// repeats by field name — mirroring the resolver dict, where a repeat
|
|
94
|
+
// registration overwrites by key (last resolver wins).
|
|
95
|
+
let existing = Set.fromArray(mutationFields.contents->Array.map(extractFieldName))
|
|
96
|
+
let fresh = sdlFields->Array.filter(f => !(existing->Set.has(extractFieldName(f))))
|
|
97
|
+
mutationFields.contents = mutationFields.contents->Array.concat(fresh)
|
|
89
98
|
resolvers->Dict.toArray->Array.forEach(((k, v)) => mutationResolvers.contents->Dict.set(k, v))
|
|
90
99
|
}
|
|
91
100
|
|
|
@@ -52,7 +52,9 @@ function make(labelOpt) {
|
|
|
52
52
|
contents: undefined
|
|
53
53
|
};
|
|
54
54
|
let registerMutations = (sdlFields, resolvers) => {
|
|
55
|
-
|
|
55
|
+
let existing = new Set(mutationFields.contents.map(extractFieldName));
|
|
56
|
+
let fresh = sdlFields.filter(f => !existing.has(extractFieldName(f)));
|
|
57
|
+
mutationFields.contents = mutationFields.contents.concat(fresh);
|
|
56
58
|
Object.entries(resolvers).forEach(param => {
|
|
57
59
|
mutationResolvers.contents[param[0]] = param[1];
|
|
58
60
|
});
|