Closed Nosherwan closed 1 year ago
I would like to be able to send cookies from resolvers, example as below:
const _baseCookie = (expires: Date) => ({ sameSite: 'strict', expires, overwrite: true, domain, }); export const resolvers = { Query: { logout: async (_: any, _resp: any, { res }: any) => { const expires = new Date('1970'); const baseCookie = _baseCookie(expires); res.cookie('auth', '', { ...baseCookie, signed: true }); res.cookie('info', '', { ...baseCookie, httpOnly: false }); },
Please take a look at #91 and let me know your feedback on this new functionality. It will allow you to update the result based on the contextValue.
contextValue
I would like to be able to send cookies from resolvers, example as below: