add superjson to playground

This commit is contained in:
Robert Soriano
2022-10-29 22:33:59 -07:00
parent b61dbd1786
commit 97dfefe6cd
4 changed files with 29 additions and 1 deletions

View File

@@ -1,9 +1,12 @@
import { httpBatchLink, loggerLink } from '@trpc/client'
import { createTRPCNuxtProxyClient } from 'trpc-nuxt/client'
import superjson from 'superjson'
import type { AppRouter } from '~~/server/trpc/routers'
export default defineNuxtPlugin(() => {
const client = createTRPCNuxtProxyClient<AppRouter>({
transformer: superjson,
links: [
// adds pretty logs to your console in development and logs errors in production
loggerLink({