Skip to content

Commit 7fc20e1

Browse files
authored
fix(query): make sure to not generate query and mutation (#2038)
1 parent dba9634 commit 7fc20e1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/query/src/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1131,7 +1131,8 @@ const generateQueryHook = async (
11311131

11321132
// For non-GET operations, only register query OR mutation hooks, not both
11331133
let isMutation =
1134-
operationQueryOptions?.useMutation || override.query.useMutation;
1134+
verb !== Verbs.GET &&
1135+
(operationQueryOptions?.useMutation || override.query.useMutation);
11351136

11361137
// If both query and mutation are true for a non-GET operation, prioritize query
11371138
if (verb !== Verbs.GET && isQuery) {

0 commit comments

Comments
 (0)