We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 71763a3 commit aa77082Copy full SHA for aa77082
tests/benchmarks/test_graphql_schema.py
@@ -0,0 +1,11 @@
1
+from graphql import GraphQLSchema, build_schema, print_schema
2
+
3
+from ..fixtures import big_schema_sdl # noqa: F401
4
5
6
+def test_recreate_a_graphql_schema(benchmark, big_schema_sdl): # noqa: F811
7
+ schema = build_schema(big_schema_sdl, assume_valid=True)
8
+ recreated_schema: GraphQLSchema = benchmark(
9
+ lambda: GraphQLSchema(**schema.to_kwargs())
10
+ )
11
+ assert print_schema(schema) == print_schema(recreated_schema)
0 commit comments