Skip to content

Commit 2a3799f

Browse files
committed
Add support for fourfold nested lists in introspection
Replicates graphql/graphql-js@826ae7f
1 parent 7134b68 commit 2a3799f

File tree

2 files changed

+15
-7
lines changed

2 files changed

+15
-7
lines changed

src/graphql/utilities/get_introspection_query.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,14 @@ def input_deprecation(string: str) -> str | None:
149149
ofType {{
150150
kind
151151
name
152+
ofType {{
153+
kind
154+
name
155+
ofType {{
156+
kind
157+
name
158+
}}
159+
}}
152160
}}
153161
}}
154162
}}

tests/utilities/test_build_client_schema.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -991,11 +991,11 @@ def throws_when_missing_directive_args():
991991
build_client_schema(introspection)
992992

993993
def describe_very_deep_decorators_are_not_supported():
994-
def fails_on_very_deep_lists_more_than_7_levels():
994+
def fails_on_very_deep_lists_more_than_8_levels():
995995
schema = build_schema(
996996
"""
997997
type Query {
998-
foo: [[[[[[[[String]]]]]]]]
998+
foo: [[[[[[[[[[String]]]]]]]]]]
999999
}
10001000
"""
10011001
)
@@ -1010,11 +1010,11 @@ def fails_on_very_deep_lists_more_than_7_levels():
10101010
" Decorated type deeper than introspection query."
10111011
)
10121012

1013-
def fails_on_a_very_deep_non_null_more_than_7_levels():
1013+
def fails_on_a_very_deep_more_than_8_levels_non_null():
10141014
schema = build_schema(
10151015
"""
10161016
type Query {
1017-
foo: [[[[String!]!]!]!]
1017+
foo: [[[[[String!]!]!]!]!]
10181018
}
10191019
"""
10201020
)
@@ -1029,12 +1029,12 @@ def fails_on_a_very_deep_non_null_more_than_7_levels():
10291029
" Decorated type deeper than introspection query."
10301030
)
10311031

1032-
def succeeds_on_deep_types_less_or_equal_7_levels():
1033-
# e.g., fully non-null 3D matrix
1032+
def succeeds_on_deep_less_or_equal_8_levels_types():
1033+
# e.g., fully non-null 4D matrix
10341034
sdl = dedent(
10351035
"""
10361036
type Query {
1037-
foo: [[[String!]!]!]!
1037+
foo: [[[[String!]!]!]!]!
10381038
}
10391039
"""
10401040
)

0 commit comments

Comments
 (0)