MCPcopy Create free account
hub / github.com/OpenPipe/OpenPipe / createTRPCContext

Function createTRPCContext

app/src/server/api/trpc.ts:61–71  ·  view source on GitHub ↗
(opts: CreateNextContextOptions)

Source from the content-addressed store, hash-verified

59 * @see https://trpc.io/docs/context
60 */
61export const createTRPCContext = async (opts: CreateNextContextOptions) => {
62 const { req, res } = opts;
63
64 // Get the session from the server using the getServerSession wrapper function
65 const session = await getServerAuthSession({ req, res });
66
67 return createInnerTRPCContext({
68 session,
69 cookies: req.cookies,
70 });
71};
72
73/**
74 * 2. INITIALIZATION

Callers

nothing calls this directly

Calls 2

getServerAuthSessionFunction · 0.90
createInnerTRPCContextFunction · 0.70

Tested by

no test coverage detected