Skip to content

Commit

Permalink
Assign missing user to context (#9520)
Browse files Browse the repository at this point in the history
* Remove list from payload. Use camel case for attached meta

* Fix tests

* Assign missing user to context

* Assign context to subscription execute
  • Loading branch information
Maciej Korycinski committed Apr 12, 2022
1 parent 6f37bd2 commit 6fce3bc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion saleor/graphql/webhook/subscription_payload.py
Expand Up @@ -85,6 +85,7 @@ def generate_payload_from_subscription(
generate a payload
"""
from ..api import schema
from ..context import get_context_value

graphql_backend = get_default_backend()
ast = parse(subscription_query) # type: ignore
Expand All @@ -99,7 +100,7 @@ def generate_payload_from_subscription(
results = document.execute(
allow_subscriptions=True,
root=(event_type, subscribable_object),
context=context,
context=get_context_value(context),
)
if hasattr(results, "errors"):
logger.warning(
Expand Down

0 comments on commit 6fce3bc

Please sign in to comment.