vio
07/29/2021, 12:32 PMjeggy
07/29/2021, 12:46 PMvio
07/29/2021, 1:14 PMuser
,
Is there a way to remove the user details from context with a logout mutation?
context { +user }
schema {
mutation("logout") {
resolver { ctx: Context ->
val user = ctx.get<User>()
// I'm looking for something like bellow
ctx.clear()
}
}
}
jeggy
07/29/2021, 1:53 PMcontext { +user }
. As that code is being run upon every request. So if you want to clear the session, it's something that needs happen outside of KGraphQLschema.execute()
?vio
07/30/2021, 8:08 AMschema.execute
at the start of the application, my confusion was around understanding that the context is build at each request but makes sense now 🙂 I've tried clearing the session outside of kgraphql
and that was just what I needed, thanks 🚀