Skip to content

Commit 7a73f11

Browse files
committed
Fixed dependency error in setup.py; stubbed out test files
Also fixed minor issues in README.md
1 parent 945347b commit 7a73f11

4 files changed

Lines changed: 13 additions & 7 deletions

File tree

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,15 @@ $ pip install graphql-subscriptions
5656
- `subscription_manager`: A subscripton manager instance (required).
5757
- `websocket`: The websocket object passed in from your route handler (required).
5858
- `keep_alive`: The time period, in seconds, that the server will send keep alive messages to the client. (optional)
59-
- `on_subscribe(message, subscription_parameters, websocket)`: Optional function to create custom params that will be used when resolving this subscription (optional)
60-
- `on_unsubscribe(websocket)`: Optional function that is called when a client unsubscribes (optional)
61-
- `on_connect(message_payload, websocket)`: Optional function that will be called when a client connects to the socket, called with the message_payload from the client, if the return value is an object, its elements will be added to the context. Return false or throw an exception to reject the connection. May return a Promise. (optional)
62-
- `on_disconnect(websocket)`: Optional function that called when a client disconnects (optional)
59+
- `on_subscribe(message, subscription_parameters, websocket)`: Function to create custom params that will be used when resolving this subscription (optional)
60+
- `on_unsubscribe(websocket)`: Function that is called when a client unsubscribes (optional)
61+
- `on_connect(message_payload, websocket)`: Function that will be called when a client connects to the socket, called with the message_payload from the client, if the return value is an object, its elements will be added to the context. Return false or throw an exception to reject the connection. May return a Promise. (optional)
62+
- `on_disconnect(websocket)`: Function that called when a client disconnects (optional)
6363

6464
#### Methods
6565
- `on_open()`: Called when the socket first opens; checks for correct subscription protocol and initializes keep alive messages
6666
- `on_close(reason)`: Called when socket is closed; unsubscribes from subscriptions and deletes subscription objects
67-
- `on_message(message)`: provides main control flow for all messaging exchanged between on socket between server and client; parses initial message, checks for exceptions, responds to client and subscribes / unsubscribes socket to mutation channels, via pubsub
67+
- `on_message(message)`: provides main control flow for all messaging exchanged on the socket between server and client; parses initial message, checks for exceptions, responds to client and subscribes / unsubscribes socket to mutation channels, via pubsub
6868
- `unsubscribe(sub_id)`: Unsubscribes socket from subscriptions specified by client
6969
- `timer()`: Timer for sending keep alive messages to client; run in separate greenlet per socket
7070
- `send_init_result(result), send_keep_alive(), send_subscription_data(sub_id, payload), send_subscription_fail(sub_id, payload), send_subscription_success(sub_id)`: convenience methods for sending different messages and payloads to client

setup.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
setup(
1010
name='graphql-subscriptions',
11-
version='0.1.4',
11+
version='0.1.5',
1212
author='Heath Ballard',
1313
author_email='heath.ballard@gmail.com',
1414
description=('A port of apollo-graphql subscriptions for python, using\
@@ -30,7 +30,8 @@
3030
install_requires=[
3131
'gevent-websocket',
3232
'redis',
33-
'Promises'
33+
'promise',
34+
'graphql-core'
3435
],
3536
include_package_data=True
3637
)

tests/test_subscription_manager.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
from graphql_subscriptions import subscription_manager
2+
3+
4+
def test_some_test():
5+
assert True

tests/test_subscription_transport.py

Whitespace-only changes.

0 commit comments

Comments
 (0)