vMInvincible
07/21/2022, 1:16 PMgeordi
07/21/2022, 2:54 PM1337
07/21/2022, 2:59 PMjs
const { data, error } = await client
.from('otherdeeds')
.select('id,prices!inner(price)')
.not('prices.price', 'is', null)
.order('price', { nullsFirst: false, foreignTable: 'prices' })
.limit(10)
Always returns unordered list.RenΓ© Goretzka
07/21/2022, 4:19 PMFaisalNawaz
07/21/2022, 5:17 PMoxlory
07/21/2022, 7:02 PMCrypticPlasma
07/21/2022, 8:18 PMcanceling statement due to statement timeout
when trying to truncate or drop a certain table. Weirdly it is showing that there are 0 rows but still 11mb of data in it. What could be causing this to happen? (I tried creating a new table and deleting it and it works fine so it seems to be a problem with this specific table)omri
07/21/2022, 9:17 PMid: uuid
and created_at: timestamp
, and the following additions:
- the table urls
has a host_and_path: string
column containing a normalized url
- the table website_data
has (among other columns) a url_id: uuid
column pointing to a urls
entry
both were created through the ui, no special sql wizardry going on here
when creating a website_data
entry from my input data (which includes a url that i normalize) i'd like to create a urls
entry if one doesn't exist, then take its id and use it as the newly created website_data
entry's url_id
, all in one go, and possibly for many entries in one call.
is that possible today or do i need to resort to an ugly and inefficient multi-step solution (upsert url returning id and normalized address, iterate through input data to match url ids to data objects, create website_data
entry for each input datum using the info i need and the correct url_id
)?Kam
07/21/2022, 10:36 PMSree
07/22/2022, 2:32 AMnew row violates row-level security policy for table \"projects\"
I've been stuck for a while now and not sure what to do. This is my mutation query:
mutation MyMutation {
insertIntoprojectsCollection(objects: {assets: ["test01"], name: "test", scene: "testscene", sensors: [{name: "camera1"}], user_id: "ca3ca3b8-9146-48e3-9106-1d8e42f8f5b5"}) {
affectedCount
}
}
stewiethepro
07/22/2022, 4:31 AMconst makeRequest = async (formData, userId) => {
const supabase = getSupabase(userId)
const { data: users, error } = await supabase
.from("users")
.update({
user_type: formData.userType,
first_name: formData.firstName,
last_name: formData.lastName,
is_onboarding: false
})
.eq('user_id', userId)
error ? console.log("Supabase error:", error) : console.log(data);
}
But I'm getting this error:
secretOrPrivateKey must have a value
utils/supabase.js (18:20) @ supabase.auth.session
16 |
17 | supabase.auth.session = () => ({
> 18 | access_token: jwt.sign(payload, process.env.SUPABASE_SIGNING_SECRET),
| ^
19 | })
20 | }
Here's where I'm signing the JWT:
// utils/supabase.js
import { createClient } from '@supabase/supabase-js'
import jwt from 'jsonwebtoken'
const getSupabase = (userId) => {
const supabase = createClient(
process.env.NEXT_PUBLIC_SUPABASE_URL,
process.env.NEXT_PUBLIC_SUPABASE_KEY
)
if (userId) {
const payload = {
userId,
exp: Math.floor(Date.now() / 1000) + 60 * 60,
}
supabase.auth.session = () => ({
access_token: jwt.sign(payload, process.env.SUPABASE_SIGNING_SECRET),
})
}
return supabase
}
I have my SUPABASE_SIGNING_SECRET in my .env.local file in the root directory.
I'm signed in and retrieving a user id from the session, but when I submit the form it throws this error.
Anyone able to point me in the right direction?HEAVYPOLY
07/22/2022, 5:31 AM{
"record": {
"email": "asd@gmail.com",
"id": "16c34376-54ff-49dc-a374-f32b063ef5da"
}
}
Anoushk
07/22/2022, 6:50 AMunknown1337
07/22/2022, 7:20 AMAnoushk
07/22/2022, 8:18 AMunknown1337
07/22/2022, 9:23 AMJulien
07/22/2022, 2:00 PMjs
.select(`
organization(id, name)
`)
Which gives me the following result:
[
Β Β {
organization: {
id: dqzdqz,
name: "dqdqdq"
}
},
{
organization: {
id: dqdqdqdqzd,
name: "dqdqdq"
}
}
]
And I would like to have:
[
{
id: dqdqdq,
name: "dqdqd"
},
...
]Derek
07/22/2022, 2:53 PMjaitaiwan
07/22/2022, 3:25 PMgesusc
07/22/2022, 3:34 PMConnection refused
. Do I need to allow Deno to access the locally running DB? If so how can I do that? I tried appending the --allow-net=localhost:54322
flag via supabase functions serve
it didn't like that.gorbypark
07/22/2022, 4:08 PMlet {data, error} = await supabase.from('food').select('*');
might just "fail" with a Require cycles are allowed, but can result in uninitialized values. Consider refactoring to remove the need for a cycle.
warning? Inspecting the network shows it's not even making a call to the api. I have calls to superbase.auth.signUp working fime... js
let {user, error} = await supabase.auth.signUp({
email: email,
password: password,
});
i'm not quite sure what i'm doing wrong here...gesusc
07/22/2022, 4:42 PM502 Bad Gateway
. I am using the provided SUPABASE_DB_URL
environment variable when connecting to the DB.joshcowan25
07/22/2022, 5:02 PMth_m
07/22/2022, 5:21 PMbmccormick
07/22/2022, 6:22 PMChris_Acrobat
07/22/2022, 9:06 PMError: unknown flag: --no-verify-jwt
when I call supabase functions deploy my-function --no-verify-jwt
. Am I misunderstanding something?Darren lau
07/23/2022, 5:42 AMgorbypark
07/23/2022, 9:01 AMsupabase.auth.signIn()
into a react-query custom hook, but of course that doesn't stay in sync when supabase refreshes the token and etc..gorbypark
07/23/2022, 3:13 PMreemwn
07/23/2022, 5:11 PM