Skip to content

Commit 7ac6115

Browse files
committed
Copy the initial context rather than updating it. #8
1 parent 560f1cd commit 7ac6115

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sanic_graphql/graphqlview.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def get_root_value(self, request):
4747
return self.root_value
4848

4949
def get_context(self, request):
50-
context = self.context or {}
50+
context = self.context.copy() if self.context else {}
5151
if isinstance(context, dict) and 'request' not in context:
5252
context.update({'request': request})
5353
return context

0 commit comments

Comments
 (0)