I set cookie session but res.clearCookie() is not clearing it.
@Mutation(() => Boolean)
logout(@Ctx() { req, res }: MyContext) {
return new Promise((resolve) =>
req.session.destroy((err) => {
res.clearCookie('graphql');
if (err) {
console.log(err.message);
resolve(false);
return;
}
resolve(true);
})
);
}
}
mutation is resolving true but "graphql" cookie is still on the browser. I lookup the for the similar issues and i added this
res.clearCookie('graphql', { path: "/", domain: "localhost" });
