Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
move-transformer 2
  • Loading branch information
juliusmarminge authored Feb 15, 2024
commit 4851a616c6c17d1eec9dcb685fe28c266a5085ec
13 changes: 6 additions & 7 deletions cli/template/extras/src/utils/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,6 @@ const getBaseUrl = () => {
export const api = createTRPCNext<AppRouter>({
config() {
return {
/**
* Transformer used for data de-serialization from the server.
*
* @see https://trpc.io/docs/data-transformers
*/
transformer: superjson,

/**
* Links used to determine request flow from client to server.
*
Expand All @@ -40,6 +33,12 @@ export const api = createTRPCNext<AppRouter>({
(opts.direction === "down" && opts.result instanceof Error),
}),
httpBatchLink({
/**
* Transformer used for data de-serialization from the server.
*
* @see https://trpc.io/docs/data-transformers
*/
transformer: superjson,
url: `${getBaseUrl()}/api/trpc`,
}),
],
Expand Down