@@ -38,10 +38,25 @@ def cycle_introspection(sdl_string):
38
38
# If the client then runs the introspection query against the client-side schema,
39
39
# it should get a result identical to what was returned by the server
40
40
second_introspection = introspection_from_schema (client_schema )
41
+
42
+ hack_to_remove_standard_types (second_introspection )
43
+ hack_to_remove_standard_types (initial_introspection )
44
+
45
+ # If the client then runs the introspection query against the client-side
46
+ # schema, it should get a result identical to what was returned by the server.
41
47
assert initial_introspection == second_introspection
42
48
return print_schema (client_schema )
43
49
44
50
51
+ # Temporary hack to remove always presented standard types - should be removed in 15.0
52
+ def hack_to_remove_standard_types (introspection ):
53
+ introspection ["__schema" ]["types" ] = [
54
+ type_
55
+ for type_ in introspection ["__schema" ]["types" ]
56
+ if type_ ["name" ] not in ("ID" , "Float" , "Int" , "Boolean" , "String" )
57
+ ]
58
+
59
+
45
60
def describe_type_system_build_schema_from_introspection ():
46
61
def builds_a_simple_schema ():
47
62
sdl = dedent (
@@ -311,6 +326,9 @@ def builds_a_schema_with_an_enum():
311
326
introspection = introspection_from_schema (schema )
312
327
client_schema = build_client_schema (introspection )
313
328
second_introspection = introspection_from_schema (client_schema )
329
+
330
+ hack_to_remove_standard_types (second_introspection )
331
+ hack_to_remove_standard_types (introspection )
314
332
assert second_introspection == introspection
315
333
316
334
client_food_enum = client_schema .get_type ("Food" )
0 commit comments