Skip to content

Commit ddf2c0a

Browse files
committed
fix: cache the entire auth object
1 parent 7f84d4a commit ddf2c0a

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

packages/cache/src/plugin.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,15 +61,11 @@ export function defineCachePlugin(pluginOptions: CachePluginOptions) {
6161
let json: string
6262

6363
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-
6864
json = stableHash({
6965
args,
7066
model,
7167
operation,
72-
userId,
68+
auth: client.$auth,
7369
})
7470
} else {
7571
json = stableHash({

0 commit comments

Comments
 (0)