@graphql-tools/utils 7.6.0 → 7.7.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/es5/executor.d.ts +13 -0
- package/es5/index.cjs.js +2 -2
- package/es5/index.cjs.js.map +1 -1
- package/es5/index.d.ts +1 -0
- package/es5/index.esm.js +2 -2
- package/es5/index.esm.js.map +1 -1
- package/es5/package.json +2 -2
- package/executor.d.ts +13 -0
- package/index.cjs.js +2 -2
- package/index.cjs.js.map +1 -1
- package/index.d.ts +1 -0
- package/index.esm.js +2 -2
- package/index.esm.js.map +1 -1
- package/package.json +2 -2
package/es5/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphql-tools/utils/es5",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.7.2",
|
|
4
4
|
"description": "Common package containing utils and types for GraphQL tools",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"peerDependencies": {
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"@ardatan/aggregate-error": "0.0.6",
|
|
11
11
|
"camel-case": "4.1.2",
|
|
12
|
-
"tslib": "~2.
|
|
12
|
+
"tslib": "~2.2.0"
|
|
13
13
|
},
|
|
14
14
|
"repository": {
|
|
15
15
|
"type": "git",
|
package/executor.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { DocumentNode, GraphQLResolveInfo } from 'graphql';
|
|
2
|
+
import { ExecutionResult } from './Interfaces';
|
|
3
|
+
export interface ExecutionParams<TArgs = Record<string, any>, TContext = any> {
|
|
4
|
+
document: DocumentNode;
|
|
5
|
+
variables?: TArgs;
|
|
6
|
+
extensions?: Record<string, any>;
|
|
7
|
+
context?: TContext;
|
|
8
|
+
info?: GraphQLResolveInfo;
|
|
9
|
+
}
|
|
10
|
+
export declare type AsyncExecutor<TBaseContext = Record<string, any>> = <TReturn = Record<string, any>, TArgs = Record<string, any>, TContext = TBaseContext>(params: ExecutionParams<TArgs, TContext>) => Promise<ExecutionResult<TReturn>>;
|
|
11
|
+
export declare type SyncExecutor<TBaseContext = Record<string, any>> = <TReturn = Record<string, any>, TArgs = Record<string, any>, TContext = TBaseContext>(params: ExecutionParams<TArgs, TContext>) => ExecutionResult<TReturn>;
|
|
12
|
+
export declare type Executor<TBaseContext = Record<string, any>> = <TReturn = Record<string, any>, TArgs = Record<string, any>, TContext = TBaseContext>(params: ExecutionParams<TArgs, TContext>) => ExecutionResult<TReturn> | Promise<ExecutionResult<TReturn>>;
|
|
13
|
+
export declare type Subscriber<TBaseContext = Record<string, any>> = <TReturn = Record<string, any>, TArgs = Record<string, any>, TContext = TBaseContext>(params: ExecutionParams<TArgs, TContext>) => Promise<AsyncIterator<ExecutionResult<TReturn>> | ExecutionResult<TReturn>>;
|
package/index.cjs.js
CHANGED
|
@@ -1682,7 +1682,7 @@ function createNamedStub(name, type) {
|
|
|
1682
1682
|
return new constructor({
|
|
1683
1683
|
name,
|
|
1684
1684
|
fields: {
|
|
1685
|
-
|
|
1685
|
+
_fake: {
|
|
1686
1686
|
type: graphql.GraphQLString,
|
|
1687
1687
|
},
|
|
1688
1688
|
},
|
|
@@ -1705,7 +1705,7 @@ function isNamedStub(type) {
|
|
|
1705
1705
|
if (graphql.isObjectType(type) || graphql.isInterfaceType(type) || graphql.isInputObjectType(type)) {
|
|
1706
1706
|
const fields = type.getFields();
|
|
1707
1707
|
const fieldNames = Object.keys(fields);
|
|
1708
|
-
return fieldNames.length === 1 && fields[fieldNames[0]].name === '
|
|
1708
|
+
return fieldNames.length === 1 && fields[fieldNames[0]].name === '_fake';
|
|
1709
1709
|
}
|
|
1710
1710
|
return false;
|
|
1711
1711
|
}
|