@@ -355,17 +355,17 @@ export class GraphQLList<T extends GraphQLType> {
355
355
this . ofType = ofType ;
356
356
}
357
357
358
+ get [ Symbol . toStringTag ] ( ) {
359
+ return 'GraphQLList' ;
360
+ }
361
+
358
362
toString ( ) : string {
359
363
return '[' + String ( this . ofType ) + ']' ;
360
364
}
361
365
362
366
toJSON ( ) : string {
363
367
return this . toString ( ) ;
364
368
}
365
-
366
- get [ Symbol . toStringTag ] ( ) {
367
- return 'GraphQLList' ;
368
- }
369
369
}
370
370
371
371
/**
@@ -401,17 +401,17 @@ export class GraphQLNonNull<T extends GraphQLNullableType> {
401
401
this . ofType = ofType ;
402
402
}
403
403
404
+ get [ Symbol . toStringTag ] ( ) {
405
+ return 'GraphQLNonNull' ;
406
+ }
407
+
404
408
toString ( ) : string {
405
409
return String ( this . ofType ) + '!' ;
406
410
}
407
411
408
412
toJSON ( ) : string {
409
413
return this . toString ( ) ;
410
414
}
411
-
412
- get [ Symbol . toStringTag ] ( ) {
413
- return 'GraphQLNonNull' ;
414
- }
415
415
}
416
416
417
417
/**
@@ -630,6 +630,10 @@ export class GraphQLScalarType<TInternal = unknown, TExternal = TInternal> {
630
630
}
631
631
}
632
632
633
+ get [ Symbol . toStringTag ] ( ) {
634
+ return 'GraphQLScalarType' ;
635
+ }
636
+
633
637
toConfig ( ) : GraphQLScalarTypeNormalizedConfig < TInternal , TExternal > {
634
638
return {
635
639
name : this . name ,
@@ -651,10 +655,6 @@ export class GraphQLScalarType<TInternal = unknown, TExternal = TInternal> {
651
655
toJSON ( ) : string {
652
656
return this . toString ( ) ;
653
657
}
654
-
655
- get [ Symbol . toStringTag ] ( ) {
656
- return 'GraphQLScalarType' ;
657
- }
658
658
}
659
659
660
660
export type GraphQLScalarSerializer < TExternal > = (
@@ -778,6 +778,10 @@ export class GraphQLObjectType<TSource = any, TContext = any> {
778
778
) ;
779
779
}
780
780
781
+ get [ Symbol . toStringTag ] ( ) {
782
+ return 'GraphQLObjectType' ;
783
+ }
784
+
781
785
getFields ( ) : GraphQLFieldMap < TSource , TContext > {
782
786
if ( typeof this . _fields === 'function' ) {
783
787
this . _fields = this . _fields ( ) ;
@@ -812,10 +816,6 @@ export class GraphQLObjectType<TSource = any, TContext = any> {
812
816
toJSON ( ) : string {
813
817
return this . toString ( ) ;
814
818
}
815
-
816
- get [ Symbol . toStringTag ] ( ) {
817
- return 'GraphQLObjectType' ;
818
- }
819
819
}
820
820
821
821
function defineInterfaces (
@@ -1143,6 +1143,10 @@ export class GraphQLInterfaceType {
1143
1143
) ;
1144
1144
}
1145
1145
1146
+ get [ Symbol . toStringTag ] ( ) {
1147
+ return 'GraphQLInterfaceType' ;
1148
+ }
1149
+
1146
1150
getFields ( ) : GraphQLFieldMap < any , any > {
1147
1151
if ( typeof this . _fields === 'function' ) {
1148
1152
this . _fields = this . _fields ( ) ;
@@ -1177,10 +1181,6 @@ export class GraphQLInterfaceType {
1177
1181
toJSON ( ) : string {
1178
1182
return this . toString ( ) ;
1179
1183
}
1180
-
1181
- get [ Symbol . toStringTag ] ( ) {
1182
- return 'GraphQLInterfaceType' ;
1183
- }
1184
1184
}
1185
1185
1186
1186
export interface GraphQLInterfaceTypeConfig < TSource , TContext > {
@@ -1270,6 +1270,10 @@ export class GraphQLUnionType {
1270
1270
) ;
1271
1271
}
1272
1272
1273
+ get [ Symbol . toStringTag ] ( ) {
1274
+ return 'GraphQLUnionType' ;
1275
+ }
1276
+
1273
1277
getTypes ( ) : ReadonlyArray < GraphQLObjectType > {
1274
1278
if ( typeof this . _types === 'function' ) {
1275
1279
this . _types = this . _types ( ) ;
@@ -1296,10 +1300,6 @@ export class GraphQLUnionType {
1296
1300
toJSON ( ) : string {
1297
1301
return this . toString ( ) ;
1298
1302
}
1299
-
1300
- get [ Symbol . toStringTag ] ( ) {
1301
- return 'GraphQLUnionType' ;
1302
- }
1303
1303
}
1304
1304
1305
1305
function defineTypes (
@@ -1396,6 +1396,10 @@ export class GraphQLEnumType /* <T> */ {
1396
1396
this . _nameLookup = keyMap ( this . _values , ( value ) => value . name ) ;
1397
1397
}
1398
1398
1399
+ get [ Symbol . toStringTag ] ( ) {
1400
+ return 'GraphQLEnumType' ;
1401
+ }
1402
+
1399
1403
getValues ( ) : ReadonlyArray < GraphQLEnumValue /* <T> */ > {
1400
1404
return this . _values ;
1401
1405
}
@@ -1489,10 +1493,6 @@ export class GraphQLEnumType /* <T> */ {
1489
1493
toJSON ( ) : string {
1490
1494
return this . toString ( ) ;
1491
1495
}
1492
-
1493
- get [ Symbol . toStringTag ] ( ) {
1494
- return 'GraphQLEnumType' ;
1495
- }
1496
1496
}
1497
1497
1498
1498
function didYouMeanEnumValue (
@@ -1630,6 +1630,10 @@ export class GraphQLInputObjectType {
1630
1630
this . _fields = defineInputFieldMap . bind ( undefined , config ) ;
1631
1631
}
1632
1632
1633
+ get [ Symbol . toStringTag ] ( ) {
1634
+ return 'GraphQLInputObjectType' ;
1635
+ }
1636
+
1633
1637
getFields ( ) : GraphQLInputFieldMap {
1634
1638
if ( typeof this . _fields === 'function' ) {
1635
1639
this . _fields = this . _fields ( ) ;
@@ -1664,10 +1668,6 @@ export class GraphQLInputObjectType {
1664
1668
toJSON ( ) : string {
1665
1669
return this . toString ( ) ;
1666
1670
}
1667
-
1668
- get [ Symbol . toStringTag ] ( ) {
1669
- return 'GraphQLInputObjectType' ;
1670
- }
1671
1671
}
1672
1672
1673
1673
function defineInputFieldMap (
0 commit comments