Skip to content

Commit 9947d01

Browse files
committed
Add test
1 parent eae6f5a commit 9947d01

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/validation/__tests__/VariablesInAllowedPositionRule-test.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,16 @@ describe('Validates OneOf Input Objects', () => {
370370
`);
371371
});
372372

373+
it('Undefined variable in oneOf input object', () => {
374+
expectErrors(`
375+
{
376+
complicatedArgs {
377+
oneOfArgField(oneOfArg: { stringField: $undefinedVariable })
378+
}
379+
}
380+
`).toDeepEqual([]);
381+
});
382+
373383
it('Forbids one nullable variable', () => {
374384
expectErrors(`
375385
query ($string: String) {

0 commit comments

Comments
 (0)