Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix test for introspection type recursion level change in graphql-core v3.3.0a7 #521

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 20 additions & 4 deletions tests/starwars/test_dsl.py
Original file line number Diff line number Diff line change
Expand Up @@ -994,10 +994,26 @@ def test_get_introspection_query_ast(option):
input_value_deprecation=option,
)

assert print_ast(gql(introspection_query)) == print_ast(dsl_introspection_query)
assert node_tree(dsl_introspection_query) == node_tree(
gql(print_ast(dsl_introspection_query))
)
try:
assert print_ast(gql(introspection_query)) == print_ast(dsl_introspection_query)
assert node_tree(dsl_introspection_query) == node_tree(
gql(print_ast(dsl_introspection_query))
)
except AssertionError:

# From graphql-core version 3.3.0a7, there is two more type recursion levels
dsl_introspection_query = get_introspection_query_ast(
descriptions=option,
specified_by_url=option,
directive_is_repeatable=option,
schema_description=option,
input_value_deprecation=option,
type_recursion_level=9,
)
assert print_ast(gql(introspection_query)) == print_ast(dsl_introspection_query)
assert node_tree(dsl_introspection_query) == node_tree(
gql(print_ast(dsl_introspection_query))
)


def test_typename_aliased(ds):
Expand Down
Loading