Skip to content

Commit

Permalink
Add tsdoc to useQueryRefHandlers
Browse files Browse the repository at this point in the history
Co-authored-by: Lenz Weber-Tronic <[email protected]>
  • Loading branch information
jerelmiller and phryneas authored Dec 18, 2023
1 parent f5fb0e9 commit 1fa89fd
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/react/hooks/useQueryRefHandlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,20 @@ export interface UseQueryRefHandlersResult<
TData = unknown,
TVariables extends OperationVariables = OperationVariables,
> {
/** {@inheritDoc @apollo/client!ObservableQuery#refetch:member(1)} */
refetch: RefetchFunction<TData, TVariables>;
/** {@inheritDoc @apollo/client!ObservableQuery#fetchMore:member(1)} */
fetchMore: FetchMoreFunction<TData, TVariables>;
}

/**
* A React hook that returns a `refetch` and `fetchMore` function for a given
* `queryRef`.
* This allows you to control the lifecyle of a queryRef from a different component
* than the one that created it.
*
* @param queryRef a `QueryReference` returned from `useBackgroundQuery` or `createQueryPreloader`.
*/
export function useQueryRefHandlers<
TData = unknown,
TVariables extends OperationVariables = OperationVariables,
Expand Down

0 comments on commit 1fa89fd

Please sign in to comment.