@luvio/graphql 0.145.1 → 0.145.2
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/dist/luvioGraphql.js +16 -3
- package/package.json +3 -3
package/dist/luvioGraphql.js
CHANGED
|
@@ -181,9 +181,22 @@ function mergeSelectionSets(set1, set2) {
|
|
|
181
181
|
}
|
|
182
182
|
}
|
|
183
183
|
else if (selection.kind === 'InlineFragment') {
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
184
|
+
const existingFragmentIndex = mergedSelections.findIndex((sel) => {
|
|
185
|
+
return (sel.kind === 'InlineFragment' &&
|
|
186
|
+
areTypeConditionsEqual(sel.typeCondition, selection.typeCondition) &&
|
|
187
|
+
areDirectivesEqual(sel.directives, selection.directives));
|
|
188
|
+
});
|
|
189
|
+
if (existingFragmentIndex > -1) {
|
|
190
|
+
const existingFragment = mergedSelections[existingFragmentIndex];
|
|
191
|
+
const mergedSelectionSet = mergeSelectionSets(existingFragment.selectionSet, selection.selectionSet);
|
|
192
|
+
if (mergedSelectionSet) {
|
|
193
|
+
mergedSelections[existingFragmentIndex] = {
|
|
194
|
+
...existingFragment,
|
|
195
|
+
selectionSet: mergedSelectionSet,
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
else {
|
|
187
200
|
mergedSelections.push(selection);
|
|
188
201
|
}
|
|
189
202
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@luvio/graphql",
|
|
3
|
-
"version": "0.145.
|
|
3
|
+
"version": "0.145.2",
|
|
4
4
|
"description": "GraphQL utilities for Luvio GraphQL adapter support",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"test:size": "luvioBundlesize"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@luvio/engine": "^0.145.
|
|
31
|
-
"@luvio/graphql-parser": "^0.145.
|
|
30
|
+
"@luvio/engine": "^0.145.2",
|
|
31
|
+
"@luvio/graphql-parser": "^0.145.2"
|
|
32
32
|
},
|
|
33
33
|
"volta": {
|
|
34
34
|
"extends": "../../../package.json"
|