File: test_build_ast_schema.py

package info (click to toggle)
graphql-core 3.2.7-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,452 kB
  • sloc: python: 46,922; makefile: 26; sh: 13
file content (11 lines) | stat: -rw-r--r-- 376 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
from graphql import parse, build_ast_schema, GraphQLSchema

from ..fixtures import big_schema_sdl  # noqa: F401


def test_build_schema_from_ast(benchmark, big_schema_sdl):  # noqa: F811
    schema_ast = parse(big_schema_sdl)
    schema: GraphQLSchema = benchmark(
        lambda: build_ast_schema(schema_ast, assume_valid=True)
    )
    assert schema.query_type is not None