Closed yograf closed 3 years ago
@yograf thank you for your contribution! can you check why the tests fail?
I got the same errors.
I solved this problem through custom apollo middleware
const adminMiddleware = new ApolloLink((operation, forward) => {
if (operation.operationName.includes('admin')) {
if (JSON.stringify(operation?.variables?.data?.id) === '{}') {
// eslint-disable-next-line no-param-reassign
delete operation.variables.data.id;
}
}
return forward(operation);
});
I got the same errors.
I solved this problem through custom apollo middleware
const adminMiddleware = new ApolloLink((operation, forward) => { if (operation.operationName.includes('admin')) { if (JSON.stringify(operation?.variables?.data?.id) === '{}') { // eslint-disable-next-line no-param-reassign delete operation.variables.data.id; } } return forward(operation); });
thanks for sharing your workaround. Not sure if @yograf could already look into the failing tests.
If they pass, we can merge this
When trying to update entity data variable is sent with {id: undefind} inside and prevent updating