Skip to content

Commit

Permalink
chore(docs): Add link to perf implications siteContext (#30778)
Browse files Browse the repository at this point in the history
  • Loading branch information
LekoArts committed Apr 9, 2021
1 parent 4336d04 commit 172cf4d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/docs/scaling-issues.md
Expand Up @@ -59,7 +59,7 @@ Note: the application of these techniques should be considered analogous to appl

### Switch off type inference for `SitePage.context`

When using the `createPages` API to pass large amounts of data to pages via `context` (which is generally not recommended), Gatsby's type inference can become slow. In most cases, it is not actually necessary to include the `SitePage.context` field in the GraphQL schema, so switching off type inference for the `SitePage` type should be safe:
When using the `createPages` API to pass large amounts of data to pages via `context` (which is generally [not recommended](/docs/creating-and-modifying-pages#performance-implications)), Gatsby's type inference can become slow. In most cases, it is not actually necessary to include the `SitePage.context` field in the GraphQL schema, so switching off type inference for the `SitePage` type should be safe:

```js
// gatsby-node.js
Expand Down

0 comments on commit 172cf4d

Please sign in to comment.