trompx
04/06/2022, 3:07 PMAustin Zentz
04/06/2022, 3:54 PMAustin Zentz
04/06/2022, 3:56 PMAustin Zentz
04/06/2022, 3:57 PMtrompx
04/06/2022, 4:14 PMtrompx
04/06/2022, 4:19 PMAustin Zentz
04/06/2022, 5:30 PMtrompx
04/07/2022, 4:28 PMjanpio
trompx
04/08/2022, 3:23 PMtype User = { name: string, age: number, address: string, etc. }
. For a non prisma raw query, I'd like to be able to create a type or partial type that use that information directly from prisma, like what is done with : const userPersonalData = Prisma.validator<Prisma.UserArgs>()({ select: { email: true, name: true }, })
, so I have a single source of truth for my types. I guess I could not infer the types with "PromiseReturnType" / "PromiseLike" as they are only usable on prisma queries? In that case is "Prisma.validator" usable to define the partial type of my non prisma queries?
3. My main usecase for raw queries was for creating relay pagination queries that supports conditional filtering + sort on nested tables for which I would like optimal performance. The goal would however to be able to switch from raw queries to prisma queries when the performance improves (and if you reimplement the relay style in the future as seen here https://github.com/prisma/prisma/issues/5016), thus having a setup where prisma is used together with another tool would be great. I start to have a good view how everything could be layered but if someone has a boilerplate or a small repo as an example, that would be awesome.
Anyway, thanks again for all you work for making our lives easier.janpio