File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -284,6 +284,22 @@ export class StoreReader {
284284
285285 let { result, dataState } = execResult ;
286286
287+ let missing : MissingFieldError | undefined ;
288+ if (
289+ execResult . missing &&
290+ // We don't need to report missing fields inside defer boundaries since
291+ // the "streaming" dataState tells us that the only missing fields in
292+ // the object is inside a defer boundary.
293+ ( ! handleIncremental || dataState !== "streaming" )
294+ ) {
295+ missing = new MissingFieldError (
296+ firstMissing ( execResult . missing ) ! ,
297+ execResult . missing ,
298+ query ,
299+ variables
300+ ) ;
301+ }
302+
287303 // If we get all root @defer boundaries with an empty result, report it as
288304 // empty instead of streaming.
289305 if ( dataState === "streaming" && Object . keys ( result ) . length === 0 ) {
@@ -301,22 +317,6 @@ export class StoreReader {
301317 dataState = "empty" ;
302318 }
303319
304- let missing : MissingFieldError | undefined ;
305- if (
306- execResult . missing &&
307- // We don't need to report missing fields inside defer boundaries since
308- // the "streaming" dataState tells us that the only missing fields in
309- // the object is inside a defer boundary.
310- ( ! handleIncremental || execResult . dataState !== "streaming" )
311- ) {
312- missing = new MissingFieldError (
313- firstMissing ( execResult . missing ) ! ,
314- execResult . missing ,
315- query ,
316- variables
317- ) ;
318- }
319-
320320 const complete = dataState === "complete" ;
321321
322322 result =
You can’t perform that action at this time.
0 commit comments