Skip to content

Commit

Permalink
use batch link
Browse files Browse the repository at this point in the history
  • Loading branch information
arily committed Oct 27, 2023
1 parent af12276 commit 0bb334c
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/plugins/client.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
import { createTRPCNuxtClient, httpBatchLink, httpLink } from 'trpc-nuxt/client'
import { createTRPCNuxtClient, httpBatchLink } from 'trpc-nuxt/client'
import { transformer } from '~/server/trpc/transformer'
import type { AppRouter } from '~/server/trpc/routers'

export default defineNuxtPlugin(() => {
const client = createTRPCNuxtClient<AppRouter>({
transformer,
links: [
httpLink({
url: '/api/trpc',
}),
httpBatchLink({
url: '/api/trpc',
maxURLLength: 2083, // a suitable size
Expand Down

0 comments on commit 0bb334c

Please sign in to comment.