@@ -144,16 +144,6 @@ def run(schema: GraphQLSchema, config: dict):
144
144
145
145
146
146
def validate_names (schema : GraphQLSchema , validate ):
147
- # scalars
148
- if validate .get ('scalar_names' ):
149
- # type names
150
- f = string_transforms .get (validate .get ('scalar_names' ))
151
- if f is None :
152
- raise Exception ('Unrecognized option: ' + validate .get ('type_names' ))
153
- for type_name , _type in schema .type_map .items ():
154
- if is_sclara_type (_type ):
155
- if f (type_name ) != type_name :
156
- raise Exception (f'Scalar "{ type_name } " does not follow { validate .get ("scalar_names" )} ' )
157
147
158
148
# types and interfaces
159
149
if validate .get ('type_names' ):
@@ -196,12 +186,6 @@ def validate_names(schema: GraphQLSchema, validate):
196
186
197
187
198
188
def transform_names (schema : GraphQLSchema , transform ):
199
- # scalar
200
- if transform .get ('scalar_names' ):
201
- if transform .get ('scalar_names' ) in string_transforms :
202
- transform_scalars (schema , string_transforms [transform .get ('scalar_names' )])
203
- else :
204
- raise Exception ('Unsupported scalar name transform: ' + transform .get ('scalar_names' ))
205
189
206
190
# types and interfaces
207
191
if transform .get ('type_names' ):
@@ -229,16 +213,6 @@ def transform_names(schema: GraphQLSchema, transform):
229
213
drop_comments (schema )
230
214
231
215
232
- def transform_scalars (schema , transform ):
233
- type_names = set (schema .type_map .keys ())
234
- for type_name in type_names :
235
- _type = schema .type_map [type_name ]
236
- if is_scalar_type (_type ):
237
- schema .type_map .pop (type_name )
238
- _type .name = transform (type_name )
239
- schema .type_map [_type .name ] = _type
240
-
241
-
242
216
def transform_types (schema , transform ):
243
217
type_names = set (schema .type_map .keys ())
244
218
for type_name in type_names :
0 commit comments