Commit 125a7f37 authored by Phil Hughes's avatar Phil Hughes

Merge branch 'add-single-request-context-apollo-to-docs' into 'master'

Add isSingleRequest to docs

See merge request gitlab-org/gitlab!39729
parents b6b55f1d 60bd2039
......@@ -466,6 +466,28 @@ fetchNextPage() {
Please note we don't have to save `pageInfo` one more time; `fetchMore` triggers a query
`result` hook as well.
### Managing performance
The Apollo client will batch queries by default. This means that if you have 3 queries defined,
Apollo will group them into one request, send the single request off to the server and only
respond once all 3 queries have completed.
If you need to have queries sent as individual requests, additional context can be provided
to tell Apollo to do this.
```javascript
export default {
apollo: {
user: {
query: QUERY_IMPORT,
context: {
isSingleRequest: true,
}
}
},
};
```
### Testing
#### Mocking response as component data
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment