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.
1 parent d089e70 commit 8e2db7bCopy full SHA for 8e2db7b
src/execution/execute.ts
@@ -551,6 +551,14 @@ function selectionSetWithFragmentArgumentsApplied(
551
const variableName = argDef.variable.name.value;
552
const providedArg = providedArguments.get(variableName);
553
if (providedArg != null) {
554
+ if (providedArg.value.kind === Kind.NULL && isNonNullType(argDef.type)) {
555
+ exeContext.errors.push(
556
+ new GraphQLError(
557
+ `Fragment argument "$${variableName}" on fragment "${fragment.name.value}" is non-null, but null was provided.`,
558
+ [providedArg, argDef],
559
+ ),
560
+ );
561
+ }
562
fragmentArgumentValues.set(variableName, providedArg.value);
563
} else if (argDef.defaultValue != null) {
564
fragmentArgumentValues.set(variableName, argDef.defaultValue);
0 commit comments