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/pages/going-to-production.mdx
-36
Original file line number
Diff line number
Diff line change
@@ -2,42 +2,6 @@
2
2
title: Going to Production
3
3
---
4
4
5
-
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`.
6
-
7
-
```js
8
-
import {
9
-
GraphQLSchema,
10
-
GraphQLDeferDirective,
11
-
GraphQLStreamDirective,
12
-
specifiedDirectives,
13
-
} from'graphql';
14
-
15
-
constschema=newGraphQLSchema({
16
-
query,
17
-
directives: [
18
-
...specifiedDirectives,
19
-
GraphQLDeferDirective,
20
-
GraphQLStreamDirective,
21
-
],
22
-
});
23
-
24
-
constresult=experimentalExecuteIncrementally({
25
-
schema,
26
-
document,
27
-
});
28
-
```
29
-
30
-
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`.
31
-
126 changes: 126 additions & 0 deletions126
32
-
src/pages/graphql-js/going-to-production.mdx
33
-
Viewed
34
-
Original file line number Diff line number Diff line change
35
-
@@ -0,0 +1,126 @@
36
-
37
-
---
38
-
39
-
## title: Going to Production
40
-
41
5
GraphQL.JS contains a few development checks which in production will cause slower performance and
42
6
an increase in bundle-size. Every bundler goes about these changes different, in here we'll list
0 commit comments