Files
trpc-nuxt/playground/server/trpc/context.ts
Robert Soriano 29909328c4 update playground
2022-10-29 21:58:00 -07:00

18 lines
438 B
TypeScript

/* eslint-disable @typescript-eslint/no-unused-vars */
import type { inferAsyncReturnType } from '@trpc/server'
import type { H3Event } from 'h3'
export type Context = inferAsyncReturnType<typeof createContext>
/**
* Creates context for an incoming request
* @link https://trpc.io/docs/context
*/
export async function createContext(
opts: H3Event,
) {
// for API-response caching see https://trpc.io/docs/caching
return {}
}