@graphql-tools/delegate
Advanced tools
Comparing version 10.0.13 to 10.0.14-alpha-20240708191055-6aa94b70be0a68ccac6339230c2f5ff436909dc4
@@ -42,3 +42,3 @@ "use strict"; | ||
} | ||
const deferred = (0, leftOver_js_1.createDeferred)(); | ||
const deferred = (0, utils_1.createDeferred)(); | ||
missingDeferredFields.set(responseKey, deferred); | ||
@@ -45,0 +45,0 @@ return deferred.promise; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getPlanLeftOverFromParent = exports.PLAN_LEFT_OVER = exports.leftOverByDelegationPlan = exports.createDeferred = void 0; | ||
// TODO: Remove this after Node 22 | ||
function createDeferred() { | ||
if (Promise.withResolvers) { | ||
return Promise.withResolvers(); | ||
} | ||
let resolve; | ||
let reject; | ||
const promise = new Promise((_resolve, _reject) => { | ||
resolve = _resolve; | ||
reject = _reject; | ||
}); | ||
return { promise, resolve: resolve, reject: reject }; | ||
} | ||
exports.createDeferred = createDeferred; | ||
exports.getPlanLeftOverFromParent = exports.PLAN_LEFT_OVER = exports.leftOverByDelegationPlan = void 0; | ||
exports.leftOverByDelegationPlan = new WeakMap(); | ||
@@ -19,0 +5,0 @@ exports.PLAN_LEFT_OVER = Symbol('PLAN_LEFT_OVER'); |
import { defaultFieldResolver, Kind, responsePathAsArray, } from 'graphql'; | ||
import { getResponseKeyFromInfo, isPromise } from '@graphql-tools/utils'; | ||
import { createDeferred, getPlanLeftOverFromParent } from './leftOver.js'; | ||
import { createDeferred, getResponseKeyFromInfo, isPromise } from '@graphql-tools/utils'; | ||
import { getPlanLeftOverFromParent } from './leftOver.js'; | ||
import { getSubschema, getUnpathedErrors, handleResolverResult, isExternalObject, } from './mergeFields.js'; | ||
@@ -5,0 +5,0 @@ import { resolveExternalValue } from './resolveExternalValue.js'; |
@@ -1,14 +0,1 @@ | ||
// TODO: Remove this after Node 22 | ||
export function createDeferred() { | ||
if (Promise.withResolvers) { | ||
return Promise.withResolvers(); | ||
} | ||
let resolve; | ||
let reject; | ||
const promise = new Promise((_resolve, _reject) => { | ||
resolve = _resolve; | ||
reject = _reject; | ||
}); | ||
return { promise, resolve: resolve, reject: reject }; | ||
} | ||
export const leftOverByDelegationPlan = new WeakMap(); | ||
@@ -15,0 +2,0 @@ export const PLAN_LEFT_OVER = Symbol('PLAN_LEFT_OVER'); |
{ | ||
"name": "@graphql-tools/delegate", | ||
"version": "10.0.13", | ||
"version": "10.0.14-alpha-20240708191055-6aa94b70be0a68ccac6339230c2f5ff436909dc4", | ||
"description": "A set of utils for faster development of GraphQL tools", | ||
@@ -11,5 +11,5 @@ "sideEffects": false, | ||
"@graphql-tools/batch-execute": "^9.0.4", | ||
"@graphql-tools/executor": "^1.2.8", | ||
"@graphql-tools/executor": "2.0.0-alpha-20240708191055-6aa94b70be0a68ccac6339230c2f5ff436909dc4", | ||
"@graphql-tools/schema": "^10.0.4", | ||
"@graphql-tools/utils": "^10.2.3", | ||
"@graphql-tools/utils": "10.4.0-alpha-20240708191055-6aa94b70be0a68ccac6339230c2f5ff436909dc4", | ||
"dataloader": "^2.2.2", | ||
@@ -16,0 +16,0 @@ "tslib": "^2.5.0" |
import { FieldNode } from 'graphql'; | ||
import { Deferred } from '@graphql-tools/utils'; | ||
import { Subschema } from './Subschema.js'; | ||
import { ExternalObject } from './types.js'; | ||
export type Deferred<T = unknown> = PromiseWithResolvers<T>; | ||
export declare function createDeferred<T>(): Deferred<T>; | ||
export interface DelegationPlanLeftOver { | ||
@@ -7,0 +6,0 @@ unproxiableFieldNodes: Array<FieldNode>; |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
217593
4247
2
+ Added@graphql-tools/executor@2.0.0-alpha-20240708191055-6aa94b70be0a68ccac6339230c2f5ff436909dc4(transitive)
+ Added@graphql-tools/utils@10.4.0-alpha-20240708191055-6aa94b70be0a68ccac6339230c2f5ff436909dc4(transitive)
+ Addedcross-inspect@1.0.0(transitive)
+ Addeddlv@1.1.3(transitive)
- Removed@graphql-tools/executor@1.3.2(transitive)
Updated@graphql-tools/executor@2.0.0-alpha-20240708191055-6aa94b70be0a68ccac6339230c2f5ff436909dc4
Updated@graphql-tools/utils@10.4.0-alpha-20240708191055-6aa94b70be0a68ccac6339230c2f5ff436909dc4