Skip to content
Merged
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docs/source/migrating/apollo-client-4-migration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -997,6 +997,9 @@

A query is in standby if it is skipped with the `skip` option or `skipToken` in a React hook, or if the `fetchPolicy` is set to `standby`.

Although both `skip` and `skipToken` put a query in standby, `client.refetchQueries({ include: [QUERY] })` handles them differently before the first execution. Queries you create with `skip: true` can still be refetched because Apollo Client already has their options, including any variables that might be needed for refetching.

Check notice on line 1000 in docs/source/migrating/apollo-client-4-migration.mdx

View check run for this annotation

Apollo Librarian / AI Style Review

docs/source/migrating/apollo-client-4-migration.mdx#L1000

**Framing**: Use 'your' instead of 'their' to maintain a reader-centric focus on the user's configuration. **Verb Tense and Voice**: Remove 'might be' to favor the present tense. **Voice**: The original text is unopinionated and descriptive. Use an authoritative voice to guide the user toward the preferred pattern. ```suggestion Although both `skip` and `skipToken` put a query in standby, `client.refetchQueries({ include: [QUERY] })` handles them differently before the first execution. Queries you create with `skip: true` can still be refetched because Apollo Client already has your options, including any variables that might be needed for refetching. ```
Queries you create with `skipToken` are excluded until after their first execution because Apollo Client doesn't know which variables to use yet. This behavior was introduced in Apollo Client v4.0.11.

Check notice on line 1001 in docs/source/migrating/apollo-client-4-migration.mdx

View check run for this annotation

Apollo Librarian / AI Style Review

docs/source/migrating/apollo-client-4-migration.mdx#L1001

**Verb Tense and Voice**: Use active voice to make the sentence more direct. ```suggestion Queries you create with `skipToken` are excluded until after their first execution because Apollo Client doesn't know which variables to use yet. Apollo Client v4.0.11 introduced this behavior. ```

</Note>

This change affects the queries returned by `client.getObservableQueries` or the queries fetched by `refetchQueries` when using the `"active"` or `"all"` keywords, as these no longer include `ObservableQuery` instances without subscribers.
Expand Down
Loading