Skip to content

Commit 16b3d01

Browse files
committed
Fix going to production
1 parent 72be121 commit 16b3d01

File tree

1 file changed

+0
-36
lines changed

1 file changed

+0
-36
lines changed

website/pages/going-to-production.mdx

-36
Original file line numberDiff line numberDiff line change
@@ -2,42 +2,6 @@
22
title: Going to Production
33
---
44

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-
const schema = new GraphQLSchema({
16-
query,
17-
directives: [
18-
...specifiedDirectives,
19-
GraphQLDeferDirective,
20-
GraphQLStreamDirective,
21-
],
22-
});
23-
24-
const result = 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-
415
GraphQL.JS contains a few development checks which in production will cause slower performance and
426
an increase in bundle-size. Every bundler goes about these changes different, in here we'll list
437
out the most popular ones.

0 commit comments

Comments
 (0)