@@ -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
@@ -511,7 +511,7 @@ export function resolveObjMapThunk<T>(thunk: ThunkObjMap<T>): ObjMap<T> {
511
511
* an object which can contain all the values you need.
512
512
*/
513
513
export interface GraphQLScalarTypeExtensions {
514
- [ attributeName : string ] : unknown ;
514
+ [ attributeName : string | symbol ] : unknown ;
515
515
}
516
516
517
517
/**
@@ -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
@@ -725,7 +725,7 @@ interface GraphQLScalarTypeNormalizedConfig<TInternal, TExternal>
725
725
* you may find them useful.
726
726
*/
727
727
export interface GraphQLObjectTypeExtensions < _TSource = any , _TContext = any > {
728
- [ attributeName : string ] : unknown ;
728
+ [ attributeName : string | symbol ] : unknown ;
729
729
}
730
730
731
731
/**
@@ -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
}
@@ -980,7 +980,7 @@ export interface GraphQLResolveInfo {
980
980
* you may find them useful.
981
981
*/
982
982
export interface GraphQLFieldExtensions < _TSource , _TContext , _TArgs = any > {
983
- [ attributeName : string ] : unknown ;
983
+ [ attributeName : string | symbol ] : unknown ;
984
984
}
985
985
986
986
export interface GraphQLFieldConfig < TSource , TContext , TArgs = any > {
@@ -1008,7 +1008,7 @@ export type GraphQLFieldConfigArgumentMap = ObjMap<GraphQLArgumentConfig>;
1008
1008
* an object which can contain all the values you need.
1009
1009
*/
1010
1010
export interface GraphQLArgumentExtensions {
1011
- [ attributeName : string ] : unknown ;
1011
+ [ attributeName : string | symbol ] : unknown ;
1012
1012
}
1013
1013
1014
1014
export interface GraphQLArgumentConfig {
@@ -1085,7 +1085,7 @@ export function defineDefaultValue(
1085
1085
* an object which can contain all the values you need.
1086
1086
*/
1087
1087
export interface GraphQLInterfaceTypeExtensions {
1088
- [ attributeName : string ] : unknown ;
1088
+ [ attributeName : string | symbol ] : unknown ;
1089
1089
}
1090
1090
1091
1091
/**
@@ -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 (
@@ -1206,7 +1206,7 @@ interface GraphQLInterfaceTypeNormalizedConfig<TSource, TContext>
1206
1206
* an object which can contain all the values you need.
1207
1207
*/
1208
1208
export interface GraphQLUnionTypeExtensions {
1209
- [ attributeName : string ] : unknown ;
1209
+ [ attributeName : string | symbol ] : unknown ;
1210
1210
}
1211
1211
1212
1212
/**
@@ -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
@@ -1324,7 +1324,7 @@ interface GraphQLUnionTypeNormalizedConfig
1324
1324
* an object which can contain all the values you need.
1325
1325
*/
1326
1326
export interface GraphQLEnumTypeExtensions {
1327
- [ attributeName : string ] : unknown ;
1327
+ [ attributeName : string | symbol ] : unknown ;
1328
1328
}
1329
1329
1330
1330
function enumValuesFromConfig ( values : GraphQLEnumValueConfigMap ) {
@@ -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
@@ -1559,7 +1559,7 @@ export type GraphQLEnumValueConfigMap /* <T> */ =
1559
1559
* an object which can contain all the values you need.
1560
1560
*/
1561
1561
export interface GraphQLEnumValueExtensions {
1562
- [ attributeName : string ] : unknown ;
1562
+ [ attributeName : string | symbol ] : unknown ;
1563
1563
}
1564
1564
1565
1565
export interface GraphQLEnumValueConfig {
@@ -1589,7 +1589,7 @@ export interface GraphQLEnumValue {
1589
1589
* an object which can contain all the values you need.
1590
1590
*/
1591
1591
export interface GraphQLInputObjectTypeExtensions {
1592
- [ attributeName : string ] : unknown ;
1592
+ [ attributeName : string | symbol ] : unknown ;
1593
1593
}
1594
1594
1595
1595
/**
@@ -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
}
@@ -1718,7 +1718,7 @@ interface GraphQLInputObjectTypeNormalizedConfig
1718
1718
* an object which can contain all the values you need.
1719
1719
*/
1720
1720
export interface GraphQLInputFieldExtensions {
1721
- [ attributeName : string ] : unknown ;
1721
+ [ attributeName : string | symbol ] : unknown ;
1722
1722
}
1723
1723
1724
1724
export interface GraphQLInputFieldConfig {
0 commit comments