dion
Explore posts from serversDTDrizzle Team
•Created by dion on 6/26/2024 in #help
Possible bug with nested query + reverse access
I have a pretty nested query.
It results in this error:
I can make the query work if i go one level down:
Or alternatively if i remove the reverse access: Hope you guys can assist me with this!
Or alternatively if i remove the reverse access: Hope you guys can assist me with this!
3 replies
RRefine
•Created by foreign-sapphire on 6/4/2024 in #ask-any-question
Bearer token for keycloak
Hi, am a little lost with the documentation as there doesn't seem to be much information on how the login works for the keycloak abstraction. This was what my project was generated with:
I am also utilizing a simple-rest server.
Where does it store the auth token? And how can i pass this auth token in my simple-rest provider?
5 replies
DTDrizzle Team
•Created by dion on 3/15/2024 in #help
drizzle-zod not infering jsonb type properly
I have the following table
And i use drizzle-zod to do the following types:
I get this:
instead of this:
Does anybody know why and how to fix this?
2 replies
DTDrizzle Team
•Created by dion on 11/28/2023 in #help
Infering custom types
I am following the guide https://orm.drizzle.team/docs/custom-types#examples referenced here to create a custom JSONb schema. However, when i create an insert schema, the customtype field is of zod any
2 replies
hydration mismatch when wrapping component in a suspense
I am trying to render a loading ui when data is being collected on the server:
For context this is routeData that i defined on the parent route:
Observation:
1. When i put a delay of 5 seconds, and reload the page, a GET request is sent to the server the page will show that it's loading for 5 seconds
2. Once the 5 seconds is up, a POST request is sent to that page's routeData, then it loads for another 5 seconds.
3. This is the time when the error below appears. The suspense will now also show the loading fallback.
4. Once the 5 seconds is up, then the page now shows the correct data.
TLDR, i have two questions:
- why is there a total delay of 10 seconds to load the data in when i only put a delay of 5 seconds
- why is there a hydration mismatch error
3 replies
whats the use case of routeData and useRouteData
From my understanding, it seems possible to directly get the data needed using ‘createServerData$’ to fetch the data on the server, or is that an anti-pattern?
From the docs, it seems that routeData is called once per route, but in most apps that i’ve built, i usually do the data fetching at the component that needs it. I.E, i’ll have pass it down as props.
2 replies
forwarding headers in solidjs
I have a setup with solidstart, and im trying to forward the client headeres to ttrpc.
Here's my setup:
This is how i'm calling the
trpc
client from my component:
Is there a way to forward the headers received by the handler?1 replies
Request data not consistent between createServerData$ and API route
I have a lucia x trpc x solidstart project setup.
TLDR: I'm observing that the
event
passed to my createServerData$
and the event
that is passed to my API handler is different.
Here's my project structure:
Here's how my API handler for trpc has been setup src/routes/trpc/[trpc].ts
The cookie here is logged as {}
On the other hand, in another route, src/routes/(auth)/signin.ts
The console logs out the authentication details.
I'm confused as to why this is the behaviour since I thought both routeData and API routes are accessing the same request
2 replies
Unable to find modules
Hey guys, new to solidjs and SSR frameworks in general. I'm testing out a solidstart template generated using a community tool called "Create JD app". This allows me to quickly spin up a boilerplate project similar to create-t3-app.
The problem is that I'm facing this runtime error:
Doing a build results in the following error:
Here's my vite config file:
I would love to know what is happening, since there's no errors that are being thrown by my editor, not sure of where to start...
3 replies
DTDrizzle Team
•Created by dion on 9/26/2023 in #help
Class inheritance (Inherits keyword)
Is there anyway to easily replicate this behaviour in drizzle?
Inserting Data:
Querying Data:
This will return all rows from both student and staff tables.
7 replies