Skip to content

Commit 9142bed

Browse files
committed
Made minor grammar and spelling changes to README
1 parent 89d0f8b commit 9142bed

1 file changed

Lines changed: 14 additions & 13 deletions

File tree

README.md

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,31 +15,31 @@ $ pip install graphql-subscriptions
1515
```
1616

1717
## API
18-
### RedisPubsub(self, host='localhost', port=6379, *args, **kwargs)
18+
### RedisPubsub(self, host='localhost', port=6379, \*args, **kwargs)
1919
#### Arguments
20-
- `host`: Redis server instance
20+
- `host`: Redis server instance url or IP
2121
- `port`: Redis server port
2222
- `args, kwargs`: additional position and keyword args will be passed
2323
to Redis-py constructor
2424

2525
#### Methods
26-
- `publish(self, trigger_name, message)`: Trigger name is the subscription
26+
- `publish(self, trigger_name, message)`: Trigger name is a subscription
2727
or pubsub channel; message is the mutation object or message that will end
28-
up being passed to the subscription root_value; this method called inside of
28+
up being passed to the subscription root_value; this method will be called inside of
2929
mutation resolve function
3030
- `subscribe(self, trigger_name, on_message_handler, options)`: Trigger name
31-
is the subscription or pubsub channel; on_message_handler is the callback
32-
that will be triggered on each mutation; this method called by subscription
31+
is a subscription or pubsub channel; on_message_handler is the callback
32+
that will be triggered on each mutation; this method is called by the subscription
3333
manager
3434
- `unsubscribe(self, sub_id)`: Sub_id is the subscription ID that is being
35-
tracked by the pubsub instance -- returned from the `subscribe` method
35+
tracked by the pubsub instance -- it is returned from the `subscribe` method
3636
and called by the subscription manager
37-
- `wait_and_get_message(self)`: Called by subscribe method during first
38-
subscription; run in a separate greenlet and calls Redis `get_message()`
37+
- `wait_and_get_message(self)`: Called by the subscribe method during the first
38+
subscription for server; run in a separate greenlet and calls Redis `get_message()`
3939
method to constantly poll for new messages on pubsub channels
4040
- `handle_message(self, message)`: Called by pubsub when a message is
41-
received on a channel; check all existing pubsub subscriptons and calls
42-
`on_message_handler()` for all matches
41+
received on a subscribed channel; will check all existing pubsub subscriptons and
42+
then calls `on_message_handler()` for all matches
4343

4444
### SubscriptionManager(self, schema, pubsub, setup_funcs={})
4545
#### Arguments
@@ -68,10 +68,11 @@ $ pip install graphql-subscriptions
6868
#### Methods
6969
- `publish(self, trigger_name, payload)`: Trigger name is the subscription
7070
or pubsub channel; payload is the mutation object or message that will
71-
end up being passed to the subscription root_value; method called inside of mutation resolve function
71+
end up being passed to the subscription root_value; method called inside of
72+
mutation resolve function
7273
- `subscribe(self, query, operation_name, callback, variables, context,
7374
format_error, format_response)`: Called by ApolloSubscriptionServer upon
74-
receiving a new subscription from a websocket. Arguments parsed by
75+
receiving a new subscription from a websocket. Arguments are parsed by
7576
ApolloSubscriptionServer from graphql subscription query
7677
- `unsubscribe(self, sub_id)`: Sub_id is the subscription ID that is being
7778
tracked by the subscription manager instance -- returned from the

0 commit comments

Comments
 (0)