Kev
Kev
TTCTheo's Typesafe Cult
Created by Kev on 7/24/2023 in #questions
What is the unofficial name for this CSS effect?
Never mind, I eventually cobbled together my own solution without ever figuring out the name. sadge
7 replies
TTCTheo's Typesafe Cult
Created by rovrav on 7/2/2023 in #questions
Easy way to add rate limiter into t3 stack / trpc?
https://github.com/upstash/ratelimit has been recommended before
10 replies
TTCTheo's Typesafe Cult
Created by Slamerz on 5/26/2023 in #questions
"createContext only works in Client Components." When I'm not using context.
I would assume that Providers is almost certainly using a context internally
16 replies
TTCTheo's Typesafe Cult
Created by Entaro on 4/20/2023 in #questions
Unable to invoke prisma mutation to planetscale dev branch.
Did you happen to change your ENV file after you had started the application?
15 replies
TTCTheo's Typesafe Cult
Created by Entaro on 4/20/2023 in #questions
Unable to invoke prisma mutation to planetscale dev branch.
Yeah, I just mean if your push succeeded then the query failing is a bit weird
15 replies
TTCTheo's Typesafe Cult
Created by Entaro on 4/20/2023 in #questions
Unable to invoke prisma mutation to planetscale dev branch.
Yeah the ERROR HY000 (1105): unavailable: unable to connect to branch BRANCH_NAME_HERE is a little suspect so not sure
15 replies
TTCTheo's Typesafe Cult
Created by Entaro on 4/20/2023 in #questions
Unable to invoke prisma mutation to planetscale dev branch.
Not sure if that would solve your issue 100%, but that's how I typically use PlanetScale + Prisma and have never had issues with mutations
15 replies
TTCTheo's Typesafe Cult
Created by Entaro on 4/20/2023 in #questions
Unable to invoke prisma mutation to planetscale dev branch.
It's more or less the instructions here: https://planetscale.com/docs/prisma/automatic-prisma-migrations. You basically use the PlanetScale CLI to connect to your branch and change the DATABASE_URL to use the connection
15 replies
TTCTheo's Typesafe Cult
Created by Entaro on 4/20/2023 in #questions
Unable to invoke prisma mutation to planetscale dev branch.
Did you try to use the PlanetScale proxy for Prisma?
15 replies
TTCTheo's Typesafe Cult
Created by davekeehl on 4/17/2023 in #questions
Secrets management tools with T3 stack
If you deploy to vercel, you can use their env store for a given project.
9 replies
TTCTheo's Typesafe Cult
Created by maghfoor on 4/16/2023 in #questions
Should I look into using linked lists?
14 replies
TTCTheo's Typesafe Cult
Created by maghfoor on 4/16/2023 in #questions
Should I look into using linked lists?
I'd look around at a JS engine like V8. The backing data type for arrays actually becomes a hashmap at certain sizes which blows my mind.
14 replies
TTCTheo's Typesafe Cult
Created by DrMonro on 3/18/2023 in #questions
How to make <picture> with 'next/image'?
Generally, I think working with Next's image types is a PITA. From what I can tell, they don't really have a great solution for that <picture> like use case (someone feel free to correct me). See: https://github.com/vercel/next.js/discussions/26065 and https://github.com/vercel/next.js/discussions/25393. Apparently they're "making progress" https://github.com/vercel/next.js/discussions/25393#discussioncomment-4301796 You might be able to play around with the image sizes configuration: https://nextjs.org/docs/api-reference/next/image#image-sizes. Sorry for the "non-answer" answer, but that's all I can dig up. sadge
3 replies
TTCTheo's Typesafe Cult
Created by Madmanali93 on 3/18/2023 in #questions
Any good starter templates for electron?
@Madmanali93 From their docs, they point at some suggested starting places (not sure if there is a TypeScript starting kit from a first glance): https://www.electronjs.org/docs/latest/tutorial/boilerplates-and-clis
3 replies
TTCTheo's Typesafe Cult
Created by Debaucus on 3/18/2023 in #questions
.upsert when no way to track query/track unique identifier?
From what I understand, older versions of Prisma only expose unique fields (see the type UserWhereUniqueInput) on your models as fields in the where object when upsert is being used. According the docs: https://www.prisma.io/docs/reference/api-reference/prisma-client-reference#filter-on-non-unique-fields-with-userwhereuniqueinput, this behaviour was changed in Prisma >= 4.5.0 so you can reference non-unique fields in the where object.
5 replies
TTCTheo's Typesafe Cult
Created by niels on 3/18/2023 in #questions
Handling third party API limits
Depending on how the API you're hitting works, you may be rate limited based on an API key, or an IP address, or some other metric. Either the API documentation or a header like X-RATE-LIMIT on the response you get back should indicate how many requests you can make and when you can retry (you might find this number in an X-RETRY-AFTER type of header. - If it's by API key, you can't practically do much beside back off the requests and retry once you have a new window to send more request. You can look into topics like exponential back off. - If it's by IP address, you might be able to do some clever networking and send requests from different IP addresses once you've hit the limit with one client you're using. Another point to consider is when do you need to hit the endpoint? Is freshness of the data you're getting back paramount? If not, can you *cache *the response for some time and re-use it? If all else fails, perhaps you can negotiate with the provider for a more forgiving rate limit . For instance, at my work, we hit the Riot Games API and we have a custom agreement for our servers that provides a higher rate limit for our requests. Hope this helps!
2 replies