cdodev
Explore posts from serversTTCTheo's Typesafe Cult
•Created by cdodev on 5/10/2023 in #questions
I need a bit of help understanding trpc
I've got everything set up as per the next-auth starter.
I've got a query that gets me an index of things with ids, and then I need to loop over those things and use each id and call another query per item. Finally I want to make a state of { thingWithId, ListofThings }
I can't find a way to do this:
useQueries doesn't work because the number of hooks can change.
I can't figure out how to do query api.mything inside useEffect because my client only seems to have the useQuery hook which can't be used inside useEffect.
What do I have to do here? Do I need two clients? Is there an option I've missed to give me api.query?
Halp 🙂
8 replies
TTCTheo's Typesafe Cult
•Created by cdodev on 4/9/2023 in #questions
Github actions and .env
Hey all,
Loving the T3 stack so far. I was wondering if anyone is deploying to fly?
The default fly deploy locally copies in my .env file to all the env vars I need are there.
On github actions obviously I haven't committed .env.
So I have a couple of questions:
How do people use github actions secrets? At the moment I've worked round the need for build time access to
.env
with env > .env && ...
but I'm not sure about this approach long term
How do you handle different env at build time vs run time? I think vercel does this all for you(?) but fly seems a bit different.3 replies