diff --git a/gql/cli.py b/gql/cli.py index a7d129e2..7302f33a 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,10 +331,13 @@ 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, - ) + from gql.transport.phoenix_channel_websockets import PhoenixChannelWebsocketsTransport return PhoenixChannelWebsocketsTransport(url=args.server, **transport_args)