peternovak
peternovak
TtRPC
Created by peternovak on 9/12/2023 in #❓-help
Call multiple TRPC endpoints from onSuccess()?
The polygon that I am sending from my frontend is about 300kb, so if I batch these endpoints together I am hitting the cap of 1MB max limit of TRPC (and I didn't manage to figure out how to increase it)
11 replies
TtRPC
Created by peternovak on 9/12/2023 in #❓-help
Call multiple TRPC endpoints from onSuccess()?
How would that kind of structure look like @sachinraja ? Keen to give it a try!
11 replies
TtRPC
Created by peternovak on 9/12/2023 in #❓-help
Call multiple TRPC endpoints from onSuccess()?
Thanks @alexkatt , this httpBatchLink was exactly the documentation I was looking for!!
11 replies
TtRPC
Created by peternovak on 5/11/2023 in #❓-help
Usage of useQuery after pageload?
I removed the return statement and everything just worked
17 replies
TtRPC
Created by peternovak on 5/11/2023 in #❓-help
Usage of useQuery after pageload?
Thanks a lot guys! 🙏
17 replies
TtRPC
Created by peternovak on 5/11/2023 in #❓-help
Usage of useQuery after pageload?
Wow, that was it!
17 replies
TtRPC
Created by peternovak on 5/11/2023 in #❓-help
Usage of useQuery after pageload?
Could it be that TRPC does not pick up the disabled setting like in this post? https://stackoverflow.com/questions/73940139/trpc-doesnt-react-to-config-variables-passed-e-g-enabled-false
17 replies
TtRPC
Created by peternovak on 5/11/2023 in #❓-help
Usage of useQuery after pageload?
17 replies
TtRPC
Created by peternovak on 5/11/2023 in #❓-help
Usage of useQuery after pageload?
import type { NextPage } from "next"; import Image from "next/image"; import { useSession } from "next-auth/react"; import { useRouter } from "next/router"; import { api } from "@/utils/api"; import { LoadingSpinner } from "@/components/loading"; const EvaluationPage: NextPage = () => { const { data: session } = useSession(); const router = useRouter(); const { id } = router.query; if (!id || Array.isArray(id)) return <LoadingSpinner />; const { data } = api.image.getEvaluation.useQuery( { id, }, { enabled: false, } ); return ( <> <main className="flex min-h-screen flex-col items-center justify-center bg-gradient-to-br from-blue-400 to-indigo-800"> {session ? ( <div className="container flex flex-col items-center justify-center gap-12 px-4 py-12 "> <h1 className="font-base text-3xl tracking-tight text-gray-100 sm:text-3xl"> Image evaluation </h1> <>{data && <p className="text-white">{data.response}</p>}</> </div> ) : ( <div className="flex flex-col items-center justify-center gap-4 py-4"> <h3 className="text-center text-2xl text-gray-100"> Please sign in to continue. </h3> </div> )} </main> </> ); };
17 replies
TtRPC
Created by peternovak on 5/11/2023 in #❓-help
Usage of useQuery after pageload?
17 replies
TtRPC
Created by peternovak on 5/11/2023 in #❓-help
Usage of useQuery after pageload?
Thanks, let me have a look!
17 replies
TtRPC
Created by peternovak on 5/11/2023 in #❓-help
Usage of useQuery after pageload?
Thanks, yeah I was trying to figure out whether there was some convenient trpc workaround. All I want is to pass in the [id] from the slug of the page to my trpc query.
17 replies