Skip to content

Commit a358757

Browse files
authored
update incremental docs (#3731)
1 parent b9a2695 commit a358757

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

website/docs/tutorials/defer-stream.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Enabling Defer & Stream
33
sidebar_label: Enabling Defer & Stream
44
---
55

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`.
77

88
```js
99
import {
@@ -21,6 +21,11 @@ const schema = new GraphQLSchema({
2121
GraphQLStreamDirective,
2222
],
2323
});
24+
25+
const result = experimentalExecuteIncrementally({
26+
schema,
27+
document,
28+
});
2429
```
2530

2631
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

Comments
 (0)