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
1843
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 6.0.11-alpha-bff7610.0 to 6.0.11-alpha-cea2de6.0

9

index.cjs.js

@@ -797,4 +797,4 @@ 'use strict';

function mergeProxiedResults(target, ...sources) {
const errors = target[utils.ERROR_SYMBOL].concat(...sources.map((source) => source[utils.ERROR_SYMBOL]));
const fieldSubschemaMap = sources.reduce((acc, source) => {
const results = sources.filter(source => !(source instanceof Error));
const fieldSubschemaMap = results.reduce((acc, source) => {
const subschema = source[OBJECT_SUBSCHEMA_SYMBOL];

@@ -806,7 +806,8 @@ Object.keys(source).forEach(key => {

}, {});
const result = sources.reduce(utils.mergeDeep, target);
result[utils.ERROR_SYMBOL] = errors;
const result = results.reduce(utils.mergeDeep, target);
result[FIELD_SUBSCHEMA_MAP_SYMBOL] = target[FIELD_SUBSCHEMA_MAP_SYMBOL]
? utils.mergeDeep(target[FIELD_SUBSCHEMA_MAP_SYMBOL], fieldSubschemaMap)
: fieldSubschemaMap;
const errors = sources.map((source) => (source instanceof Error ? source : source[utils.ERROR_SYMBOL]));
result[utils.ERROR_SYMBOL] = target[utils.ERROR_SYMBOL].concat(...errors);
return result;

@@ -813,0 +814,0 @@ }

@@ -791,4 +791,4 @@ import { Kind, typeFromAST, visit, visitWithTypeInfo, getNamedType, isAbstractType, TypeInfo, isObjectType, isInterfaceType, TypeNameMetaFieldDef, getNullableType, isLeafType, isCompositeType, isListType, isSchema, getOperationAST, execute, subscribe, validate, defaultFieldResolver, parse } from 'graphql';

function mergeProxiedResults(target, ...sources) {
const errors = target[ERROR_SYMBOL].concat(...sources.map((source) => source[ERROR_SYMBOL]));
const fieldSubschemaMap = sources.reduce((acc, source) => {
const results = sources.filter(source => !(source instanceof Error));
const fieldSubschemaMap = results.reduce((acc, source) => {
const subschema = source[OBJECT_SUBSCHEMA_SYMBOL];

@@ -800,7 +800,8 @@ Object.keys(source).forEach(key => {

}, {});
const result = sources.reduce(mergeDeep, target);
result[ERROR_SYMBOL] = errors;
const result = results.reduce(mergeDeep, target);
result[FIELD_SUBSCHEMA_MAP_SYMBOL] = target[FIELD_SUBSCHEMA_MAP_SYMBOL]
? mergeDeep(target[FIELD_SUBSCHEMA_MAP_SYMBOL], fieldSubschemaMap)
: fieldSubschemaMap;
const errors = sources.map((source) => (source instanceof Error ? source : source[ERROR_SYMBOL]));
result[ERROR_SYMBOL] = target[ERROR_SYMBOL].concat(...errors);
return result;

@@ -807,0 +808,0 @@ }

{
"name": "@graphql-tools/delegate",
"version": "6.0.11-alpha-bff7610.0",
"version": "6.0.11-alpha-cea2de6.0",
"description": "A set of utils for faster development of GraphQL tools",

@@ -10,4 +10,4 @@ "sideEffects": false,

"dependencies": {
"@graphql-tools/schema": "6.0.11-alpha-bff7610.0",
"@graphql-tools/utils": "6.0.11-alpha-bff7610.0",
"@graphql-tools/schema": "6.0.11-alpha-cea2de6.0",
"@graphql-tools/utils": "6.0.11-alpha-cea2de6.0",
"aggregate-error": "3.0.1",

@@ -14,0 +14,0 @@ "tslib": "~2.0.0"

export declare function isProxiedResult(result: any): any;
export declare function unwrapResult(parent: any, path: Array<string>): any;
export declare function dehoistResult(parent: any, delimeter?: string): any;
export declare function mergeProxiedResults(target: any, ...sources: any): any;
export declare function mergeProxiedResults(target: any, ...sources: Array<any>): any;

Sorry, the diff of this file is not supported yet

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