Skip to content

Commit

Permalink
Merge pull request #243 from apollographql/pr/update-docs
Browse files Browse the repository at this point in the history
[chore] Update Docs
  • Loading branch information
phryneas authored Mar 22, 2024
2 parents c7db45b + 0efbdbe commit 896c946
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion docs/client-react-streaming.buildmanualdatatransport.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ BuildArgs

While this Data Transport enables streaming SSR, it has some conceptual drawbacks:

- It does not have a way of keeping your connection open if your application already finished, but there are still ongoing queries that might need to be awaited transported over. - This can happen if a component renders `useBackgroundQuery`<!-- -->, but does not read the `queryRef` with `useReadQuery` - These "cut off" queries will be restarted in the Browser once the browser's `load` event happens - If the `useInsertHtml` doesn't immediately flush data to the browser, the browser might already attain "newer" data through queries triggered by user interaction. - This delayed behaviour is the case with the Next.js `ServerInsertedHTMLContext` and in the example Vite implementation. - In this, case, older data from the server might overwrite newer data in the browser. - This is minimized by simulating ongoing queries in the browser once the information of a started query is transported over. If the browser would try to trigger the exact same query, query deduplication would make the browser wait for the server query to resolve instead. - For more timing-related details, see https://github.com/apollographql/apollo-client-nextjs/pull/9
- It does not have a way of keeping your connection open if your application already finished, but there are still ongoing queries that might need to be transported over. - This can happen if a component renders `useBackgroundQuery`<!-- -->, but does not read the `queryRef` with `useReadQuery` - These "cut off" queries will be restarted in the browser once the browser's `load` event happens - If the `useInsertHtml` doesn't immediately flush data to the browser, the browser might already attain "newer" data through queries triggered by user interaction. - This delayed behaviour is the case with the Next.js `ServerInsertedHTMLContext` and in the example Vite implementation. - In this, case, older data from the server might overwrite newer data in the browser. This is minimized by simulating ongoing queries in the browser once the information of a started query is transported over. If the browser would try to trigger the exact same query, query deduplication would make the browser wait for the server query to resolve instead. - For more timing-related details, see https://github.com/apollographql/apollo-client-nextjs/pull/9

To fully work around these drawbacks, React needs to add "data injection into the stream" to it's public API, which is not the case today. We provide an \[example with a patched React version\](https://github.com/apollographql/apollo-client-nextjs/blob/main/integration-test/experimental-react) to showcase how that could look.

Expand Down
4 changes: 2 additions & 2 deletions docs/client-react-streaming.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ Creates a "manual" Data Transport, to be used with `WrapApolloProvider`<!-- -->.

&gt; This export is only available in React Server Components

Ensures that during RSC for an ongoing request, you can always access the same instance of ApolloClient, while always returning a new instance of different requests.
Ensures that you can always access the same instance of ApolloClient during RSC for an ongoing request, while always returning a new instance for different requests.


</td></tr>
Expand All @@ -149,7 +149,7 @@ Ensures that during RSC for an ongoing request, you can always access the same i

</td><td>

Ensures that during RSC for an ongoing request, you can always access the same instance of ApolloClient, while always returning a new instance of different requests.
Ensures that you can always access the same instance of ApolloClient during RSC for an ongoing request, while always returning a new instance for different requests.


</td></tr>
Expand Down
2 changes: 1 addition & 1 deletion docs/client-react-streaming.registerapolloclient.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

&gt; This export is only available in React Server Components

Ensures that during RSC for an ongoing request, you can always access the same instance of ApolloClient, while always returning a new instance of different requests.
Ensures that you can always access the same instance of ApolloClient during RSC for an ongoing request, while always returning a new instance for different requests.

**Signature:**

Expand Down
2 changes: 1 addition & 1 deletion docs/client-react-streaming.registerapolloclient_1.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

## registerApolloClient() function

Ensures that during RSC for an ongoing request, you can always access the same instance of ApolloClient, while always returning a new instance of different requests.
Ensures that you can always access the same instance of ApolloClient during RSC for an ongoing request, while always returning a new instance for different requests.

**Signature:**

Expand Down
4 changes: 2 additions & 2 deletions docs/experimental-nextjs-app-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ Description

&gt; This export is only available in React Server Components

Ensures that during RSC for an ongoing request, you can always access the same instance of ApolloClient, while always returning a new instance of different requests.
Ensures that you can always access the same instance of ApolloClient during RSC for an ongoing request, while always returning a new instance for different requests.


</td></tr>
Expand All @@ -133,7 +133,7 @@ Ensures that during RSC for an ongoing request, you can always access the same i

</td><td>

Ensures that during RSC for an ongoing request, you can always access the same instance of ApolloClient, while always returning a new instance of different requests.
Ensures that you can always access the same instance of ApolloClient during RSC for an ongoing request, while always returning a new instance for different requests.


</td></tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

&gt; This export is only available in React Server Components

Ensures that during RSC for an ongoing request, you can always access the same instance of ApolloClient, while always returning a new instance of different requests.
Ensures that you can always access the same instance of ApolloClient during RSC for an ongoing request, while always returning a new instance for different requests.

**Signature:**

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

## registerApolloClient() function

Ensures that during RSC for an ongoing request, you can always access the same instance of ApolloClient, while always returning a new instance of different requests.
Ensures that you can always access the same instance of ApolloClient during RSC for an ongoing request, while always returning a new instance for different requests.

**Signature:**

Expand Down

0 comments on commit 896c946

Please sign in to comment.