@envelop/core
Advanced tools
Comparing version 0.1.3 to 0.1.4-alpha-634433a.0
@@ -221,5 +221,7 @@ 'use strict'; | ||
let executeFn = graphql.execute; | ||
let result; | ||
const afterCalls = []; | ||
let context = args.contextValue; | ||
for (const plugin of beforeExecuteCalls) { | ||
let stopCalled = false; | ||
const after = plugin.onExecute({ | ||
@@ -230,2 +232,6 @@ executeFn, | ||
}, | ||
setResultAndStopExecution: stopResult => { | ||
stopCalled = true; | ||
result = stopResult; | ||
}, | ||
extendContext: extension => { | ||
@@ -244,2 +250,5 @@ if (typeof extension === 'object') { | ||
}); | ||
if (stopCalled) { | ||
return result; | ||
} | ||
if (after) { | ||
@@ -257,3 +266,3 @@ if (after.onExecuteDone) { | ||
} | ||
let result = await executeFn({ | ||
result = await executeFn({ | ||
...args, | ||
@@ -260,0 +269,0 @@ contextValue: context, |
@@ -217,5 +217,7 @@ export * from '@envelop/types'; | ||
let executeFn = execute; | ||
let result; | ||
const afterCalls = []; | ||
let context = args.contextValue; | ||
for (const plugin of beforeExecuteCalls) { | ||
let stopCalled = false; | ||
const after = plugin.onExecute({ | ||
@@ -226,2 +228,6 @@ executeFn, | ||
}, | ||
setResultAndStopExecution: stopResult => { | ||
stopCalled = true; | ||
result = stopResult; | ||
}, | ||
extendContext: extension => { | ||
@@ -240,2 +246,5 @@ if (typeof extension === 'object') { | ||
}); | ||
if (stopCalled) { | ||
return result; | ||
} | ||
if (after) { | ||
@@ -253,3 +262,3 @@ if (after.onExecuteDone) { | ||
} | ||
let result = await executeFn({ | ||
result = await executeFn({ | ||
...args, | ||
@@ -256,0 +265,0 @@ contextValue: context, |
{ | ||
"name": "@envelop/core", | ||
"version": "0.1.3", | ||
"version": "0.1.4-alpha-634433a.0", | ||
"sideEffects": false, | ||
@@ -9,3 +9,3 @@ "peerDependencies": { | ||
"dependencies": { | ||
"@envelop/types": "0.1.3" | ||
"@envelop/types": "0.1.4-alpha-634433a.0" | ||
}, | ||
@@ -12,0 +12,0 @@ "repository": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
115173
1044
+ Added@envelop/types@0.1.4-alpha-634433a.0(transitive)
- Removed@envelop/types@0.1.3(transitive)