mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
Add caching rule to allow for upgrade
This commit is contained in:
parent
dfa41aa67f
commit
17ff9c4c0f
@ -4,7 +4,9 @@ import { rule, shield, deny, allow, or } from 'graphql-shield'
|
|||||||
* TODO: implement
|
* TODO: implement
|
||||||
* See: https://github.com/Human-Connection/Nitro-Backend/pull/40#pullrequestreview-180898363
|
* See: https://github.com/Human-Connection/Nitro-Backend/pull/40#pullrequestreview-180898363
|
||||||
*/
|
*/
|
||||||
const isAuthenticated = rule()(async (parent, args, ctx, info) => {
|
const isAuthenticated = rule({
|
||||||
|
cache: 'contextual',
|
||||||
|
})(async (_parent, _args, ctx, _info) => {
|
||||||
return ctx.user !== null
|
return ctx.user !== null
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user