-
Notifications
You must be signed in to change notification settings - Fork 89
/
Copy pathconstants.py
19 lines (17 loc) · 964 Bytes
/
constants.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
GRAPHQL_WS = "graphql-ws"
WS_PROTOCOL = GRAPHQL_WS
TRANSPORT_WS_PROTOCOL = "graphql-transport-ws"
GQL_CONNECTION_INIT = "connection_init" # Client -> Server
GQL_CONNECTION_ACK = "connection_ack" # Server -> Client
GQL_CONNECTION_ERROR = "connection_error" # Server -> Client
# NOTE: This one here don't follow the standard due to connection optimization
GQL_CONNECTION_TERMINATE = "connection_terminate" # Client -> Server
GQL_CONNECTION_KEEP_ALIVE = "ka" # Server -> Client
GQL_START = "start" # Client -> Server (graphql-ws)
GQL_SUBSCRIBE = "subscribe" # Client -> Server (graphql-transport-ws START equivalent)
GQL_DATA = "data" # Server -> Client (graphql-ws)
GQL_NEXT = "next" # Server -> Client (graphql-transport-ws DATA equivalent)
GQL_ERROR = "error" # Server -> Client
GQL_COMPLETE = "complete" # Server -> Client
# (and Client -> Server for graphql-transport-ws STOP equivalent)
GQL_STOP = "stop" # Client -> Server (graphql-ws only)