Pieter
Explore posts from serversDTDrizzle Team
•Created by Pieter on 11/22/2023 in #help
$dynamic() select
Hi, I'm trying to build a graphql wrapper for my drizzle datbase and was super stoked to see the $dynamic() query builder. However, doing joins in a wrapper is possible, but I don't see a way to do partial selects with the dynamic api.
https://orm.drizzle.team/docs/dynamic-query-building
https://orm.drizzle.team/docs/joins#partial-select
Is it somehow possible to add to the selection? (without managing selections externally)
3 replies
Query function depends on a variable
In tRPC v10 accessing a specific path is really easy, but because of that I don't control the query key.
I'm using tRPC to fetch data based on user input in a search bar. Tanstack Query docs has a specific bit in the detailing that the variable should be included in the query key. What is the tRPC way of handeling this?
https://tanstack.com/query/latest/docs/react/guides/query-keys#if-your-query-function-depends-on-a-variable-include-it-in-your-query-key
Yes, I can use refetch with the query params in state but this is creating side-effects in my code that I would like to avoid.
7 replies