@@ -13,7 +13,7 @@ namespace HotChocolate.Execution
1313 internal class SubscriptionExecutionStrategy
1414 : ExecutionStrategyBase
1515 {
16- public override async Task < IExecutionResult > ExecuteAsync (
16+ public override Task < IExecutionResult > ExecuteAsync (
1717 IExecutionContext executionContext ,
1818 CancellationToken cancellationToken )
1919 {
@@ -22,10 +22,17 @@ public override async Task<IExecutionResult> ExecuteAsync(
2222 throw new ArgumentNullException ( nameof ( executionContext ) ) ;
2323 }
2424
25- EventDescription @event = CreateEvent ( executionContext ) ;
25+ return ExecuteInternalAsync ( executionContext , cancellationToken ) ;
26+ }
27+
28+ private async Task < IExecutionResult > ExecuteInternalAsync (
29+ IExecutionContext executionContext ,
30+ CancellationToken cancellationToken )
31+ {
32+ EventDescription eventDescription = CreateEvent ( executionContext ) ;
2633
2734 IEventStream eventStream = await SubscribeAsync (
28- executionContext . Services , @event ) ;
35+ executionContext . Services , eventDescription ) ;
2936
3037 return new SubscriptionResult (
3138 eventStream ,
@@ -36,7 +43,8 @@ public override async Task<IExecutionResult> ExecuteAsync(
3643 ExecuteSubscriptionQueryAsync ) ;
3744 }
3845
39- private EventDescription CreateEvent ( IExecutionContext executionContext )
46+ private EventDescription CreateEvent (
47+ IExecutionContext executionContext )
4048 {
4149 IReadOnlyCollection < FieldSelection > selections = executionContext
4250 . CollectFields (
0 commit comments