antoine
TTCTheo's Typesafe Cult
•Created by antoine on 4/17/2024 in #questions
pnpm/turbo workspace issue
I have the following workspace setup:
I get a warning that the
api
folder itself doesn't have a package.json when running pnpm commands, so I added "!packages/api"
to that list, which fixed the issue (pnpm commands work fine for packages in the api
folder), but turbo-ignore
doesn't seem to find the packages in the api
folder with that addition when running the turbo build dry-run command. Anyone know how I can work around this?2 replies
TTCTheo's Typesafe Cult
•Created by antoine on 3/18/2024 in #questions
undefined `direction` for useInfiniteQuery
I got my input schema from https://trpc.io/docs/client/react/useInfiniteQuery, and
fetchNextPage
/ fetchPreviousPage
both show undefined for direction
when called, but I'm expecting "forward" or "backward" from https://tanstack.com/query/latest/docs/framework/react/guides/query-functions#queryfunctioncontext. I'm using tRPC v11 and react table v8 to implement pagination. I'm not sure if I'm misunderstanding something here, but for now I'll define direction with useState separately. Here's how I'm using infinite queries (the Button is in a different file):
3 replies
TTCTheo's Typesafe Cult
•Created by antoine on 9/6/2023 in #questions
setting state param in nextauth
Does anyone know how to set the
state
query key to oauth providers instead of having nextauth set it automatically? I'm using Auth0 so I need my custom state
value sent to the /authorize
endpoint and returned back to my callback3 replies
TTCTheo's Typesafe Cult
•Created by antoine on 8/8/2023 in #questions
extending trpc middleware
When making a procedure with middleware, is there any difference between using
.unstable_pipe()
to extend an existing middleware and then .use()
versus just .use()
on an existing procedure using the existing middleware?4 replies
TTCTheo's Typesafe Cult
•Created by antoine on 7/7/2023 in #questions
need help with keepPreviousData in trpc client / tanstack query
API call:
rendering
foundUsers
:
I update userToFind
through an input field (its debounced), and I'm trying to prevent Loading...
from flashing when foundUsers
is refetched. I tried keepPreviousData: true
, but it didn't fix this issue. I'm not really sure what the issue could be. I tried staleTime: Infinity
, but that just prevents a refetch. For now, I might keep the previous data in a separate state and render that while foundUsers
is being refetched. Can anyone help with this? Let me know if you need more details.10 replies