From 88fab1022a984a01de20b6511d7764f54a0ea928 Mon Sep 17 00:00:00 2001 From: Valentin Radu Date: Sat, 15 Dec 2018 17:59:21 +0200 Subject: [PATCH] Forwarding the context correctly to the graphql component --- graphql_ws/base.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/graphql_ws/base.py b/graphql_ws/base.py index 9556192..07e91d4 100644 --- a/graphql_ws/base.py +++ b/graphql_ws/base.py @@ -172,7 +172,10 @@ def on_connection_terminate(self, connection_context, op_id): def execute(self, request_context, params): return graphql( - self.schema, **dict(params, allow_subscriptions=True)) + self.schema, + **dict(params, + allow_subscriptions=True, + context_value=request_context)) def handle(self, ws, request_context=None): raise NotImplementedError("handle method not implemented")