@graphitation/supermassive 3.6.1 → 3.6.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/.eslintcache +1 -1
- package/CHANGELOG.md +4 -12
- package/lib/executeWithoutSchema.d.ts.map +1 -1
- package/lib/executeWithoutSchema.js +11 -48
- package/lib/executeWithoutSchema.js.map +2 -2
- package/lib/executeWithoutSchema.mjs +11 -48
- package/lib/executeWithoutSchema.mjs.map +2 -2
- package/lib/hooks/types.d.ts +3 -3
- package/lib/hooks/types.d.ts.map +1 -1
- package/lib/hooks/types.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,24 +1,16 @@
|
|
|
1
1
|
# Change Log - @graphitation/supermassive
|
|
2
2
|
|
|
3
|
-
<!-- This log was last generated on
|
|
3
|
+
<!-- This log was last generated on Thu, 24 Oct 2024 13:14:46 GMT and should not be manually modified. -->
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
-
## 3.6.
|
|
7
|
+
## 3.6.2
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Thu, 24 Oct 2024 13:14:46 GMT
|
|
10
10
|
|
|
11
11
|
### Patches
|
|
12
12
|
|
|
13
|
-
-
|
|
14
|
-
|
|
15
|
-
## 3.6.0
|
|
16
|
-
|
|
17
|
-
Wed, 23 Oct 2024 16:27:07 GMT
|
|
18
|
-
|
|
19
|
-
### Minor changes
|
|
20
|
-
|
|
21
|
-
- async before hooks added (77059398+vejrj@users.noreply.github.com)
|
|
13
|
+
- Bump (77059398+vejrj@users.noreply.github.com)
|
|
22
14
|
|
|
23
15
|
## 3.5.6
|
|
24
16
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"executeWithoutSchema.d.ts","sourceRoot":"","sources":["../src/executeWithoutSchema.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAIZ,YAAY,EACZ,sBAAsB,EACtB,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AE,WAAW,CAAC,CAEpD"}
|
|
@@ -103,7 +103,7 @@ function executeWithoutSchema(args) {
|
|
|
103
103
|
if (!("schemaFragment" in exeContext)) {
|
|
104
104
|
return { errors: exeContext };
|
|
105
105
|
} else {
|
|
106
|
-
return
|
|
106
|
+
return executeOperation(exeContext);
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
109
|
function assertValidExecutionArguments(document, rawVariableValues) {
|
|
@@ -195,17 +195,6 @@ function buildPerEventExecutionContext(exeContext, payload) {
|
|
|
195
195
|
errors: []
|
|
196
196
|
});
|
|
197
197
|
}
|
|
198
|
-
function executeOperationWithBeforeHook(exeContext) {
|
|
199
|
-
const hooks = exeContext.fieldExecutionHooks;
|
|
200
|
-
let hook;
|
|
201
|
-
if (hooks == null ? void 0 : hooks.beforeOperationExecute) {
|
|
202
|
-
hook = invokeBeforeOperationExecuteHook(exeContext);
|
|
203
|
-
}
|
|
204
|
-
if ((0, import_isPromise.isPromise)(hook)) {
|
|
205
|
-
return hook.then(() => executeOperation(exeContext));
|
|
206
|
-
}
|
|
207
|
-
return executeOperation(exeContext);
|
|
208
|
-
}
|
|
209
198
|
function executeOperation(exeContext) {
|
|
210
199
|
try {
|
|
211
200
|
const { operation, rootValue } = exeContext;
|
|
@@ -216,6 +205,10 @@ function executeOperation(exeContext) {
|
|
|
216
205
|
);
|
|
217
206
|
const path = void 0;
|
|
218
207
|
let result;
|
|
208
|
+
const hooks = exeContext.fieldExecutionHooks;
|
|
209
|
+
if (hooks == null ? void 0 : hooks.beforeOperationExecute) {
|
|
210
|
+
invokeBeforeOperationExecuteHook(exeContext);
|
|
211
|
+
}
|
|
219
212
|
switch (operation.operation) {
|
|
220
213
|
case "query":
|
|
221
214
|
result = executeFields(
|
|
@@ -483,10 +476,7 @@ function executeSubscriptionImpl(exeContext) {
|
|
|
483
476
|
if (!isDefaultResolverUsed && (hooks == null ? void 0 : hooks.beforeFieldResolve)) {
|
|
484
477
|
hookContext = invokeBeforeFieldResolveHook(info, exeContext);
|
|
485
478
|
}
|
|
486
|
-
const result = (
|
|
487
|
-
hookContext = context;
|
|
488
|
-
return resolveFn(rootValue, args, contextValue, info);
|
|
489
|
-
}) : resolveFn(rootValue, args, contextValue, info);
|
|
479
|
+
const result = resolveFn(rootValue, args, contextValue, info);
|
|
490
480
|
if ((0, import_isPromise.isPromise)(result)) {
|
|
491
481
|
return result.then(assertEventStream).then(
|
|
492
482
|
(resolved) => {
|
|
@@ -570,24 +560,11 @@ function mapResultOrEventStreamOrPromise(resultOrStreamOrPromise, exeContext, pa
|
|
|
570
560
|
payload
|
|
571
561
|
);
|
|
572
562
|
const hooks = exeContext == null ? void 0 : exeContext.fieldExecutionHooks;
|
|
573
|
-
let beforeExecuteFieldsHook;
|
|
574
563
|
if (hooks == null ? void 0 : hooks.beforeSubscriptionEventEmit) {
|
|
575
|
-
|
|
576
|
-
perEventContext,
|
|
577
|
-
payload
|
|
578
|
-
);
|
|
564
|
+
invokeBeforeSubscriptionEventEmitHook(perEventContext, payload);
|
|
579
565
|
}
|
|
580
566
|
try {
|
|
581
|
-
const data = (
|
|
582
|
-
() => executeFields(
|
|
583
|
-
exeContext,
|
|
584
|
-
parentTypeName,
|
|
585
|
-
payload,
|
|
586
|
-
path,
|
|
587
|
-
groupedFieldSet,
|
|
588
|
-
void 0
|
|
589
|
-
)
|
|
590
|
-
) : executeFields(
|
|
567
|
+
const data = executeFields(
|
|
591
568
|
exeContext,
|
|
592
569
|
parentTypeName,
|
|
593
570
|
payload,
|
|
@@ -653,10 +630,7 @@ function resolveAndCompleteField(exeContext, parentTypeName, fieldDefinition, fi
|
|
|
653
630
|
if (!isDefaultResolverUsed && (hooks == null ? void 0 : hooks.beforeFieldResolve)) {
|
|
654
631
|
hookContext = invokeBeforeFieldResolveHook(info, exeContext);
|
|
655
632
|
}
|
|
656
|
-
const result = (
|
|
657
|
-
hookContext = context;
|
|
658
|
-
return resolveFn(source, args, contextValue, info);
|
|
659
|
-
}) : resolveFn(source, args, contextValue, info);
|
|
633
|
+
const result = resolveFn(source, args, contextValue, info);
|
|
660
634
|
let completed;
|
|
661
635
|
if ((0, import_isPromise.isPromise)(result)) {
|
|
662
636
|
completed = result.then(
|
|
@@ -1397,20 +1371,9 @@ function executeSafe(execute, onComplete) {
|
|
|
1397
1371
|
} catch (e) {
|
|
1398
1372
|
error = e;
|
|
1399
1373
|
} finally {
|
|
1400
|
-
|
|
1401
|
-
onComplete(result, error);
|
|
1402
|
-
}
|
|
1403
|
-
}
|
|
1404
|
-
if (!(0, import_isPromise.isPromise)(result)) {
|
|
1405
|
-
return result;
|
|
1374
|
+
onComplete(result, error);
|
|
1406
1375
|
}
|
|
1407
|
-
return result
|
|
1408
|
-
onComplete(hookResult, error);
|
|
1409
|
-
return hookResult;
|
|
1410
|
-
}).catch((e) => {
|
|
1411
|
-
onComplete(void 0, e);
|
|
1412
|
-
return void 0;
|
|
1413
|
-
});
|
|
1376
|
+
return result;
|
|
1414
1377
|
}
|
|
1415
1378
|
function toGraphQLError(originalError, path, prependMessage) {
|
|
1416
1379
|
const originalMessage = originalError instanceof Error ? originalError.message : (0, import_inspect.inspect)(originalError);
|