Nick
Nick
TtRPC
Created by Nick on 6/23/2023 in #❓-help
tRPC 10 Mutations Firing Twice in Deployed Releases Only
We have a newly-upgraded tRPC 10 / ReactQuery 4 app and on two pages on which we have a lot of mutations, the mutations are firing twice on click. This is not happening on other pages of our app. This is not a case of double-click, we are already disabling the buttons on mutation commencement This does not happen in local development; this only happens on Vercel preview deployments / prod deployments.
3 replies
TtRPC
Created by Nick on 6/7/2023 in #❓-help
trpc.legacyRouterName.procedure "does not exist" on type CreateTRPCNextBase, runs anyway
15 replies
TtRPC
Created by Nick on 6/6/2023 in #❓-help
Not getting legacy router ops in merged tRPC 9 router
5 replies
TtRPC
Created by Nick on 6/6/2023 in #❓-help
createTRPCNext Type Error + useQuery Not Defined
3 replies
TtRPC
Created by Nick on 6/5/2023 in #❓-help
TRPCContextState not found in v10
In our v9 app, we used TRPCContextState from internals to type out TRPC utils, importing it like import { TRPCContextState } from '@trpc/react-query/dist/declarations/src/internals/context'; and using it in types like trpcUtils: TRPCContextState<AppRouter, any>; Is there a quick alternative to this? Can't find it in the the latest trpc10 code packages.
13 replies
TtRPC
Created by Nick on 6/2/2023 in #❓-help
Massive Type Errors on tRPC 10 Legacy Router against MergeRouter
1 replies
TtRPC
Created by Nick on 4/3/2023 in #❓-help
Mutations and Queries in React Contexts causing unexpected behaviors
In my organization, we recently moved to put all of our mutations/queries into React Contexts and out of components (NextJS with React 18). I am now seeing requests and debouncing behaviors that used to work no longer work.
In some cases it appears we now have race conditions as loading/success are not necessarily being handled, but in other cases we're not getting reactivity from mutations that are in contexts Anyone else have experience or tips re: throwing tRPC stuff into React Contexts?
13 replies
TtRPC
Created by Nick on 2/10/2023 in #❓-help
Fetch errors on stale pages
Recently I have been getting a lot of fetch errors on stale pages, in particular ones that have queries running in React Contexts. I am on trpc 9. This happens when I am on a page that has at least 1 tRPC query, then I leave that tab or I minimize the window, then I return to it. I get either a full-on internal server error document from Node or an econn refused error in these cases, NOT a trpc error.
1 replies
TtRPC
Created by Nick on 1/17/2023 in #❓-help
Not sure how to troubleshoot `Failed to fetch at Function.from`
Am getting this on a trpc mutation in v.9 that is firing successfully then pushing me to the URL with the input params? Can add more details shortly. In Next + React
1 replies
TtRPC
Created by Nick on 12/19/2022 in #❓-help
Change status of useMutation from 'success' back to 'idle'
Hiya, I have a mutation for creating stuff that can run a few different ways on a page, and I want to change its 'success' status back to 'idle' after 5 seconds. Is there a programmatic way to change a mutation's status from 'success' back to 'idle'?
3 replies
TtRPC
Created by Nick on 12/13/2022 in #❓-help
Handling Query Errors at Root of App (v9)
I want to show an error toast on my NextJS frontend every time there is an error from useQuery in a functional component. Is there a way to add something at the root of my app that can watch for trpc errors or do I have to handle it at every use of useQuery? (note: i am on v9)
3 replies