Skip to content

Commit

Permalink
fix(graphql): fix custom mutation params issue
Browse files Browse the repository at this point in the history
  • Loading branch information
shaun-ak committed Feb 14, 2025
1 parent 559c089 commit 374832a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .changeset/lucky-yaks-jog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
"@refinedev/graphql": patch
---

fix: issue with custom mutation #6665

We missed passing param values for custom mutation

[Fixes #6665](https://github.com/refinedev/refine/issues/6665)
1 change: 1 addition & 0 deletions packages/graphql/src/dataProvider/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,7 @@ export const defaultOptions = {
dataMapper: (response: OperationResult<any>, params: CustomParams) =>
response.data ?? response.error?.message,
buildVariables: (params: CustomParams) => ({
...(typeof params.payload === "object" ? params.payload : {}),
...params?.meta?.variables,
...params?.meta?.gqlVariables,
}),
Expand Down

0 comments on commit 374832a

Please sign in to comment.