12 lines
368 B
TypeScript
12 lines
368 B
TypeScript
import { defineGraphQLContext } from "@lewebsimple/nuxt-graphql/helpers";
|
|
import type { AuthLoginMutation } from "#graphql/typed-documents";
|
|
|
|
export default defineGraphQLContext(async (event) => {
|
|
const authToken = await getAuthToken(event);
|
|
|
|
return {
|
|
authToken,
|
|
handleLogin: async (loginData: AuthLoginMutation) => handleLogin(event, loginData),
|
|
};
|
|
});
|