Skip to content
This repository has been archived by the owner on Oct 1, 2024. It is now read-only.

Removing onCompleted and onError from the useQuery types #2645

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all 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
5 changes: 5 additions & 0 deletions .changeset/breezy-dolphins-exercise.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@shopify/react-graphql': patch
---

Remove `onCompleted` and `onError` from the types on `useQuery`'s options as they are not implemented
7 changes: 6 additions & 1 deletion packages/react-graphql/src/hooks/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,12 @@ import type {VariableOptions} from '../types';

export type QueryHookOptions<Data = any, Variables = OperationVariables> = Omit<
QueryComponentOptions<Data, Variables>,
'query' | 'partialRefetch' | 'children' | 'variables'
| 'query'
| 'partialRefetch'
| 'children'
| 'variables'
| 'onCompleted'
| 'onError'
> &
VariableOptions<Variables> & {
skip?: boolean;
Expand Down