Skip to content

Commit 31b6fe9

Browse files
committed
Bugfix
1 parent 89281b5 commit 31b6fe9

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

dist/vuex-orm-apollo.esm.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8437,7 +8437,10 @@ var VuexORMApollo = /** @class */ (function () {
84378437
return [4 /*yield*/, this.apolloRequest(model, query, variables, true)];
84388438
case 1:
84398439
newData = _a.sent();
8440-
return [2 /*return*/, this.insertData(newData, dispatch)];
8440+
if (name !== "delete" + upcaseFirstLetter(model.singularName)) {
8441+
return [2 /*return*/, this.insertData(newData, dispatch)];
8442+
}
8443+
return [2 /*return*/, true];
84418444
case 2: return [2 /*return*/];
84428445
}
84438446
});

src/vuex-orm-apollo.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,11 @@ export default class VuexORMApollo {
213213
// Send GraphQL Mutation
214214
const newData = await this.apolloRequest(model, query, variables, true);
215215

216-
return this.insertData(newData, dispatch);
216+
if (name !== `delete${upcaseFirstLetter(model.singularName)}`) {
217+
return this.insertData(newData, dispatch);
218+
}
219+
220+
return true;
217221
}
218222
}
219223

0 commit comments

Comments
 (0)