<
10000
svg aria-hidden="true" focusable="false" class="octicon octicon-fold-up" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom"> @@ -4,10 +4,10 @@
4
4
from pytest import mark , raises
5
5
6
6
from graphql .execution import (
7
+ ExecutionContext ,
8
+ MapAsyncIterator ,
7
9
create_source_event_stream ,
8
10
subscribe ,
9
- MapAsyncIterator ,
10
- ExecutionContext ,
11
11
)
12
12
from graphql .language import parse
13
13
from graphql .pyutils import SimplePubSub
@@ -903,11 +903,11 @@ async def should_work_with_custom_execution_contexts():
903
903
class CustomExecutionContext (ExecutionContext ):
904
904
def build_resolve_info (self , * args , ** kwargs ):
905
905
resolve_info = super ().build_resolve_info (* args , ** kwargs )
906
- resolve_info .context [' foo' ] = ' bar'
906
+ resolve_info .context [" foo" ] = " bar"
907
907
return resolve_info
908
908
909
909
async def generate_messages (_obj , info ):
910
- yield info .context [' foo' ]
910
+ yield info .context [" foo" ]
911
911
912
912
def resolve_message (message , _info ):
913
913
return message
@@ -931,7 +931,7 @@ def resolve_message(message, _info):
931
931
schema ,
932
932
document ,
933
933
context_value = {},
934
- execution_context_class = CustomExecutionContext
934
+ execution_context_class = CustomExecutionContext ,
935
935
)
936
936
assert isinstance (subscription , MapAsyncIterator )
937
937
0 commit comments