Skip to content

Commit 48878e1

Browse files
authored
chore: merge dev to main (1.0.4) (#16)
2 parents 9704e7f + 1049f2b commit 48878e1

File tree

4 files changed

+9
-23
lines changed

4 files changed

+9
-23
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "workspace",
33
"type": "module",
4-
"version": "1.0.3",
4+
"version": "1.0.4",
55
"private": "true",
66
"license": "MIT",
77
"scripts": {

packages/cache/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@visualbravo/zenstack-cache",
3-
"version": "1.0.3",
3+
"version": "1.0.4",
44
"keywords": [
55
"accelerate",
66
"cache",

packages/cache/src/plugin.ts

Lines changed: 6 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -58,26 +58,12 @@ export function defineCachePlugin(pluginOptions: CachePluginOptions) {
5858

5959
onQuery: async ({ args, model, operation, proceed, client }) => {
6060
if (args && 'cache' in args) {
61-
let json: string
62-
63-
if (client.$auth) {
64-
const userId = Object.keys(client.$auth)
65-
.filter(key => client.$schema.models[client.$schema.authType!]!.idFields.includes(key))
66-
.join('_')
67-
68-
json = stableHash({
69-
args,
70-
model,
71-
operation,
72-
userId,
73-
})
74-
} else {
75-
json = stableHash({
76-
args,
77-
model,
78-
operation,
79-
})
80-
}
61+
const json = stableHash({
62+
args,
63+
model,
64+
operation,
65+
auth: client.$auth,
66+
})
8167

8268
if (!json) {
8369
throw new Error(

packages/config/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@zenstack-cache/config",
33
"type": "module",
4-
"version": "1.0.3",
4+
"version": "1.0.4",
55
"private": true,
66
"exports": {
77
"./ts": "./ts.json"

0 commit comments

Comments
 (0)