Skip to content

Commit

Permalink
Update notes about experimental features
Browse files Browse the repository at this point in the history
  • Loading branch information
jerelmiller committed Jan 26, 2024
1 parent aa7c5d9 commit 4a4b1ba
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion docs/source/data/suspense.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ Starting with Apollo Client `3.9.0`, it is possible to start loading queries out

<ExperimentalFeature>

This API is experimental in `3.9.0` and may change in `3.10.0`. We are specifically looking for user feedback on the API design choices. The underlying behavior is otherwise fully implemented. If you'd like to provide feedback for this feature before it is stabilized in `3.10.0`, please visit [#11519](https://github.com/apollographql/apollo-client/issues/11519) and add a comment.
This feature is in [alpha stage](https://www.apollographql.com/docs/resources/product-launch-stages/#alpha--beta) for version `3.9.0` and may be subject to change before `3.10.0`. We consider this feature production-ready, but may be subject to change depending on feedback. If you'd like to provide feedback for this feature before it is stabilized in `3.10.0`, please visit [#11519](https://github.com/apollographql/apollo-client/issues/11519) and add a comment.

</ExperimentalFeature>

Expand Down Expand Up @@ -628,6 +628,12 @@ export function RouteComponent() {

This instructs React Router to wait for the query to finish loading before the route transitions. When the route transitions after the promise resolves, the data is rendered immediately without the need to show a loading fallback in the route component.

<ExperimentalFeature>

`queryRef.toPromise` is [experimental](https://www.apollographql.com/docs/resources/product-launch-stages/#experimental-features) for version `3.9.0` and may be subject to breaking changes before `3.10.0`. If you'd like to provide feedback for this feature before it is stabilized in `3.10.0`, please visit [#11519](https://github.com/apollographql/apollo-client/issues/11519) and add a comment.

</ExperimentalFeature>

#### Why prevent access to `data` in `toPromise`?

You may be wondering why we resolve `toPromise` with the `queryRef` itself, rather than the data loaded from the query. We want to encourage you to leverage `useReadQuery` to avoid missing out on cache updates for your query. If `data` were available, it would be tempting to consume it in your `loader` functions and expose it to your route components. Doing so means missing out on cache updates.
Expand Down

0 comments on commit 4a4b1ba

Please sign in to comment.