sad-indigoS
Refine2y ago
22 replies
sad-indigo

OnSucess not called

Here onSuccess if not called the successNotification is.

mutate(
{
resource: api/push/${collection},
dataProviderName: "api",
meta: { method: "post" },
values: bodyArray,
successNotification: (data, values, resource) => {
return {
message: updated ${String(selected)} from ${collection},
description: "Success with no errors",
type: "success",
};
},
},
{
onSuccess: (data, variables, context) => {
console.log("onSuccess", data, variables, context);
queryClient.invalidateQueries({ queryKey: [collection] });
},
}
);
Was this page helpful?