code: function onDelete(results) {
              const response = results ? results[0] : {};
              response.key = key;
  
              /**
               * If we passed a DataLoader instance, we clear its cache
               */
              if (options.dataloader) {
                  options.dataloader.clear(key);
              }
  
              if (typeof response.indexUpdates !== 'undefined') {
                  response.success = response.indexUpdates > 0;
              }
  
              /**
               * Make sure to delete the cache for this key
               */
              if (_this.__hasCache(options)) {
                  return _this.clearCache(key, options.clearQueries)
                      .then(() => response)
                      .catch((err) => {
                          let msg = 'Error while clearing the cache after deleting the entity.';
                          msg += 'The entity has been deleted successfully though. ';
                          msg += 'The cache error has been attached.';
                          const cacheError = new Error(msg);
                          cacheError.__response = response;
                          cacheError.__cacheError = err;
                          throw cacheError;
                      });
              }
  
              return response;
          }
docs: -------------------------------------------------------