Skip to content

Commit 71df461

Browse files
helferleebyron
authored andcommitted
remove all 'instanceof GraphQLSchema' checks (#371)
1 parent e6e8d19 commit 71df461

File tree

3 files changed

+0
-14
lines changed

3 files changed

+0
-14
lines changed

src/execution/execute.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,6 @@ export function execute(
117117
operationName?: ?string
118118
): Promise<ExecutionResult> {
119119
invariant(schema, 'Must provide schema');
120-
invariant(
121-
schema instanceof GraphQLSchema,
122-
'Schema must be an instance of GraphQLSchema. Also ensure that there are ' +
123-
'not multiple versions of GraphQL installed in your node_modules directory.'
124-
);
125120

126121
// If a valid context cannot be created due to incorrect arguments,
127122
// this will throw an error.

src/utilities/extendSchema.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,6 @@ export function extendSchema(
9494
schema: GraphQLSchema,
9595
documentAST: Document
9696
): GraphQLSchema {
97-
invariant(
98-
schema instanceof GraphQLSchema,
99-
'Must provide valid GraphQLSchema'
100-
);
10197

10298
invariant(
10399
documentAST && documentAST.kind === DOCUMENT,

src/validation/validate.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,6 @@ export function validate(
5353
): Array<GraphQLError> {
5454
invariant(schema, 'Must provide schema');
5555
invariant(ast, 'Must provide document');
56-
invariant(
57-
schema instanceof GraphQLSchema,
58-
'Schema must be an instance of GraphQLSchema. Also ensure that there are ' +
59-
'not multiple versions of GraphQL installed in your node_modules directory.'
60-
);
6156
const typeInfo = new TypeInfo(schema);
6257
return visitUsingRules(schema, typeInfo, ast, rules || specifiedRules);
6358
}

0 commit comments

Comments
 (0)