Skip to content

Commit 5b42850

Browse files
Use graphql's predicate function instead of instanceof (#270)
1 parent 449c0d5 commit 5b42850

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/node/plural.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// @flow strict
22

3-
import { GraphQLList, GraphQLNonNull } from 'graphql';
3+
import { GraphQLList, GraphQLNonNull, isNonNullType } from 'graphql';
44

55
import type {
66
GraphQLFieldConfig,
@@ -26,7 +26,7 @@ export function pluralIdentifyingRootField(
2626
): GraphQLFieldConfig<mixed, mixed> {
2727
const inputArgs = {};
2828
let inputType = config.inputType;
29-
if (inputType instanceof GraphQLNonNull) {
29+
if (isNonNullType(inputType)) {
3030
inputType = inputType.ofType;
3131
}
3232
inputArgs[config.argName] = {

0 commit comments

Comments
 (0)