cappy
08/18/2022, 5:30 AM49Ryann
08/18/2022, 6:15 AMthis.realtime?.unsubscribe()
this.realtime = this.ss.client
.channel(`public:contact:id=eq.${contact.id}`)
.on(
'postgres_changes',
{
event: 'UPDATE',
schema: 'public',
table: 'contact',
filter: `id=eq.${contact.id}`,
},
({new: contact}) => {
console.log('contact', contact)
this.contact = contact
}
).subscribe()
"@supabase/supabase-js": "^2.0.0-rc.2",
Mathiassio
08/18/2022, 7:13 AMasync function signInWithSlack() {
const { user, session, error } = await supabase.auth.signIn({
provider: "slack",
});
}
Equinox
08/18/2022, 8:55 AMsupabase db remote commit
which created the migration but then as soon as I want to startup my local supabase again with supabase start
it keeps on throwing errors
I have also tried moving the migration file out of the folder and starting the database then putting the file back and running supabase db reset
but it doesn't work either
When I setup my supabase project I used the Next.js subscription starter so I have some enum types already created that I'm not currently using e.g: pricing_type
, I tried deleting those from the UI and running a migration again but I cannot because of errors with the shadow database
I also tried removing those specific enum types from the migration but then the migration throws some other error.
I have also tried re-running everything with the latest update of the Supabase CLI but it didn't change anythingWaldemar
08/18/2022, 9:34 AMLIKE
, doesn't have to be super smart.
What options do I have to implement this with Postgres / Supabase JS client?
The only thing that comes to mind is a VIEW
with UNION ALL
or similar. But then do something like this with Supabase JS client:
.or('like.id.%search string%, like.name.%search string%')
Any ideas are welcome!Mathiassio
08/18/2022, 10:31 AMQueueBot
08/18/2022, 10:31 AM413
when I try to query it.
ts
...
// 413
const { data, error } = await supabaseClient
.from<Row_Heartbeat>('heartbeats')
.select('*')
.eq('application_id', applicationID)
.order('created_at', { ascending: false })
.limit(27);
if (error) {
throw error;
} else {
return data;
}
...
The query works fine in the SQL editor (https://storage.queue.bot/t/930bm9voa.pngā¾
LewTrn
08/18/2022, 11:56 AMlucasb
08/18/2022, 12:30 PMtheuknowner
08/18/2022, 12:54 PMMathiassio
08/18/2022, 12:54 PMjs
const { isLoading, user, error } = useUser();
const [role, setRole] = useState(null);
async function fetchRole() {
const data = await supabaseClient
.from("roles")
.select("role")
.eq("id", user?.id)
.single();
setRole(data?.data?.role);
}
useEffect(() => {
fetchRole();
}, [role]);
How can I listen for changes in the database and then change the state? I have looked at .subscribe() but I'm not sure how to implement it.larryM
08/18/2022, 1:04 PMMaxAryus
08/18/2022, 1:06 PMtembo
08/18/2022, 4:10 PMGruce
08/18/2022, 4:12 PMsql
CREATE TRIGGER user_created_trigger
AFTER INSERT ON "auth"."users"
FOR EACH ROW
EXECUTE FUNCTION user_create();
But it shows:
Error:
db error: ERROR: schema "auth" does not exist
0: migration_core::state::DevDiagnostic
at migration-engine\core\src\state.rs:250
Thank youda newb
08/18/2022, 6:26 PMosener
08/18/2022, 8:08 PMsupabase start
to run my local development server. How can I configure Notion as a GoTrue provider? I am currently getting this error:
{"code":400,"msg":"Unsupported provider: Provider is not enabled"}
I have seen mentions of "ejecting" or "self hosting" in the docs, but ideally I would like to keep the workflow I have with Supabase CLI (or at least not configure a lot of extra stuff to get where I am).martypdx
08/18/2022, 8:11 PMDeleted User
08/18/2022, 9:17 PMjulie
08/18/2022, 11:16 PMBaron
08/19/2022, 2:04 AMCrayon
08/19/2022, 2:54 AMharshcut
08/19/2022, 5:00 AM/u/dashboard
(protected page) with @supabase/auth-helpers-nextjs
when user is already logged in?
ts
// login.tsx
export const getServerSideProps: GetServerSideProps = async (context) => {
return { props: {} }
}
brianh
08/19/2022, 5:44 AMSign In with Github
on supabase.com. Strangely, it sometimes lets into the dashboard but its completely empty (no projects to be seen). Also when I click any tab in the navbar it automatically logs me out.
Big issue here is I can't access my production app but its still runninglaubonghaudoi
08/19/2022, 6:17 AMproduct
and user
which have many-to-many mapping relationship, and I have a third join table product_user
which has three fields: id
, product_id
and user_id
.
How do I get all products that belong to a certain user in javascript?
I found the same issue here: https://github.com/supabase/supabase/discussions/1080
It says it was a limitation in 2021 and we can only do client-side filtering, what about now?blank
08/19/2022, 6:17 AMPOST
only restriction, however it prevents Connection: Upgrade
as only GET
is supported https://www.rfc-editor.org/rfc/rfc6455#page-17.
Are there any plans to relax the restrictions to allow Websocket connections, or is this already supported and I'm unaware?Migu
08/19/2022, 6:34 AMsupabase/config.toml
when I run supabase init
or supabase start
?
I'm running it in a Turborepo and I just want to avoid the path apps/supabase/supabase/config.toml
if I can :p
Thanks!shtepa
08/19/2022, 7:27 AMsignInWithOtp
method would be available for signing in but when I use it I get an error saying that there is no function as signInWithOtp
exists on auth
property of supabase client. Full error look as _utils_supabaseClient__WEBPACK_IMPORTED_MODULE_3__.supabase.auth.signInWithOtp is not a function
.Has anyone else come across this issue?Brice Joosten
08/19/2022, 9:32 AM0xAvneesh
08/19/2022, 9:53 AM