@coderich/autograph 0.13.17 → 0.13.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@coderich/autograph",
3
3
  "main": "index.js",
4
- "version": "0.13.17",
4
+ "version": "0.13.18",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -201,7 +201,7 @@ module.exports = class Resolver {
201
201
  const currSession = this.#sessions.slice(-1).pop();
202
202
 
203
203
  if (oquery.isMutation) {
204
- thunk = () => model.source.client.resolve(tquery.toDriver().toObject()).then((results) => {
204
+ thunk = () => model.source.client.resolve(tquery.toDriver().toObject()).then((results = oquery.doc) => {
205
205
  // We clear the cache immediately (regardless if we're in transaction or not)
206
206
  this.clear(model);
207
207
 
@@ -82,7 +82,7 @@ module.exports = class QueryResolver extends QueryBuilder {
82
82
  case 'deleteOne': {
83
83
  return this.#get(query).then((doc) => {
84
84
  return this.#resolveReferentialIntegrity(query).then(() => {
85
- return this.#resolver.resolve(query).then(() => doc);
85
+ return this.#resolver.resolve(query.clone({ doc })).then(() => doc);
86
86
  });
87
87
  });
88
88
  }