prop
prop
Explore posts from servers
TtRPC
Created by prop on 7/19/2023 in #❓-help
cookies not being set in procedure
8 replies
TtRPC
Created by prop on 7/19/2023 in #❓-help
cookies not being set in procedure
This is how my createContext looks like
import type { RequestEvent } from '@sveltejs/kit';
import type { inferAsyncReturnType } from '@trpc/server';
import { prisma } from '$lib/prisma';

export async function createContext(event: RequestEvent) {
let cookies = event?.cookies
return {
cookies,
prisma
};
}

export type Context = inferAsyncReturnType<typeof createContext>;
import type { RequestEvent } from '@sveltejs/kit';
import type { inferAsyncReturnType } from '@trpc/server';
import { prisma } from '$lib/prisma';

export async function createContext(event: RequestEvent) {
let cookies = event?.cookies
return {
cookies,
prisma
};
}

export type Context = inferAsyncReturnType<typeof createContext>;
8 replies
TtRPC
Created by prop on 7/19/2023 in #❓-help
cookies not being set in procedure
@alex / KATT I don’t have access to opts, can this be because I’m using trpc/sveltekit?
8 replies
TtRPC
Created by prop on 7/19/2023 in #❓-help
cookies not being set in procedure
@alex / KATT yeah, how do I get access to that in the context?
8 replies