Skip to content

Commit

Permalink
No need for connectToDevTools: false anymore
Browse files Browse the repository at this point in the history
Because ApolloClient is created outside of NgZone
  • Loading branch information
PowerKiKi committed May 2, 2024
1 parent f0b2ac0 commit abc57ca
Showing 1 changed file with 0 additions and 27 deletions.
27 changes: 0 additions & 27 deletions website/src/pages/docs/performance/server-side-rendering.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -174,33 +174,6 @@ apollo.create({
});
```

## Using Apollo DevTools

The current Apollo client implementation supports a chrome dev tools plugin for troubleshooting
queries. When using Apollo with SSR in a development environment, the attempts to connect to the
plugin can cause the server to hang for about 10s.

To avoid this, you can set the `connectToDevTools` option to `false` as below:

```ts
// When providing options
{
provide: APOLLO_OPTIONS,
useFactory: () {
return {
connectToDevTools: false
// ...
};
},
},

// Or when creating the client
apollo.create({
connectToDevTools: false
// ...
})
```

## Best Practices

You saw how to use Server-Side Rendering and Store Rehydration in your application, but you will
Expand Down

0 comments on commit abc57ca

Please sign in to comment.