@@ -276,11 +276,11 @@ type IncrementalDelivery () =
276276 // A plain (non-indexed) path: a @defer field's own value.
277277 let state , isNew = stateFor fieldPath
278278 let incremental = { Id = state.Id; Data = Include data; Items = Skip; Errors = Skip }
279- let pending = [
280- yield ! pendingFor fieldPath state isNew
281- yield ! takeFieldPending fieldPath
282- yield ! takePendingVisibleIn fieldPath data
283- ]
279+ let fieldPending =
280+ match takeFieldPending fieldPath with
281+ | [] -> pendingFor fieldPath state isNew
282+ | pending -> pending
283+ let pending = [ yield ! fieldPending ; yield ! takePendingVisibleIn fieldPath data ]
284284 ValueSome ( SubscriptionExecutionResult.CreateSubsequent ( pending, [ incremental ], [], true ))
285285 | DeferredErrors ( data, errors, fieldPath) ->
286286 match fields.TryGetValue fieldPath with
@@ -295,11 +295,11 @@ type IncrementalDelivery () =
295295 // A @defer field's own failure.
296296 let state , isNew = stateFor fieldPath
297297 let incremental = { Id = state.Id; Data = Include data; Items = Skip; Errors = Include errors }
298- let pending = [
299- yield ! pendingFor fieldPath state isNew
300- yield ! takeFieldPending fieldPath
301- yield ! takePendingVisibleIn fieldPath data
302- ]
298+ let fieldPending =
299+ match takeFieldPending fieldPath with
300+ | [] -> pendingFor fieldPath state isNew
301+ | pending -> pending
302+ let pending = [ yield ! fieldPending ; yield ! takePendingVisibleIn fieldPath data ]
303303 ValueSome ( SubscriptionExecutionResult.CreateSubsequent ( pending, [ incremental ], [], true ))
304304 | DeferredCompleted fieldPath ->
305305 match fields.TryGetValue fieldPath with
0 commit comments