@graphql-tools/delegate 8.2.2-alpha-5d885fa3.0 → 8.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +4 -4
- package/es5/README.md +0 -7
- package/es5/Subschema.d.ts +0 -19
- package/es5/Transformer.d.ts +0 -10
- package/es5/applySchemaTransforms.d.ts +0 -3
- package/es5/checkResultAndHandleErrors.d.ts +0 -8
- package/es5/createRequest.d.ts +0 -6
- package/es5/defaultMergedResolver.d.ts +0 -9
- package/es5/delegateToSchema.d.ts +0 -6
- package/es5/finalizeGatewayRequest.d.ts +0 -3
- package/es5/getDocumentMetadata.d.ts +0 -6
- package/es5/index.d.ts +0 -10
- package/es5/index.js +0 -1694
- package/es5/index.mjs +0 -1672
- package/es5/mergeFields.d.ts +0 -8
- package/es5/package.json +0 -39
- package/es5/prepareGatewayDocument.d.ts +0 -2
- package/es5/resolveExternalValue.d.ts +0 -3
- package/es5/subschemaConfig.d.ts +0 -3
- package/es5/symbols.d.ts +0 -3
- package/es5/types.d.ts +0 -149
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphql-tools/delegate",
|
|
3
|
-
"version": "8.2.2
|
|
3
|
+
"version": "8.2.2",
|
|
4
4
|
"description": "A set of utils for faster development of GraphQL tools",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"peerDependencies": {
|
|
7
7
|
"graphql": "^14.0.0 || ^15.0.0 || ^16.0.0"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@graphql-tools/batch-execute": "^8.1.
|
|
11
|
-
"@graphql-tools/schema": "8.2.
|
|
12
|
-
"@graphql-tools/utils": "^8.2.
|
|
10
|
+
"@graphql-tools/batch-execute": "^8.1.1",
|
|
11
|
+
"@graphql-tools/schema": "^8.2.0",
|
|
12
|
+
"@graphql-tools/utils": "^8.2.4",
|
|
13
13
|
"dataloader": "2.0.0",
|
|
14
14
|
"tslib": "~2.3.0",
|
|
15
15
|
"value-or-promise": "1.0.10"
|
package/es5/README.md
DELETED
package/es5/Subschema.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { GraphQLSchema } from 'graphql';
|
|
2
|
-
import { SubschemaConfig, Transform, MergedTypeConfig, CreateProxyingResolverFn, BatchingOptions } from './types';
|
|
3
|
-
import { Executor } from '@graphql-tools/utils';
|
|
4
|
-
export declare function isSubschema(value: any): value is Subschema;
|
|
5
|
-
interface ISubschema<K = any, V = any, C = K, TContext = Record<string, any>> extends SubschemaConfig<K, V, C, TContext> {
|
|
6
|
-
transformedSchema: GraphQLSchema;
|
|
7
|
-
}
|
|
8
|
-
export declare class Subschema<K = any, V = any, C = K, TContext = Record<string, any>> implements ISubschema<K, V, C, TContext> {
|
|
9
|
-
schema: GraphQLSchema;
|
|
10
|
-
executor?: Executor<TContext>;
|
|
11
|
-
batch?: boolean;
|
|
12
|
-
batchingOptions?: BatchingOptions<K, V, C>;
|
|
13
|
-
createProxyingResolver?: CreateProxyingResolverFn<TContext>;
|
|
14
|
-
transforms: Array<Transform<any, TContext>>;
|
|
15
|
-
transformedSchema: GraphQLSchema;
|
|
16
|
-
merge?: Record<string, MergedTypeConfig<any, any, TContext>>;
|
|
17
|
-
constructor(config: SubschemaConfig<K, V, C, TContext>);
|
|
18
|
-
}
|
|
19
|
-
export {};
|
package/es5/Transformer.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { ExecutionRequest, ExecutionResult } from '@graphql-tools/utils';
|
|
2
|
-
import { DelegationContext } from './types';
|
|
3
|
-
export declare class Transformer<TContext = Record<string, any>> {
|
|
4
|
-
private transformations;
|
|
5
|
-
private delegationContext;
|
|
6
|
-
constructor(context: DelegationContext<TContext>);
|
|
7
|
-
private addTransform;
|
|
8
|
-
transformRequest(originalRequest: ExecutionRequest): ExecutionRequest;
|
|
9
|
-
transformResult(originalResult: ExecutionResult): any;
|
|
10
|
-
}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { GraphQLSchema } from 'graphql';
|
|
2
|
-
import { SubschemaConfig } from './types';
|
|
3
|
-
export declare function applySchemaTransforms(originalWrappingSchema: GraphQLSchema, subschemaConfig: SubschemaConfig<any, any, any, any>, transformedSchema?: GraphQLSchema): GraphQLSchema;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { GraphQLError } from 'graphql';
|
|
2
|
-
import { ExecutionResult } from '@graphql-tools/utils';
|
|
3
|
-
import { DelegationContext } from './types';
|
|
4
|
-
export declare function checkResultAndHandleErrors(result: ExecutionResult, delegationContext: DelegationContext): any;
|
|
5
|
-
export declare function mergeDataAndErrors(data: any, errors: ReadonlyArray<GraphQLError>, path: Array<string | number> | undefined, onLocatedError?: (originalError: GraphQLError) => GraphQLError, index?: number): {
|
|
6
|
-
data: any;
|
|
7
|
-
unpathedErrors: Array<GraphQLError>;
|
|
8
|
-
};
|
package/es5/createRequest.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { GraphQLSchema, GraphQLObjectType, OperationTypeNode } from 'graphql';
|
|
2
|
-
import { ExecutionRequest } from '@graphql-tools/utils';
|
|
3
|
-
import { ICreateRequestFromInfo, ICreateRequest } from './types';
|
|
4
|
-
export declare function getDelegatingOperation(parentType: GraphQLObjectType, schema: GraphQLSchema): OperationTypeNode;
|
|
5
|
-
export declare function createRequestFromInfo({ info, rootValue, operationName, operation, fieldName, selectionSet, fieldNodes, context, }: ICreateRequestFromInfo): ExecutionRequest;
|
|
6
|
-
export declare function createRequest({ sourceSchema, sourceParentType, sourceFieldName, fragments, variableDefinitions, variableValues, targetRootValue, targetOperationName, targetOperation, targetFieldName, selectionSet, fieldNodes, context, info, }: ICreateRequest): ExecutionRequest;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { GraphQLResolveInfo } from 'graphql';
|
|
2
|
-
import { ExternalObject } from './types';
|
|
3
|
-
/**
|
|
4
|
-
* Resolver that knows how to:
|
|
5
|
-
* a) handle aliases for proxied schemas
|
|
6
|
-
* b) handle errors from proxied schemas
|
|
7
|
-
* c) handle external to internal enum conversion
|
|
8
|
-
*/
|
|
9
|
-
export declare function defaultMergedResolver(parent: ExternalObject, args: Record<string, any>, context: Record<string, any>, info: GraphQLResolveInfo): any;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { GraphQLSchema } from 'graphql';
|
|
2
|
-
import { Executor } from '@graphql-tools/utils';
|
|
3
|
-
import { IDelegateToSchemaOptions, IDelegateRequestOptions } from './types';
|
|
4
|
-
export declare function delegateToSchema<TContext = Record<string, any>, TArgs = any>(options: IDelegateToSchemaOptions<TContext, TArgs>): any;
|
|
5
|
-
export declare function delegateRequest<TContext = Record<string, any>, TArgs = any>(options: IDelegateRequestOptions<TContext, TArgs>): any;
|
|
6
|
-
export declare const createDefaultExecutor: (schema: GraphQLSchema) => Executor;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { DocumentNode, FragmentDefinitionNode, OperationDefinitionNode } from 'graphql';
|
|
2
|
-
export declare function getDocumentMetadata(document: DocumentNode): {
|
|
3
|
-
operations: Array<OperationDefinitionNode>;
|
|
4
|
-
fragments: Array<FragmentDefinitionNode>;
|
|
5
|
-
fragmentNames: Set<string>;
|
|
6
|
-
};
|
package/es5/index.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export * from './Subschema';
|
|
2
|
-
export * from './Transformer';
|
|
3
|
-
export * from './applySchemaTransforms';
|
|
4
|
-
export * from './createRequest';
|
|
5
|
-
export * from './defaultMergedResolver';
|
|
6
|
-
export * from './delegateToSchema';
|
|
7
|
-
export * from './mergeFields';
|
|
8
|
-
export * from './resolveExternalValue';
|
|
9
|
-
export * from './subschemaConfig';
|
|
10
|
-
export * from './types';
|