@@ -11,7 +11,7 @@ import type { ObjMap } from '../jsutils/ObjMap.js';
11
11
import type { Path } from '../jsutils/Path.js' ;
12
12
import type { PromiseOrValue } from '../jsutils/PromiseOrValue.js' ;
13
13
import { suggestionList } from '../jsutils/suggestionList.js' ;
14
- import { toObjMap } from '../jsutils/toObjMap.js' ;
14
+ import { toObjMapWithSymbols } from '../jsutils/toObjMap.js' ;
15
15
16
16
import { GraphQLError } from '../error/GraphQLError.js' ;
17
17
@@ -610,7 +610,7 @@ export class GraphQLScalarType<TInternal = unknown, TExternal = TInternal> {
610
610
( ( node , variables ) => parseValue ( valueFromASTUntyped ( node , variables ) ) ) ;
611
611
this . coerceInputLiteral = config . coerceInputLiteral ;
612
612
this . valueToLiteral = config . valueToLiteral ;
613
- this . extensions = toObjMap ( config . extensions ) ;
613
+ this . extensions = toObjMapWithSymbols ( config . extensions ) ;
614
614
this . astNode = config . astNode ;
615
615
this . extensionASTNodes = config . extensionASTNodes ?? [ ] ;
616
616
@@ -783,7 +783,7 @@ export class GraphQLObjectType<TSource = any, TContext = any> {
783
783
this . name = assertName ( config . name ) ;
784
784
this . description = config . description ;
785
785
this . isTypeOf = config . isTypeOf ;
786
- this . extensions = toObjMap ( config . extensions ) ;
786
+ this . extensions = toObjMapWithSymbols ( config . extensions ) ;
787
787
this . astNode = config . astNode ;
788
788
this . extensionASTNodes = config . extensionASTNodes ?? [ ] ;
789
789
this . _fields = ( defineFieldMap < TSource , TContext > ) . bind (
@@ -854,7 +854,7 @@ function defineFieldMap<TSource, TContext>(
854
854
resolve : fieldConfig . resolve ,
855
855
subscribe : fieldConfig . subscribe ,
856
856
deprecationReason : fieldConfig . deprecationReason ,
857
- extensions : toObjMap ( fieldConfig . extensions ) ,
857
+ extensions : toObjMapWithSymbols ( fieldConfig . extensions ) ,
858
858
astNode : fieldConfig . astNode ,
859
859
} ;
860
860
} ) ;
@@ -869,7 +869,7 @@ export function defineArguments(
869
869
type : argConfig . type ,
870
870
defaultValue : defineDefaultValue ( argName , argConfig ) ,
871
871
deprecationReason : argConfig . deprecationReason ,
872
- extensions : toObjMap ( argConfig . extensions ) ,
872
+ extensions : toObjMapWithSymbols ( argConfig . extensions ) ,
873
873
astNode : argConfig . astNode ,
874
874
} ) ) ;
875
875
}
@@ -1122,7 +1122,7 @@ export class GraphQLInterfaceType<TSource = any, TContext = any> {
1122
1122
this . name = assertName ( config . name ) ;
1123
1123
this . description = config . description ;
1124
1124
this . resolveType = config . resolveType ;
1125
- this . extensions = toObjMap ( config . extensions ) ;
1125
+ this . extensions = toObjMapWithSymbols ( config . extensions ) ;
1126
1126
this . astNode = config . astNode ;
1127
1127
this . extensionASTNodes = config . extensionASTNodes ?? [ ] ;
1128
1128
this . _fields = ( defineFieldMap < TSource , TContext > ) . bind (
@@ -1247,7 +1247,7 @@ export class GraphQLUnionType {
1247
1247
this . name = assertName ( config . name ) ;
1248
1248
this . description = config . description ;
1249
1249
this . resolveType = config . resolveType ;
1250
- this . extensions = toObjMap ( config . extensions ) ;
1250
+ this . extensions = toObjMapWithSymbols ( config . extensions ) ;
1251
1251
this . astNode = config . astNode ;
1252
1252
this . extensionASTNodes = config . extensionASTNodes ?? [ ] ;
1253
1253
@@ -1333,7 +1333,7 @@ function enumValuesFromConfig(values: GraphQLEnumValueConfigMap) {
1333
1333
description : valueConfig . description ,
1334
1334
value : valueConfig . value !== undefined ? valueConfig . value : valueName ,
1335
1335
deprecationReason : valueConfig . deprecationReason ,
1336
- extensions : toObjMap ( valueConfig . extensions ) ,
1336
+ extensions : toObjMapWithSymbols ( valueConfig . extensions ) ,
1337
1337
astNode : valueConfig . astNode ,
1338
1338
} ) ) ;
1339
1339
}
@@ -1378,7 +1378,7 @@ export class GraphQLEnumType /* <T> */ {
1378
1378
constructor ( config : Readonly < GraphQLEnumTypeConfig /* <T> */ > ) {
1379
1379
this . name = assertName ( config . name ) ;
1380
1380
this . description = config . description ;
1381
- this . extensions = toObjMap ( config . extensions ) ;
1381
+ this . extensions = toObjMapWithSymbols ( config . extensions ) ;
1382
1382
this . astNode = config . astNode ;
1383
1383
this . extensionASTNodes = config . extensionASTNodes ?? [ ] ;
1384
1384
@@ -1626,7 +1626,7 @@ export class GraphQLInputObjectType {
1626
1626
constructor ( config : Readonly < GraphQLInputObjectTypeConfig > ) {
1627
1627
this . name = assertName ( config . name ) ;
1628
1628
this . description = config . description ;
1629
- this . extensions = toObjMap ( config . extensions ) ;
1629
+ this . extensions = toObjMapWithSymbols ( config . extensions ) ;
1630
1630
this . astNode = config . astNode ;
1631
1631
this . extensionASTNodes = config . extensionASTNodes ?? [ ] ;
1632
1632
this . isOneOf = config . isOneOf ?? false ;
@@ -1686,7 +1686,7 @@ function defineInputFieldMap(
1686
1686
type : fieldConfig . type ,
1687
1687
defaultValue : defineDefaultValue ( fieldName , fieldConfig ) ,
1688
1688
deprecationReason : fieldConfig . deprecationReason ,
1689
- extensions : toObjMap ( fieldConfig . extensions ) ,
1689
+ extensions : toObjMapWithSymbols ( fieldConfig . extensions ) ,
1690
1690
astNode : fieldConfig . astNode ,
1691
1691
} ) ) ;
1692
1692
}
0 commit comments