https://supabase.com/ logo
Join Discord
Powered by
# off-topic
  • u

    user

    12/14/2021, 4:47 PM
    with Prisma you can do for example:
    Copy code
    js
    const query = await prisma.user.findUnique({
      where: {
        user_id: userId
      },
      include: {
        post: true,
        comment: true
      }
    })
  • u

    user

    12/14/2021, 4:48 PM
    this will get the user's record from the
    user
    table, and also the user's posts and comments from the
    post
    and
    comment
    table using the
    user_id
    relation
  • u

    user

    12/14/2021, 4:56 PM
    to join multiple tables with Supabase API try this: https://stackoverflow.com/questions/64996432/how-to-query-using-join-in-supabase
  • g

    gleki

    12/14/2021, 5:52 PM
    Hi. Is it possible to run sql queries at https://app.supabase.io/ from a given user from auth table? it seems https://app.supabase.io/ has queries run as root so testing procedures depending on auth.uid() is not possible. any solution?
  • c

    chipilov

    12/14/2021, 6:37 PM
    I think you can do it by setting the relevant setting. You can do it in 2 ways (one former sets it for the entire duration of the session, while the latter sets it only for the current transaction as far as I know):
    Copy code
    SELECT set_config(
      'request.jwt.claims',
      '{ "sub": "ddddc018-2f88-412a-a581-0f3e85e6ff43", "email": "user@email.com" }',
      false
    );
    or
    Copy code
    begin;
    set local "request.jwt.claims" to '{ "sub": "ddddc018-2f88-412a-a581-0f3e85e6ff43", "email": "user@email.com" }';
    -- do something
    commit;
  • g

    gleki

    12/14/2021, 6:58 PM
    @chipilov oh looks very nice. Will definitely try it, thank you!
  • g

    goldyman

    12/14/2021, 10:03 PM
    I would like to ask is it possible to develop a HIPAA compliant software with Supabase
  • d

    DarrenJr

    12/14/2021, 10:47 PM
    For some reason i keep getting a 403 (forbidden error) when attempting to insert to supabase table. Anyone know why?
  • g

    garyaustin

    12/14/2021, 10:58 PM
    Do you have RLS on for that table and if so have a select policy. Insert does a select also unless you turn off it off with the minimal option.
  • d

    DarrenJr

    12/14/2021, 10:59 PM
    I do have RLS on it and tried changing return type to "minimal" but it still throws me a 403
  • g

    garyaustin

    12/14/2021, 11:00 PM
    Then you probably need to provide code for your insert and your RLS policies for anyone to help.
  • d

    DarrenJr

    12/14/2021, 11:01 PM
    Sent you a dm
  • m

    Moein

    12/15/2021, 7:30 AM
    Hello everyone! 👋 New to supabase discrod but I've been trying supabase for some time and loving it!
  • m

    Moein

    12/15/2021, 7:32 AM
    Currently none of the Functions related pages are opening in app.supabase.io
  • m

    Moein

    12/15/2021, 7:32 AM
    Any idea what's going on?
  • u

    user

    12/15/2021, 2:28 PM
    why is it not loading?
  • u

    user

    12/15/2021, 2:32 PM
    loading for me
  • u

    user

    12/15/2021, 2:32 PM
    try refreshing
  • n

    Neucoas

    12/15/2021, 3:37 PM
    Not loading for me either. My apps are down
  • v

    Vinzent

    12/15/2021, 3:53 PM
    Can confirm.
    app.supabase.com
    is not loading. The supabase logo keeps spinning
  • n

    Neucoas

    12/15/2021, 3:55 PM
    Notion is also down... maybe an issue with AWS?
  • v

    Vinzent

    12/15/2021, 3:56 PM
    https://status.aws.amazon.com/ too haha
  • s

    silentworks

    12/15/2021, 3:59 PM
    AWS outage at the moment, many apps have been affected including Supabase in some regions.
  • v

    Vinzent

    12/15/2021, 3:59 PM
    Europe is working again. Let's see how long.
  • g

    garyaustin

    12/15/2021, 4:03 PM
    I had just downloaded a supabase.js branch with a fix done by supabase last night to help test and then login in broke. Spent awhile looking at that then noticed my other project would not login and then supabase.io would not login, now lots of people are down..... hope I did not cause it 😎
  • s

    silentworks

    12/15/2021, 4:04 PM
    What have you done @User? revert quickly 🤣
  • s

    silentworks

    12/15/2021, 4:04 PM
    Btw my project are working along with the supabase dashboard
  • g

    garyaustin

    12/15/2021, 4:06 PM
    Back up and I did not revert....
  • j

    jordan801

    12/15/2021, 4:06 PM
    Looks like its back now.
  • m

    Mike_

    12/15/2021, 6:30 PM
    Hey, quick question to anyone who knows: By default, if I enable row-level-security on a table, does that disable access to all anon/authenticated roles, or do I have to manually disable access? I'm trying to create a table which is only accessible by the service role key...
1...161162163...392Latest