Skip to content

Commit 06e8de0

Browse files
committed
Wire httpx transport in gql-cli
1 parent b2f2a68 commit 06e8de0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

gql/cli.py

+6
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ def get_parser(with_examples: bool = False) -> ArgumentParser:
157157
choices=[
158158
"auto",
159159
"aiohttp",
160+
"httpx",
160161
"phoenix",
161162
"websockets",
162163
"aiohttp_websockets",
@@ -330,6 +331,11 @@ def get_transport(args: Namespace) -> Optional[AsyncTransport]:
330331

331332
return AIOHTTPTransport(url=args.server, **transport_args)
332333

334+
elif transport_name == "httpx":
335+
from gql.transport.httpx import HTTPXAsyncTransport
336+
337+
return HTTPXAsyncTransport(url=args.server, **transport_args)
338+
333339
elif transport_name == "phoenix":
334340
from gql.transport.phoenix_channel_websockets import (
335341
PhoenixChannelWebsocketsTransport,

0 commit comments

Comments
 (0)