File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change 99 isEnumType ,
1010 isInterfaceType ,
1111 isListType ,
12- isNullableType ,
12+ isNonNullType ,
1313 isObjectType ,
1414 isScalarType ,
1515} from 'graphql' ;
@@ -335,12 +335,9 @@ export class MockStore implements IMockStore {
335335 currentValue : unknown ,
336336 onInsertType : ( typeName : string , values : { [ fieldName : string ] : unknown } ) => Ref ,
337337 ) : unknown {
338- const fieldTypeName = fieldType . toString ( ) ;
339338 if ( value === null ) {
340- if ( ! isNullableType ( fieldType ) ) {
341- throw new Error (
342- `should not be null because ${ fieldTypeName } is not nullable. Received null.` ,
343- ) ;
339+ if ( isNonNullType ( fieldType ) ) {
340+ throw new Error ( `should not be null because ${ fieldType } is not nullable. Received null.` ) ;
344341 }
345342 return null ;
346343 }
You can’t perform that action at this time.
0 commit comments