Skip to content

Commit df38cf6

Browse files
committed
Add missing external graphql-tools packages to avoid failing tests
1 parent d37fedf commit df38cf6

4 files changed

Lines changed: 53 additions & 64 deletions

File tree

package-lock.json

Lines changed: 45 additions & 59 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,9 @@
5959
"@changesets/changelog-github": "0.7.0",
6060
"@changesets/cli": "2.31.0",
6161
"@envelop/core": "5.5.1",
62+
"@graphql-tools/batch-delegate": "10.0.24",
6263
"@graphql-tools/delegate": "12.0.17",
64+
"@graphql-tools/executor-common": "1.0.6",
6365
"@graphql-tools/wrap": "11.1.16",
6466
"@theguild/prettier-config": "3.0.1",
6567
"@theguild/remark-mermaid": "0.3.0",

packages/executor/src/execution/execute.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -837,7 +837,7 @@ export function buildResolveInfo(
837837
promiseAll: values => exeContext.asyncWorkTracker.promiseAllTrackOnReject(values),
838838
track: maybePromises => exeContext.asyncWorkTracker.addValues(maybePromises),
839839
}),
840-
};
840+
} as GraphQLResolveInfo;
841841
}
842842

843843
export const CRITICAL_ERROR = 'CRITICAL_ERROR' as const;

packages/executor/src/execution/values.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,11 @@ import {
77
NamedTypeNode,
88
print,
99
typeFromAST,
10-
validateInputValue,
1110
valueFromAST,
1211
VariableDefinitionNode,
1312
} from 'graphql';
13+
// eslint-disable-next-line @typescript-eslint/no-restricted-imports
14+
import * as graphql from 'graphql';
1415
import { createGraphQLError, hasOwnProperty, inspect, printPathArray } from '@graphql-tools/utils';
1516

1617
type CoercedVariableValues =
@@ -108,9 +109,9 @@ function coerceVariableValues(
108109
continue;
109110
}
110111

111-
// FIXME: `validateInputValue` is available in graphql@17 but not below
112-
if (validateInputValue) {
113-
validateInputValue(value, varType, (error, path) => {
112+
// `validateInputValue` is available in graphql@17 but not below
113+
if ((graphql as any).validateInputValue) {
114+
(graphql as any).validateInputValue(value, varType, (error, path) => {
114115
let prefix = `Variable "$${varName}" got invalid value`;
115116
if (path.length > 0) {
116117
prefix += ` at "${varName}${printPathArray(path)}"`;

0 commit comments

Comments
 (0)