Skip to content

Commit

Permalink
remove all 'instanceof GraphQLSchema' checks (#371)
Browse files Browse the repository at this point in the history
  • Loading branch information
helfer authored and leebyron committed May 5, 2016
1 parent e6e8d19 commit 71df461
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 14 deletions.
5 changes: 0 additions & 5 deletions src/execution/execute.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,6 @@ export function execute(
operationName?: ?string
): Promise<ExecutionResult> {
invariant(schema, 'Must provide schema');
invariant(
schema instanceof GraphQLSchema,
'Schema must be an instance of GraphQLSchema. Also ensure that there are ' +
'not multiple versions of GraphQL installed in your node_modules directory.'
);

// If a valid context cannot be created due to incorrect arguments,
// this will throw an error.
Expand Down
4 changes: 0 additions & 4 deletions src/utilities/extendSchema.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,6 @@ export function extendSchema(
schema: GraphQLSchema,
documentAST: Document
): GraphQLSchema {
invariant(
schema instanceof GraphQLSchema,
'Must provide valid GraphQLSchema'
);

invariant(
documentAST && documentAST.kind === DOCUMENT,
Expand Down
5 changes: 0 additions & 5 deletions src/validation/validate.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,6 @@ export function validate(
): Array<GraphQLError> {
invariant(schema, 'Must provide schema');
invariant(ast, 'Must provide document');
invariant(
schema instanceof GraphQLSchema,
'Schema must be an instance of GraphQLSchema. Also ensure that there are ' +
'not multiple versions of GraphQL installed in your node_modules directory.'
);
const typeInfo = new TypeInfo(schema);
return visitUsingRules(schema, typeInfo, ast, rules || specifiedRules);
}
Expand Down

0 comments on commit 71df461

Please sign in to comment.