Minimal example of using tRPC with Solid Start using the fetch adapter & Solid Query
import { type APIEvent } from "solid-start";
import {
fetchRequestHandler,
type FetchCreateContextFnOptions,
} from "@trpc/server/adapters/fetch";
const handler = (event: APIEvent) =>
fetchRequestHandler({
endpoint: "/api/trpc",
req: event.request,
router: appRouter,
createContext,
});
export { handler as GET, handler as POST };