From 5e83715d743e58a57bc61334ad16c0b9220c7efb Mon Sep 17 00:00:00 2001 From: Hanusz Leszek Date: Thu, 25 Nov 2021 11:52:12 +0100 Subject: [PATCH 1/3] Phoenix transport: remove experimental and add ref --- docs/transports/phoenix.rst | 5 ++++- gql/transport/phoenix_channel_websockets.py | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/transports/phoenix.rst b/docs/transports/phoenix.rst index 3b5b9f53..7fb4a90c 100644 --- a/docs/transports/phoenix.rst +++ b/docs/transports/phoenix.rst @@ -3,10 +3,13 @@ PhoenixChannelWebsocketsTransport ================================= -The PhoenixChannelWebsocketsTransport is an **EXPERIMENTAL** async transport which allows you +The PhoenixChannelWebsocketsTransport is an async transport which allows you to execute queries and subscriptions against an `Absinthe`_ backend using the `Phoenix`_ framework `channels`_. +Reference: +:class:`gql.transport.phoenix_channel_websockets.PhoenixChannelWebsocketsTransport` + .. _Absinthe: http://absinthe-graphql.org .. _Phoenix: https://www.phoenixframework.org .. _channels: https://hexdocs.pm/phoenix/Phoenix.Channel.html#content diff --git a/gql/transport/phoenix_channel_websockets.py b/gql/transport/phoenix_channel_websockets.py index 56d35f8b..b750c39c 100644 --- a/gql/transport/phoenix_channel_websockets.py +++ b/gql/transport/phoenix_channel_websockets.py @@ -25,7 +25,7 @@ def __init__(self, query_id: int) -> None: class PhoenixChannelWebsocketsTransport(WebsocketsTransport): - """The PhoenixChannelWebsocketsTransport is an **EXPERIMENTAL** async transport + """The PhoenixChannelWebsocketsTransport is an async transport which allows you to execute queries and subscriptions against an `Absinthe`_ backend using the `Phoenix`_ framework `channels`_. From 4d59db75c4f060a3612da2131cf880878d4d3928 Mon Sep 17 00:00:00 2001 From: Hanusz Leszek Date: Thu, 25 Nov 2021 11:55:49 +0100 Subject: [PATCH 2/3] Fix client serialize_variables argument doc --- gql/client.py | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/gql/client.py b/gql/client.py index c39da95b..10b63965 100644 --- a/gql/client.py +++ b/gql/client.py @@ -317,9 +317,10 @@ def _execute( :param variable_values: Dictionary of input parameters. :param operation_name: Name of the operation that shall be executed. :param serialize_variables: whether the variable values should be - serialized. Used for custom scalars and/or enums. Default: False. + serialized. Used for custom scalars and/or enums. + By default use the serialize_variables argument of the client. :param parse_result: Whether gql will unserialize the result. - By default use the parse_results attribute of the client. + By default use the parse_results argument of the client. The extra arguments are passed to the transport execute method.""" @@ -380,9 +381,10 @@ def execute( :param variable_values: Dictionary of input parameters. :param operation_name: Name of the operation that shall be executed. :param serialize_variables: whether the variable values should be - serialized. Used for custom scalars and/or enums. Default: False. + serialized. Used for custom scalars and/or enums. + By default use the serialize_variables argument of the client. :param parse_result: Whether gql will unserialize the result. - By default use the parse_results attribute of the client. + By default use the parse_results argument of the client. :param get_execution_result: return the full ExecutionResult instance instead of only the "data" field. Necessary if you want to get the "extensions" field. @@ -464,9 +466,10 @@ async def _subscribe( :param variable_values: Dictionary of input parameters. :param operation_name: Name of the operation that shall be executed. :param serialize_variables: whether the variable values should be - serialized. Used for custom scalars and/or enums. Default: False. + serialized. Used for custom scalars and/or enums. + By default use the serialize_variables argument of the client. :param parse_result: Whether gql will unserialize the result. - By default use the parse_results attribute of the client. + By default use the parse_results argument of the client. The extra arguments are passed to the transport subscribe method.""" @@ -541,9 +544,10 @@ async def subscribe( :param variable_values: Dictionary of input parameters. :param operation_name: Name of the operation that shall be executed. :param serialize_variables: whether the variable values should be - serialized. Used for custom scalars and/or enums. Default: False. + serialized. Used for custom scalars and/or enums. + By default use the serialize_variables argument of the client. :param parse_result: Whether gql will unserialize the result. - By default use the parse_results attribute of the client. + By default use the parse_results argument of the client. :param get_execution_result: yield the full ExecutionResult instance instead of only the "data" field. Necessary if you want to get the "extensions" field. @@ -600,9 +604,10 @@ async def _execute( :param variable_values: Dictionary of input parameters. :param operation_name: Name of the operation that shall be executed. :param serialize_variables: whether the variable values should be - serialized. Used for custom scalars and/or enums. Default: False. + serialized. Used for custom scalars and/or enums. + By default use the serialize_variables argument of the client. :param parse_result: Whether gql will unserialize the result. - By default use the parse_results attribute of the client. + By default use the parse_results argument of the client. The extra arguments are passed to the transport execute method.""" @@ -667,9 +672,10 @@ async def execute( :param variable_values: Dictionary of input parameters. :param operation_name: Name of the operation that shall be executed. :param serialize_variables: whether the variable values should be - serialized. Used for custom scalars and/or enums. Default: False. + serialized. Used for custom scalars and/or enums. + By default use the serialize_variables argument of the client. :param parse_result: Whether gql will unserialize the result. - By default use the parse_results attribute of the client. + By default use the parse_results argument of the client. :param get_execution_result: return the full ExecutionResult instance instead of only the "data" field. Necessary if you want to get the "extensions" field. From b827db5d79e84e75ec3733135b61831784c41004 Mon Sep 17 00:00:00 2001 From: Hanusz Leszek Date: Thu, 25 Nov 2021 12:50:46 +0100 Subject: [PATCH 3/3] add small mention of downloading schemas with gql-cli --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a85761e1..2fa37978 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ The main features of GQL are: * Supports [sync or async usage](https://gql.readthedocs.io/en/latest/async/index.html), [allowing concurrent requests](https://gql.readthedocs.io/en/latest/advanced/async_advanced_usage.html#async-advanced-usage) * Supports [File uploads](https://gql.readthedocs.io/en/latest/usage/file_upload.html) * Supports [Custom scalars / Enums](https://gql.readthedocs.io/en/latest/usage/custom_scalars_and_enums.html) -* [gql-cli script](https://gql.readthedocs.io/en/latest/gql-cli/intro.html) to execute GraphQL queries from the command line +* [gql-cli script](https://gql.readthedocs.io/en/latest/gql-cli/intro.html) to execute GraphQL queries or download schemas from the command line * [DSL module](https://gql.readthedocs.io/en/latest/advanced/dsl_module.html) to compose GraphQL queries dynamically ## Installation