|
29 | 29 | GraphQLSchema,
|
30 | 30 | IntrospectionQuery,
|
31 | 31 | build_ast_schema,
|
32 |
| - get_introspection_query, |
33 | 32 | parse,
|
34 | 33 | validate,
|
35 | 34 | )
|
|
39 | 38 | from .transport.exceptions import TransportClosed, TransportQueryError
|
40 | 39 | from .transport.local_schema import LocalSchemaTransport
|
41 | 40 | from .transport.transport import Transport
|
42 |
| -from .utilities import build_client_schema |
| 41 | +from .utilities import build_client_schema, get_introspection_query_ast |
43 | 42 | from .utilities import parse_result as parse_result_fn
|
44 | 43 | from .utilities import serialize_variable_values
|
45 | 44 | from .utils import str_first_element
|
@@ -87,8 +86,8 @@ def __init__(
|
87 | 86 | :param transport: The provided :ref:`transport <Transports>`.
|
88 | 87 | :param fetch_schema_from_transport: Boolean to indicate that if we want to fetch
|
89 | 88 | 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. |
92 | 91 | :param execute_timeout: The maximum time in seconds for the execution of a
|
93 | 92 | request before a TimeoutError is raised. Only used for async transports.
|
94 | 93 | Passing None results in waiting forever for a response.
|
@@ -1282,8 +1281,10 @@ def fetch_schema(self) -> None:
|
1282 | 1281 |
|
1283 | 1282 | Don't use this function and instead set the fetch_schema_from_transport
|
1284 | 1283 | 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) |
1287 | 1288 |
|
1288 | 1289 | self.client._build_schema_from_introspection(execution_result)
|
1289 | 1290 |
|
@@ -1650,8 +1651,10 @@ async def fetch_schema(self) -> None:
|
1650 | 1651 |
|
1651 | 1652 | Don't use this function and instead set the fetch_schema_from_transport
|
1652 | 1653 | 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) |
1655 | 1658 |
|
1656 | 1659 | self.client._build_schema_from_introspection(execution_result)
|
1657 | 1660 |
|
|
0 commit comments