Skip to content

Commit 4a36602

Browse files
authored
Using gql version of the get_introspection_query method (#523)
This would reset the change of graphql-core to increase the type recursion level from 7 to 9
1 parent 38e64b2 commit 4a36602

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

gql/client.py

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
GraphQLSchema,
3030
IntrospectionQuery,
3131
build_ast_schema,
32-
get_introspection_query,
3332
parse,
3433
validate,
3534
)
@@ -39,7 +38,7 @@
3938
from .transport.exceptions import TransportClosed, TransportQueryError
4039
from .transport.local_schema import LocalSchemaTransport
4140
from .transport.transport import Transport
42-
from .utilities import build_client_schema
41+
from .utilities import build_client_schema, get_introspection_query_ast
4342
from .utilities import parse_result as parse_result_fn
4443
from .utilities import serialize_variable_values
4544
from .utils import str_first_element
@@ -87,8 +86,8 @@ def __init__(
8786
:param transport: The provided :ref:`transport <Transports>`.
8887
:param fetch_schema_from_transport: Boolean to indicate that if we want to fetch
8988
the schema from the transport using an introspection query.
90-
:param introspection_args: arguments passed to the get_introspection_query
91-
method of graphql-core.
89+
:param introspection_args: arguments passed to the
90+
:meth:`gql.utilities.get_introspection_query_ast` method.
9291
:param execute_timeout: The maximum time in seconds for the execution of a
9392
request before a TimeoutError is raised. Only used for async transports.
9493
Passing None results in waiting forever for a response.
@@ -1282,8 +1281,10 @@ def fetch_schema(self) -> None:
12821281
12831282
Don't use this function and instead set the fetch_schema_from_transport
12841283
attribute to True"""
1285-
introspection_query = get_introspection_query(**self.client.introspection_args)
1286-
execution_result = self.transport.execute(parse(introspection_query))
1284+
introspection_query = get_introspection_query_ast(
1285+
**self.client.introspection_args
1286+
)
1287+
execution_result = self.transport.execute(introspection_query)
12871288

12881289
self.client._build_schema_from_introspection(execution_result)
12891290

@@ -1650,8 +1651,10 @@ async def fetch_schema(self) -> None:
16501651
16511652
Don't use this function and instead set the fetch_schema_from_transport
16521653
attribute to True"""
1653-
introspection_query = get_introspection_query(**self.client.introspection_args)
1654-
execution_result = await self.transport.execute(parse(introspection_query))
1654+
introspection_query = get_introspection_query_ast(
1655+
**self.client.introspection_args
1656+
)
1657+
execution_result = await self.transport.execute(introspection_query)
16551658

16561659
self.client._build_schema_from_introspection(execution_result)
16571660

0 commit comments

Comments
 (0)