graphile-build
Advanced tools
Comparing version 4.3.2-beta.0 to 4.4.0-alpha.0
@@ -228,3 +228,7 @@ "use strict"; | ||
Object.assign(context, additionalContext); | ||
return makeAsyncIteratorFromMonitor(monitor); | ||
const iterator = makeAsyncIteratorFromMonitor(monitor); | ||
context.liveAbort = e => { | ||
iterator.throw(e); | ||
}; | ||
return iterator; | ||
} | ||
@@ -231,0 +235,0 @@ } |
@@ -23,2 +23,3 @@ "use strict"; | ||
const queryField = queryFields[queryFieldName]; | ||
const oldResolve = queryField.resolve; | ||
memo[queryFieldName] = { | ||
@@ -36,3 +37,15 @@ description: (queryField.description || "") + " (live)", | ||
}, {}), | ||
resolve: queryField.resolve, | ||
...(oldResolve ? { | ||
resolve: async (...args) => { | ||
try { | ||
return await oldResolve(...args); | ||
} catch (e) { | ||
const context = args[2]; | ||
if (typeof context.liveAbort === "function") { | ||
context.liveAbort(e); | ||
} | ||
throw e; | ||
} | ||
} | ||
} : null), | ||
subscribe: build.liveCoordinator.subscribe, | ||
@@ -39,0 +52,0 @@ deprecationReason: queryField.isDeprecated ? queryField.deprecationReason : undefined |
@@ -21,3 +21,3 @@ import { | ||
export interface Options { | ||
[str: string]: mixed; | ||
[str: string]: any; | ||
} | ||
@@ -24,0 +24,0 @@ |
{ | ||
"name": "graphile-build", | ||
"version": "4.3.2-beta.0", | ||
"version": "4.4.0-alpha.0", | ||
"description": "Build a GraphQL schema from plugins", | ||
@@ -61,3 +61,3 @@ "main": "node8plus/index.js", | ||
], | ||
"gitHead": "ea0a49d962b9e76880202d4fa3390244377c65b6" | ||
"gitHead": "10bb7d6dbacdd10c51817c09c49d1c20f3401e52" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
313617
2205