Debian Codegraph @

tests/benchmarks/test_build_client_schema.py

raw
1 from graphql import build_client_schema, GraphQLSchema
2
3 from ..fixtures import big_schema_introspection_result # noqa: F401
4
5
6 def test_build_schema_from_introspection(
7 benchmark, big_schema_introspection_result # noqa: F811
8 ):
9 schema: GraphQLSchema = benchmark(
10 lambda: build_client_schema(
11 big_schema_introspection_result["data"], assume_valid=True
12 )
13 )
14 assert schema.query_type is not None