Skip to content

Fix typos and improve docs #131

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/aiohttp.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Adds GraphQL support to your aiohttp application.

## Installation

To install the integration with aiohttp, run the below command on your terminal.
To install the integration with aiohttp, run the following command in your terminal.

`pip install graphql-server[aiohttp]`

Expand Down
2 changes: 1 addition & 1 deletion docs/flask.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Adds GraphQL support to your Flask application.

## Installation

To install the integration with Flask, run the below command on your terminal.
To install the integration with Flask, run the following command in your terminal.

`pip install graphql-server[flask]`

Expand Down
2 changes: 1 addition & 1 deletion docs/sanic.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Adds GraphQL support to your Sanic application.

## Installation

To install the integration with Sanic, run the below command on your terminal.
To install the integration with Sanic, run the following command in your terminal.

`pip install graphql-server[sanic]`

Expand Down
2 changes: 1 addition & 1 deletion docs/webob.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Adds GraphQL support to your WebOb (Pyramid, Pylons, ...) application.

## Installation

To install the integration with WebOb, run the below command on your terminal.
To install the integration with WebOb, run the following command in your terminal.

`pip install graphql-server[webob]`

Expand Down
6 changes: 3 additions & 3 deletions src/graphql_server/channels/handlers/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ async def channel_listen(
groups:
An optional sequence of groups to receive messages from.
When passing this parameter, the groups will be registered
using `self.channel_layer.group_add` at the beggining of the
using `self.channel_layer.group_add` at the beginning of the
execution and then discarded using `self.channel_layer.group_discard`
at the end of the execution.
"""
Expand Down Expand Up @@ -155,7 +155,7 @@ async def listen_to_channel(
groups:
An optional sequence of groups to receive messages from.
When passing this parameter, the groups will be registered
using `self.channel_layer.group_add` at the beggining of the
using `self.channel_layer.group_add` at the beginning of the
execution and then discarded using `self.channel_layer.group_discard`
at the end of the execution.
"""
Expand Down Expand Up @@ -192,7 +192,7 @@ async def _listen_to_channel_generator(
) -> AsyncGenerator[Any, None]:
"""Generator for listen_to_channel method.

Seperated to allow user code to be run after subscribing to channels
Separated to allow user code to be run after subscribing to channels
and before blocking to wait for incoming channel messages.
"""
while True:
Expand Down
2 changes: 1 addition & 1 deletion src/graphql_server/http/sync_base_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ def parse_http_body(
data = self.parse_multipart(request)
elif self._is_multipart_subscriptions(content_type, params):
raise HTTPException(
400, "Multipart subcriptions are not supported in sync mode"
400, "Multipart subscriptions are not supported in sync mode"
)
else:
raise HTTPException(400, "Unsupported content type")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ async def handle_message(self, message: Message) -> None:

async def handle_connection_init(self, message: ConnectionInitMessage) -> None:
if self.connection_timed_out:
# No way to reliably excercise this case during testing
# No way to reliably exercise this case during testing
return # pragma: no cover

if self.connection_init_timeout_task:
Expand Down Expand Up @@ -343,7 +343,7 @@ async def run_operation(self, operation: Operation[Context, RootValue]) -> None:

def forget_id(self, id: str) -> None:
# de-register the operation id making it immediately available
# for re-use
# for reuse
del self.operations[id]

async def handle_complete(self, message: CompleteMessage) -> None:
Expand Down
4 changes: 2 additions & 2 deletions src/tests/http/test_graphql_over_http_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ async def test_423l(http_client):

@pytest.mark.parametrize(
"invalid",
[{"obj": "ect"}, 0, False, ["array"]],
[{"obj": "etc"}, 0, False, ["array"]],
ids=["LKJ0", "LKJ1", "LKJ2", "LKJ3"],
)
async def test_lkj_(http_client, invalid):
Expand Down Expand Up @@ -222,7 +222,7 @@ async def test_13ee(http_client):

@pytest.mark.parametrize(
"invalid",
[{"obj": "ect"}, 0, False, ["array"]],
[{"obj": "etc"}, 0, False, ["array"]],
ids=["6C00", "6C01", "6C02", "6C03"],
)
async def test_6c0_(http_client, invalid):
Expand Down
6 changes: 3 additions & 3 deletions src/tests/websockets/test_graphql_transport_ws.py
Original file line number Diff line number Diff line change
Expand Up @@ -422,8 +422,8 @@ async def test_duplicated_operation_ids(ws: WebSocketClient):


async def test_reused_operation_ids(ws: WebSocketClient):
"""Test that an operation id can be re-used after it has been
previously used for a completed operation.
"""Test that an operation id can be reused after it has been
previously used for a completed operation.
"""
# Use sub1 as an id for an operation
await ws.send_message(
Expand Down Expand Up @@ -1126,7 +1126,7 @@ def on_init(_handler):
assert connection_ack_message == {"type": "connection_ack"}
await ws.close()

# the error hander should have been called
# the error handler should have been called
assert handler
errorhandler.assert_called_once()
args = errorhandler.call_args
Expand Down
4 changes: 2 additions & 2 deletions src/tests/websockets/test_graphql_ws.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,8 +311,8 @@ async def test_sends_keep_alive(http_client_class: type[HttpClient]):
ack_message: ConnectionAckMessage = await ws.receive_json()
assert ack_message["type"] == "connection_ack"

# we can't be sure how many keep-alives exactly we
# get but they should be more than one.
# We can't be sure how many keep-alive messages exactly we
# get, but there should be more than one.
keepalive_count = 0
while True:
ka_or_data_message: Union[
Expand Down