Skip to content

Commit dcb7b66

Browse files
BenjaBobsjoemcbride
BenjaBobs
authored andcommitted
Fixed issue in execution node for subscriptions (graphql-dotnet#815)
Not having the parent becomes an issue further down the chain, causing a NullRefException in InstrumentFieldsMiddleware.Resolve(), resulting in a null-object been sent to the subscribing client. This fixes that.
1 parent 173efd7 commit dcb7b66

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/GraphQL/Execution/SubscriptionExecutionStrategy.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ protected virtual async Task<IObservable<ExecutionResult>> ResolveEventStreamAsy
101101
}
102102

103103
return subscription
104-
.Select(value => new ObjectExecutionNode(null, node.GraphType, node.Field, node.FieldDefinition, node.Path)
104+
.Select(value => new ObjectExecutionNode(node.Parent, node.GraphType, node.Field, node.FieldDefinition, node.Path)
105105
{
106106
Source = value
107107
})

0 commit comments

Comments
 (0)