day len server theo loi Khoi noi, toi xin tuyen bo mien tru trach nhiem
This commit is contained in:
@@ -43,7 +43,7 @@ export type SchemaContext =
|
||||
http: {
|
||||
req: Request
|
||||
res: Response
|
||||
me: User
|
||||
me: User | null
|
||||
pubSub: PubSub
|
||||
invalidateCache: () => Promise<void>
|
||||
generator: PrismaCrudGenerator<BuilderTypes>
|
||||
|
||||
@@ -30,6 +30,10 @@ export class GraphqlService {
|
||||
if (disableAuth) {
|
||||
return null
|
||||
}
|
||||
// check if the sessionId is valid
|
||||
if (!sessionId) {
|
||||
return null
|
||||
}
|
||||
// redis context cache
|
||||
const cachedUser = await this.redis.getUser(sessionId)
|
||||
if (cachedUser) {
|
||||
|
||||
Reference in New Issue
Block a user