mmurto
Explore posts from serversTwo accounts linked to one GitHub account
I've been using Railway on personal stuff, and enjoy it very much. I'd like to start experimenting it for my company, but after creating a new account with my company email, I can't connect my GitHub account to it as it's already connected to the personal account. What should I do?
9 replies
TTCTheo's Typesafe Cult
•Created by mmurto on 6/13/2023 in #questions
Split tRPC to two endpoints on lambda and edge with Next
Is it possible/are there some examples of splitting the tRPC endpoint into two endpoints? My initial experiments a while back encountered some problems with trying to use nested
withTRPC
s. I'd like to have most of my routers on edge, but some don't work there, so need to leave them to lambdas.2 replies
TTCTheo's Typesafe Cult
•Created by mmurto on 4/29/2023 in #questions
tRPC with part on NextJS Lambdas and part on Edge
How should I go with splitting tRPC to have some functions execute on serverless/lambdas and some on edge functions? I tried creating two separate routers with nested
withTRPC
s, but it didn't work.2 replies
DTDrizzle Team
•Created by mmurto on 4/17/2023 in #help
Raw SQL / Postgres stored generated column in schema
Is it possibile to add raw sql, or more specifically stored generated columns to the schema? Trying to store a length field of a text column.
1 replies
DTDrizzle Team
•Created by mmurto on 4/12/2023 in #help
How to count joined table?
I'm trying to count rows returned by join for a query, basically the same as this: https://dba.stackexchange.com/questions/110850/count-rows-with-inner-joined-tables
How to convert this to Drizzle? Any documentation I've missed regarding this kind of things?
2 replies
TTCTheo's Typesafe Cult
•Created by mmurto on 4/11/2023 in #questions
Handle trailing slash in NextJS API routes?
I'm trying to create an integration to Fibery through NextJS's API routes, but Fibery's integration engine seems to send one request to
api/integration/
(trailing slash) and some to api/integration/schema
etc, which I can't make work with the API dir. 😄 Any way to force index.ts
in API route to handle both the trailing slash and without?3 replies
DTDrizzle Team
•Created by mmurto on 4/9/2023 in #help
How to filter length in where for postgres?
I have a text field, which I want to select only if it's length is higher than 50. How should I do that? So I basically need to transfer
where length(item.content) >= 50
to Drizzle.4 replies
TTCTheo's Typesafe Cult
•Created by mmurto on 3/24/2023 in #questions
`import` and `require` in the same file?
I'm trying to use https://github.com/luin/ioredis and https://github.com/rse/tika-server/tree/master in the same project. When trying to build a Docker image out of the project, I can't seem to get it working as ioredis needs to be imported and tika-server required. What is that interaction about? Any clues how to get this working or what I may have set up wrong?
2 replies
TTCTheo's Typesafe Cult
•Created by mmurto on 3/19/2023 in #questions
`onSuccess` is typed correctly as `data: ReturnItem` for one mutation but as `data: any` for another
onSuccess
is typed correctly as data: ReturnItem
for one mutation but as data: any
for another, any ideas why? I see no apparent reason.2 replies
DTDrizzle Team
•Created by mmurto on 3/17/2023 in #help
Argument of type 'SQL<unknown>' is not assignable to parameter
I have the following:
and the
eq()
gives an error like:
What could be the problem?10 replies
TTCTheo's Typesafe Cult
•Created by mmurto on 3/13/2023 in #questions
How to get context type of protectedProcedure?
I want to keep my logic outside of the routes by using functions and just calling them in the router. Is there a way to get the type of the context with the procedures applied, i.e., I want to get types
ProtectedProcedureContext
and PublicProcedureContext
to use as input types for a function. How to?5 replies
TTCTheo's Typesafe Cult
•Created by mmurto on 2/20/2023 in #questions
How to redirect from login page with trpc's SSR enabled?
Any simple solutions for redirecting unauthenticated users to
/login
and authenticated users from /login
to /
with trpc's SSR enabled, i.e., without the use of getServerSideProps?3 replies