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
1823
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.8-alpha-818e986.0 to 6.0.8-alpha-e5d23fe.0

Subschema.d.ts

24

index.cjs.js

@@ -626,2 +626,20 @@ 'use strict';

}
function isSubschemaConfig(value) {
return Boolean(value.schema);
}
function isSubschema(value) {
return Boolean(value.transformedSchema);
}
class Subschema {
constructor(config) {
var _a;
this.schema = config.schema;
this.executor = config.executor;
this.subscriber = config.subscriber;
this.createProxyingResolver = config.createProxyingResolver;
this.transforms = (_a = config.transforms) !== null && _a !== void 0 ? _a : [];
this.merge = config.merge;
this.transformedSchema = utils.applySchemaTransforms(this.schema, this.transforms);
}
}

@@ -777,6 +795,2 @@ function unwrapResult(parent, path) {

function isSubschemaConfig(value) {
return Boolean(value.schema);
}
function handleObject(type, object, errors, subschema, context, info, skipTypeMerging) {

@@ -1364,2 +1378,3 @@ var _a;

exports.ReplaceFieldWithFragment = ReplaceFieldWithFragment;
exports.Subschema = Subschema;
exports.checkResultAndHandleErrors = checkResultAndHandleErrors;

@@ -1374,3 +1389,4 @@ exports.createMergedResolver = createMergedResolver;

exports.handleResult = handleResult;
exports.isSubschema = isSubschema;
exports.isSubschemaConfig = isSubschemaConfig;
//# sourceMappingURL=index.cjs.js.map

2

index.d.ts

@@ -6,4 +6,4 @@ export { delegateToSchema, delegateRequest } from './delegateToSchema';

export { handleResult } from './results/handleResult';
export { getSubschema } from './subschema';
export { Subschema, isSubschema, isSubschemaConfig, getSubschema } from './Subschema';
export * from './transforms';
export * from './types';
import { visit, visitWithTypeInfo, Kind, getNamedType, isAbstractType, TypeInfo, isObjectType, isInterfaceType, TypeNameMetaFieldDef, getNullableType, isLeafType, isCompositeType, isListType, typeFromAST, isSchema, getOperationAST, validate, execute, subscribe, defaultFieldResolver, parse } from 'graphql';
import { implementsAbstractType, CombinedError, relocatedError, getErrorsByPathSegment, ERROR_SYMBOL, mergeDeep, getErrors, setErrors, slicedError, collectFields, getResponseKeyFromInfo, updateArgument, serializeInputValue, applyRequestTransforms, applyResultTransforms, mapAsyncIterator, concatInlineFragments } from '@graphql-tools/utils';
import { implementsAbstractType, CombinedError, relocatedError, getErrorsByPathSegment, applySchemaTransforms, ERROR_SYMBOL, mergeDeep, getErrors, setErrors, slicedError, collectFields, getResponseKeyFromInfo, updateArgument, serializeInputValue, applyRequestTransforms, applyResultTransforms, mapAsyncIterator, concatInlineFragments } from '@graphql-tools/utils';

@@ -622,2 +622,20 @@ class ExpandAbstractTypes {

}
function isSubschemaConfig(value) {
return Boolean(value.schema);
}
function isSubschema(value) {
return Boolean(value.transformedSchema);
}
class Subschema {
constructor(config) {
var _a;
this.schema = config.schema;
this.executor = config.executor;
this.subscriber = config.subscriber;
this.createProxyingResolver = config.createProxyingResolver;
this.transforms = (_a = config.transforms) !== null && _a !== void 0 ? _a : [];
this.merge = config.merge;
this.transformedSchema = applySchemaTransforms(this.schema, this.transforms);
}
}

@@ -773,6 +791,2 @@ function unwrapResult(parent, path) {

function isSubschemaConfig(value) {
return Boolean(value.schema);
}
function handleObject(type, object, errors, subschema, context, info, skipTypeMerging) {

@@ -1351,3 +1365,3 @@ var _a;

export { AddArgumentsAsVariables, AddFragmentsByField, AddSelectionSetsByType as AddMergedTypeSelectionSets, AddSelectionSetsByField, AddTypenameToAbstract, CheckResultAndHandleErrors, ExpandAbstractTypes, FilterToSchema, ReplaceFieldWithFragment, checkResultAndHandleErrors, createMergedResolver, createRequest, createRequestFromInfo, defaultMergedResolver, delegateRequest, delegateToSchema, getSubschema, handleResult, isSubschemaConfig };
export { AddArgumentsAsVariables, AddFragmentsByField, AddSelectionSetsByType as AddMergedTypeSelectionSets, AddSelectionSetsByField, AddTypenameToAbstract, CheckResultAndHandleErrors, ExpandAbstractTypes, FilterToSchema, ReplaceFieldWithFragment, Subschema, checkResultAndHandleErrors, createMergedResolver, createRequest, createRequestFromInfo, defaultMergedResolver, delegateRequest, delegateToSchema, getSubschema, handleResult, isSubschema, isSubschemaConfig };
//# sourceMappingURL=index.esm.js.map
{
"name": "@graphql-tools/delegate",
"version": "6.0.8-alpha-818e986.0",
"version": "6.0.8-alpha-e5d23fe.0",
"description": "A set of utils for faster development of GraphQL tools",

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

"dependencies": {
"@graphql-tools/schema": "6.0.8-alpha-818e986.0",
"@graphql-tools/utils": "6.0.8-alpha-818e986.0",
"@graphql-tools/schema": "6.0.8-alpha-e5d23fe.0",
"@graphql-tools/utils": "6.0.8-alpha-e5d23fe.0",
"tslib": "~2.0.0"

@@ -14,0 +14,0 @@ },

import { GraphQLSchema, GraphQLOutputType, SelectionSetNode, FieldNode, DocumentNode, GraphQLResolveInfo, GraphQLFieldResolver, InlineFragmentNode, FragmentDefinitionNode, GraphQLObjectType, VariableDefinitionNode } from 'graphql';
import { Operation, Transform, Request, TypeMap, ExecutionResult } from '@graphql-tools/utils';
import { Subschema } from './Subschema';
export interface IDelegateToSchemaOptions<TContext = Record<string, any>, TArgs = Record<string, any>> {
schema: GraphQLSchema | SubschemaConfig;
schema: GraphQLSchema | SubschemaConfig | Subschema;
operation?: Operation;

@@ -85,3 +86,2 @@ fieldName?: string;

export declare type MergedTypeResolver = (originalResult: any, context: Record<string, any>, info: GraphQLResolveInfo, subschema: GraphQLSchema | SubschemaConfig, selectionSet: SelectionSetNode) => any;
export declare function isSubschemaConfig(value: any): value is SubschemaConfig;
export interface StitchingInfo {

@@ -88,0 +88,0 @@ transformedSchemas: Map<GraphQLSchema | SubschemaConfig, GraphQLSchema>;

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