File: test_build_client_schema.py

package info (click to toggle)
graphql-core 3.2.6-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,384 kB
  • sloc: python: 45,812; makefile: 26; sh: 13
file content (14 lines) | stat: -rw-r--r-- 437 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
from graphql import build_client_schema, GraphQLSchema

from ..fixtures import big_schema_introspection_result  # noqa: F401


def test_build_schema_from_introspection(
    benchmark, big_schema_introspection_result  # noqa: F811
):
    schema: GraphQLSchema = benchmark(
        lambda: build_client_schema(
            big_schema_introspection_result["data"], assume_valid=True
        )
    )
    assert schema.query_type is not None