@@ -6,21 +6,19 @@ import { print } from '../language/printer';
6
6
7
7
import { astFromValue } from '../utilities/astFromValue' ;
8
8
9
- import {
9
+ import type {
10
10
GraphQLEnumValue ,
11
11
GraphQLField ,
12
12
GraphQLFieldConfigMap ,
13
13
GraphQLInputField ,
14
14
GraphQLNamedType ,
15
- GraphQLType ,
16
- isSemanticNonNullType ,
17
- } from './definition' ;
15
+ GraphQLType } from './definition' ;
18
16
import {
19
17
GraphQLEnumType ,
20
18
GraphQLList ,
21
19
GraphQLNonNull ,
22
- GraphQLSemanticNonNull ,
23
20
GraphQLObjectType ,
21
+ GraphQLSemanticNonNull ,
24
22
isAbstractType ,
25
23
isEnumType ,
26
24
isInputObjectType ,
@@ -29,6 +27,7 @@ import {
29
27
isNonNullType ,
30
28
isObjectType ,
31
29
isScalarType ,
30
+ isSemanticNonNullType ,
32
31
isUnionType ,
33
32
} from './definition' ;
34
33
import type { GraphQLDirective } from './directives' ;
@@ -414,15 +413,15 @@ export const __Field: GraphQLObjectType = new GraphQLObjectType({
414
413
resolve : ( field , { nullability } , _context , info ) => {
415
414
if ( nullability === TypeNullability . FULL ) {
416
415
return field . type ;
417
- } else {
416
+ }
418
417
const mode =
419
418
nullability === TypeNullability . AUTO
420
419
? info . errorPropagation
421
420
? TypeNullability . TRADITIONAL
422
421
: TypeNullability . SEMANTIC
423
422
: nullability ;
424
423
return convertOutputTypeToNullabilityMode ( field . type , mode ) ;
425
- }
424
+
426
425
} ,
427
426
} ,
428
427
isDeprecated : {
@@ -452,10 +451,10 @@ function convertOutputTypeToNullabilityMode(
452
451
return new GraphQLList (
453
452
convertOutputTypeToNullabilityMode ( type . ofType , mode ) ,
454
453
) ;
455
- } else {
454
+ }
456
455
return type ;
457
- }
458
- } else {
456
+
457
+ }
459
458
if ( isNonNullType ( type ) || isSemanticNonNullType ( type ) ) {
460
459
return new GraphQLSemanticNonNull (
461
460
convertOutputTypeToNullabilityMode ( type . ofType , mode ) ,
@@ -464,10 +463,10 @@ function convertOutputTypeToNullabilityMode(
464
463
return new GraphQLList (
465
464
convertOutputTypeToNullabilityMode ( type . ofType , mode ) ,
466
465
) ;
467
- } else {
466
+ }
468
467
return type ;
469
- }
470
- }
468
+
469
+
471
470
}
472
471
473
472
export const __InputValue : GraphQLObjectType = new GraphQLObjectType ( {
0 commit comments