Skip to content

Commit

Permalink
Wire httpx transport in gql-cli
Browse files Browse the repository at this point in the history
  • Loading branch information
mss committed Dec 11, 2024
1 parent b2f2a68 commit 06e8de0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions gql/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ def get_parser(with_examples: bool = False) -> ArgumentParser:
choices=[
"auto",
"aiohttp",
"httpx",
"phoenix",
"websockets",
"aiohttp_websockets",
Expand Down Expand Up @@ -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

Check warning on line 335 in gql/cli.py

View check run for this annotation

Codecov / codecov/patch

gql/cli.py#L335

Added line #L335 was not covered by tests

return HTTPXAsyncTransport(url=args.server, **transport_args)

Check warning on line 337 in gql/cli.py

View check run for this annotation

Codecov / codecov/patch

gql/cli.py#L337

Added line #L337 was not covered by tests

elif transport_name == "phoenix":
from gql.transport.phoenix_channel_websockets import (
PhoenixChannelWebsocketsTransport,
Expand Down

0 comments on commit 06e8de0

Please sign in to comment.