Skip to content

Commit 218c7fc

Browse files
committed
Add request context directly to the payload rather than a request_context key
1 parent 94d8740 commit 218c7fc

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

graphql_ws/base.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,7 @@ def on_connection_terminate(self, connection_context, op_id):
105105
return connection_context.close(1011)
106106

107107
def get_graphql_params(self, connection_context, payload):
108-
context = payload.get("context") or {}
109-
context.setdefault("request_context", connection_context.request_context)
108+
context = payload.get("context", connection_context.request_context)
110109
return {
111110
"request_string": payload.get("query"),
112111
"variable_values": payload.get("variables"),

0 commit comments

Comments
 (0)