We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 21e89eb commit b8c1eddCopy full SHA for b8c1edd
1 file changed
src/core/QueryInfo.ts
@@ -18,6 +18,7 @@ import {
18
getOperationName,
19
graphQLResultHasError,
20
handleIncrementalSymbol,
21
+ hasDirectives,
22
streamInfoSymbol,
23
} from "@apollo/client/utilities/internal";
24
import { invariant } from "@apollo/client/utilities/invariant";
@@ -293,7 +294,9 @@ export class QueryInfo<
293
294
// to see if it fulfills the selection set. For such a narrow case where
295
// its incorrect on a format that is now outdated is not worth the
296
// fix so we are ok with reporting a `streaming` here.
- (!this.incremental?.pending && this.hasNext)
297
+ (!this.incremental?.pending &&
298
+ this.hasNext &&
299
+ hasDirectives(["defer"], query))
300
) {
301
result.dataState = "streaming";
302
}
0 commit comments