File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -1167,6 +1167,28 @@ describe('Execute: Handles inputs', () => {
1167
1167
} ) ;
1168
1168
} ) ;
1169
1169
1170
+ it ( 'errors with OneOf Input Object with no fields' , ( ) => {
1171
+ const result = executeQuery ( `
1172
+ {
1173
+ fieldWithOneOfObjectInput(input: {})
1174
+ }
1175
+ ` ) ;
1176
+
1177
+ expectJSON ( result ) . toDeepEqual ( {
1178
+ data : {
1179
+ fieldWithOneOfObjectInput : null ,
1180
+ } ,
1181
+ errors : [
1182
+ {
1183
+ message :
1184
+ 'Argument "input" of type "TestOneOfInputObject" has invalid value { }.' ,
1185
+ path : [ 'fieldWithOneOfObjectInput' ] ,
1186
+ locations : [ { line : 3 , column : 44 } ] ,
1187
+ } ,
1188
+ ] ,
1189
+ } ) ;
1190
+ } ) ;
1191
+
1170
1192
it ( 'errors with OneOf Input Object with a single null value' , ( ) => {
1171
1193
const result = executeQuery ( `
1172
1194
{
You can’t perform that action at this time.
0 commit comments