Skip to content

Commit

Permalink
Removing and from the useQuery type
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandcote committed May 2, 2023
1 parent 42b7dd3 commit d00962d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
7 changes: 7 additions & 0 deletions .changeset/breezy-dolphins-exercise.md
@@ -0,0 +1,7 @@
---
'@shopify/react-graphql': patch
---

Fixing an issue with useQuery / Query types

`onCompleted` and `onError` callback are not supported by our custom implementation and should be exclude from the types
7 changes: 6 additions & 1 deletion packages/react-graphql/src/hooks/types.ts
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

0 comments on commit d00962d

Please sign in to comment.