From 06e8de09095812a497ab056b4d079803124eb3a9 Mon Sep 17 00:00:00 2001 From: "Malte S. Stretz" Date: Wed, 11 Dec 2024 13:12:50 +0100 Subject: [PATCH] Wire httpx transport in gql-cli --- gql/cli.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gql/cli.py b/gql/cli.py index a7d129e2..06781c2b 100644 --- a/gql/cli.py +++ b/gql/cli.py @@ -157,6 +157,7 @@ def get_parser(with_examples: bool = False) -> ArgumentParser: choices=[ "auto", "aiohttp", + "httpx", "phoenix", "websockets", "aiohttp_websockets", @@ -330,6 +331,11 @@ def get_transport(args: Namespace) -> Optional[AsyncTransport]: return AIOHTTPTransport(url=args.server, **transport_args) + elif transport_name == "httpx": + from gql.transport.httpx import HTTPXAsyncTransport + + return HTTPXAsyncTransport(url=args.server, **transport_args) + elif transport_name == "phoenix": from gql.transport.phoenix_channel_websockets import ( PhoenixChannelWebsocketsTransport,