Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@graphql-tools/delegate

Package Overview
Dependencies
Maintainers
3
Versions
1527
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@graphql-tools/delegate - npm Package Compare versions

Comparing version 10.0.13 to 10.0.14-alpha-20240708191055-6aa94b70be0a68ccac6339230c2f5ff436909dc4

2

cjs/defaultMergedResolver.js

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc