We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
instanceof
1 parent 449c0d5 commit 5b42850Copy full SHA for 5b42850
src/node/plural.js
@@ -1,6 +1,6 @@
1
// @flow strict
2
3
-import { GraphQLList, GraphQLNonNull } from 'graphql';
+import { GraphQLList, GraphQLNonNull, isNonNullType } from 'graphql';
4
5
import type {
6
GraphQLFieldConfig,
@@ -26,7 +26,7 @@ export function pluralIdentifyingRootField(
26
): GraphQLFieldConfig<mixed, mixed> {
27
const inputArgs = {};
28
let inputType = config.inputType;
29
- if (inputType instanceof GraphQLNonNull) {
+ if (isNonNullType(inputType)) {
30
inputType = inputType.ofType;
31
}
32
inputArgs[config.argName] = {
0 commit comments