You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: website/docs/tutorials/defer-stream.md
+6-1Lines changed: 6 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ title: Enabling Defer & Stream
3
3
sidebar_label: Enabling Defer & Stream
4
4
---
5
5
6
-
The `@defer` and `@stream` directives are not enabled by default. In order to use these directives, you must add them to your GraphQL Schema.
6
+
The `@defer` and `@stream` directives are not enabled by default. In order to use these directives, you must add them to your GraphQL Schema and use the `experimentalExecuteIncrementally` function instead of `execute`.
7
7
8
8
```js
9
9
import {
@@ -21,6 +21,11 @@ const schema = new GraphQLSchema({
21
21
GraphQLStreamDirective,
22
22
],
23
23
});
24
+
25
+
constresult=experimentalExecuteIncrementally({
26
+
schema,
27
+
document,
28
+
});
24
29
```
25
30
26
31
If the `directives` option is passed to `GraphQLSchema`, the default directives will not be included. `specifiedDirectives` must be passed to ensure all standard directives are added in addition to `defer` & `stream`.
0 commit comments