Two (2) db calls in .server #6703
sharkstate
started this conversation in
General
Replies: 3 comments 4 replies
-
Take a look at |
Beta Was this translation helpful? Give feedback.
3 replies
-
why can't u just do ? const query1 = await supabase... return { |
Beta Was this translation helpful? Give feedback.
1 reply
-
If i'm not mistaken, you can return promises directly. No need to use await. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have an edge case where I would like to run two separate db queries in .server and return both, in my case using SupaBase.
How can I setup
const { data,count,error }=await supabase
...
const { data2,count2,error2 }=await supabase
...
To await both calls before return
return{
data1,
data2,
}
Beta Was this translation helpful? Give feedback.
All reactions