aquarazorda
Explore posts from serversCDCloudflare Developers
•Created by aquarazorda on 11/28/2023 in #workers-help
Worker doesn't work remotely as it should
Hi guys, I have this issue. When testing worker locally via wrangler, everything works just fine, but when switching to remote, it doesn't work like on local.
I have one endpoint, where I'm running two fetch requests. One does POST to login, grabs cookies and then fires another request with these cookies.
Locally second request returns correct data, remotely, I'm losing authorization, maybe it doesn't send cookie. So it returns html, as if I didn't send the cookie.
Same thing happens on deployed worker as well.
What can be the issue? It drives me nuts, been trying to make it work for like 2 days
6 replies
DTDrizzle Team
•Created by aquarazorda on 8/25/2023 in #help
Why it's not possible to use `where` here?
7 replies
DTDrizzle Team
•Created by aquarazorda on 6/5/2023 in #help
Problem when inserting new record
Hello guys, when I'm trying to insert new record, I'm getting this PG error
null value in column "id" of relation "MagicLinks" violates not-null constraint
and in my schema, I have id: uuid('id').primaryKey().defaultRandom()
what am I doing wrong?
Thanks1 replies
SSR, Reactivity of Signals on onMount
Hey guys, I've got couple of signals in the view, which are strings and I'm sending default values via SSR, then on onMount, I'm changing values of these signals.
If I put console log inside createEffect, I see that values are changed, but it's not being changed in the view.
Also, if I add timeout of signal updates in onMount, for like 200-300ms, I see that values change in the view as well.
How can I make it work, so updating signals in onMount, will update values in the view as well?
9 replies
Can't use `useRouteData`
Hi guys, I'm using basic routing without FileRouter and whenever I'm trying to use
useRouteData
inside of my component, I'm getting Make sure your app is wrapped in a <Router />
, without using it, everything works just fine. Do you have an idea what can be the issue? I've got a lazy component inside <Route component={
20 replies
[Solved] Reactivity problem when refreshing the page
I've got a route, where I'm fetching data with server$ function, which sits inside createResource and it works fine, when I'm navigating. But when I'm refreshing, I can see that it fetches on the server, but Resource doesn't get updated on client side. What am I doing wrong?
this is the client side, which doesn't log fetched data when reloading.
this is the server side
Basically what I'm trying to achieve is that, I only want to export from server with already
server$
wrapped functions and since I'm making an api call from server, I want it to be cached, I'll use solid-query or solid-cache for it. In this example, to make it simple, I'm using createResource
and as mentioned, everything works fine when I'm navigating to the page where I have that logic, but if I refresh, promise doesn't get resolved and it's always in loading state, but on server side, I can see that promise resolved. This happens with routeData
as well.
Solution
When I was accessing data, I had it wrapped with <Show>
component and I was only showing data, when data.loading
was false.
Wrapping it with <Suspense>
was the solution.78 replies