You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to make a form submission with Refine, and for some reason anytime I try to receive the data from the mutation, it returns it as undefined but says the mutation was successful. Here's what my backend returns for instance:
{
"id": 37,
"title": "schedule",
"semesterId": "Spring 2025",
"entries": []
}
Steps To Reproduce
const {formProps, modalProps, close, mutationResult} = useModalForm({
action: "create",
defaultVisible: true,
meta: {
select: "*",
gqlMutation: CREATE_CLASS_SCHEDULE_MUTATION,
},
onMutationSuccess: (response) => {
console.log('Full response:', response);
const createdSchedule = response?.data?.createClassSchedule;
if (createdSchedule) {
console.log('Created schedule:', createdSchedule);
onFinish(createdSchedule as ClassSchedule);
close();
onClose();
} else {
console.error('Created schedule data is missing from the response');
}
},
onMutationError: () => {
throw new Error("Failed to create schedule");
},
}
);
Expected behavior
The data should've returned in that aforementioned style, but yet it keeps returning data undefined and context undefined
Describe the bug
I am trying to make a form submission with Refine, and for some reason anytime I try to receive the data from the mutation, it returns it as undefined but says the mutation was successful. Here's what my backend returns for instance:
{
"id": 37,
"title": "schedule",
"semesterId": "Spring 2025",
"entries": []
}
Steps To Reproduce
Expected behavior
The data should've returned in that aforementioned style, but yet it keeps returning data undefined and context undefined
Packages
Additional Context
No response
The text was updated successfully, but these errors were encountered: