diff --git a/package.json b/package.json index c4fb4f7..357be23 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "workspace", "type": "module", - "version": "1.0.3", + "version": "1.0.4", "private": "true", "license": "MIT", "scripts": { diff --git a/packages/cache/package.json b/packages/cache/package.json index 819491f..eb24714 100644 --- a/packages/cache/package.json +++ b/packages/cache/package.json @@ -1,6 +1,6 @@ { "name": "@visualbravo/zenstack-cache", - "version": "1.0.3", + "version": "1.0.4", "keywords": [ "accelerate", "cache", diff --git a/packages/cache/src/plugin.ts b/packages/cache/src/plugin.ts index 79ef3a6..163fd0e 100644 --- a/packages/cache/src/plugin.ts +++ b/packages/cache/src/plugin.ts @@ -58,26 +58,12 @@ export function defineCachePlugin(pluginOptions: CachePluginOptions) { onQuery: async ({ args, model, operation, proceed, client }) => { if (args && 'cache' in args) { - let json: string - - if (client.$auth) { - const userId = Object.keys(client.$auth) - .filter(key => client.$schema.models[client.$schema.authType!]!.idFields.includes(key)) - .join('_') - - json = stableHash({ - args, - model, - operation, - userId, - }) - } else { - json = stableHash({ - args, - model, - operation, - }) - } + const json = stableHash({ + args, + model, + operation, + auth: client.$auth, + }) if (!json) { throw new Error( diff --git a/packages/config/package.json b/packages/config/package.json index 23a6ce7..f10990d 100644 --- a/packages/config/package.json +++ b/packages/config/package.json @@ -1,7 +1,7 @@ { "name": "@zenstack-cache/config", "type": "module", - "version": "1.0.3", + "version": "1.0.4", "private": true, "exports": { "./ts": "./ts.json"