Skip to content

Commit

Permalink
adjust generic name and comment
Browse files Browse the repository at this point in the history
  • Loading branch information
phryneas committed May 3, 2024
1 parent 1e97538 commit b162c52
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions packages/client-react-streaming/src/registerApolloClient.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ const seenClients = WeakSet
* @public
*/
export function registerApolloClient<
AC extends Promise<ApolloClient<any>> | ApolloClient<any>,
ApolloClientOrPromise extends Promise<ApolloClient<any>> | ApolloClient<any>,
>(
makeClient: () => AC
makeClient: () => ApolloClientOrPromise
): {
getClient: () => AC;
query: Awaited<AC>["query"];
getClient: () => ApolloClientOrPromise;
query: Awaited<ApolloClientOrPromise>["query"];
/**
* Preloads data in React Server Components to be hydrated
* in Client Components.
Expand All @@ -49,9 +49,9 @@ export function registerApolloClient<
* `ClientChild` would call `useReadQuery` with the `queryRef`, the `Suspense` boundary is optional:
* ```js
* <PreloadQuery
* options={{
* query: QUERY,
* variables: { foo: 1 }
* query={QUERY}
* variables={{
* foo: 1
* }}
* >
* {(queryRef) => (
Expand All @@ -66,9 +66,9 @@ export function registerApolloClient<
* `ClientChild` would call the same query with `useSuspenseQuery`, the `Suspense` boundary is optional:
* ```js
* <PreloadQuery
* options={{
* query: QUERY,
* variables: { foo: 1 }
* query={QUERY}
* variables={{
* foo: 1
* }}
* >
* <Suspense fallback={<>loading</>}>
Expand Down

0 comments on commit b162c52

Please sign in to comment.