Skip to content

Commit

Permalink
Use graphql's predicate function instead of instanceof (#270)
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanGoncharov committed Jun 25, 2020
1 parent 449c0d5 commit 5b42850
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/node/plural.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// @flow strict

import { GraphQLList, GraphQLNonNull } from 'graphql';
import { GraphQLList, GraphQLNonNull, isNonNullType } from 'graphql';

import type {
GraphQLFieldConfig,
Expand All @@ -26,7 +26,7 @@ export function pluralIdentifyingRootField(
): GraphQLFieldConfig<mixed, mixed> {
const inputArgs = {};
let inputType = config.inputType;
if (inputType instanceof GraphQLNonNull) {
if (isNonNullType(inputType)) {
inputType = inputType.ofType;
}
inputArgs[config.argName] = {
Expand Down

0 comments on commit 5b42850

Please sign in to comment.