@@ -868,7 +868,7 @@ export type IDirectiveResolvers${contextType} = ${name}<ContextType>;`
868
868
}
869
869
870
870
ListType ( node : ListTypeNode ) : string {
871
- const asString = ( node . type as any ) as string ;
871
+ const asString = node . type as any as string ;
872
872
873
873
return this . wrapWithArray ( asString ) ;
874
874
}
@@ -878,7 +878,7 @@ export type IDirectiveResolvers${contextType} = ${name}<ContextType>;`
878
878
}
879
879
880
880
NamedType ( node : NamedTypeNode ) : string {
881
- const nameStr = ( node . name as any ) as string ;
881
+ const nameStr = node . name as any as string ;
882
882
883
883
if ( this . config . scalars [ nameStr ] ) {
884
884
return this . _getScalar ( nameStr ) ;
@@ -888,7 +888,7 @@ export type IDirectiveResolvers${contextType} = ${name}<ContextType>;`
888
888
}
889
889
890
890
NonNullType ( node : NonNullTypeNode ) : string {
891
- const asString = ( node . type as any ) as string ;
891
+ const asString = node . type as any as string ;
892
892
893
893
return asString ;
894
894
}
@@ -1022,7 +1022,7 @@ export type IDirectiveResolvers${contextType} = ${name}<ContextType>;`
1022
1022
const name = this . convertName ( node , {
1023
1023
suffix : this . config . resolverTypeSuffix ,
1024
1024
} ) ;
1025
- const typeName = ( node . name as any ) as string ;
1025
+ const typeName = node . name as any as string ;
1026
1026
const parentType = this . getParentTypeToUse ( typeName ) ;
1027
1027
const isRootType = [
1028
1028
this . schema . getQueryType ( ) ?. name ,
@@ -1065,7 +1065,7 @@ export type IDirectiveResolvers${contextType} = ${name}<ContextType>;`
1065
1065
. join ( ' | ' ) ;
1066
1066
1067
1067
this . _collectedResolvers [ node . name as any ] = name + '<ContextType>' ;
1068
- const parentType = this . getParentTypeToUse ( ( node . name as any ) as string ) ;
1068
+ const parentType = this . getParentTypeToUse ( node . name as any as string ) ;
1069
1069
1070
1070
return new DeclarationBlock ( this . _declarationBlockConfig )
1071
1071
. export ( )
@@ -1081,7 +1081,7 @@ export type IDirectiveResolvers${contextType} = ${name}<ContextType>;`
1081
1081
}
1082
1082
1083
1083
ScalarTypeDefinition ( node : ScalarTypeDefinitionNode ) : string {
1084
- const nameAsString = ( node . name as any ) as string ;
1084
+ const nameAsString = node . name as any as string ;
1085
1085
const baseName = this . getTypeToUse ( nameAsString ) ;
1086
1086
1087
1087
if ( this . _federation . skipScalar ( nameAsString ) ) {
@@ -1206,13 +1206,13 @@ export type IDirectiveResolvers${contextType} = ${name}<ContextType>;`
1206
1206
for ( const graphqlType of Object . values ( allTypesMap ) ) {
1207
1207
if ( graphqlType instanceof GraphQLObjectType ) {
1208
1208
const allInterfaces = graphqlType . getInterfaces ( ) ;
1209
- if ( allInterfaces . find ( int => int . name === ( ( node . name as any ) as string ) ) ) {
1209
+ if ( allInterfaces . find ( int => int . name === ( node . name as any as string ) ) ) {
1210
1210
implementingTypes . push ( graphqlType . name ) ;
1211
1211
}
1212
1212
}
1213
1213
}
1214
1214
1215
- const parentType = this . getParentTypeToUse ( ( node . name as any ) as string ) ;
1215
+ const parentType = this . getParentTypeToUse ( node . name as any as string ) ;
1216
1216
const possibleTypes = implementingTypes . map ( name => `'${ name } '` ) . join ( ' | ' ) || 'null' ;
1217
1217
const fields = this . config . onlyResolveTypeForInterfaces ? [ ] : node . fields || [ ] ;
1218
1218
@@ -1238,7 +1238,7 @@ export type IDirectiveResolvers${contextType} = ${name}<ContextType>;`
1238
1238
}
1239
1239
1240
1240
function replacePlaceholder ( pattern : string , typename : string ) : string {
1241
- return pattern . replace ( '{T}' , typename ) ;
1241
+ return pattern . replace ( / \{ T \} / g , typename ) ;
1242
1242
}
1243
1243
1244
1244
function hasPlaceholder ( pattern : string ) : boolean {
0 commit comments