https://supabase.com/ logo
Join DiscordCommunities
Powered by
# help
  • k

    knight

    08/10/2021, 2:36 AM
    not really working
    c
    • 2
    • 8
  • u

    user

    08/10/2021, 2:44 AM
    hello
  • u

    user

    08/10/2021, 2:44 AM
    do we have a CDN?
  • h

    HoXsan

    08/10/2021, 7:03 AM
    Hi guys, i have a Saas project, where there can be multiple apps with their own users/login. Is it possible to use the same database for login to different apps, or do i have to create new project for each app? EG: in my saas project, i have a client named A. He will be able to create his own project inside my saas project. Within his own project, he will be able to let users login to his project. The supabase login will be used here. BUT Lets say that there is also client B. He does also offer application with login like client A. An end user is customer for both apps, he can't login to second app, as there will be duplicates in the user table. How would i solve this?
  • d

    dailylurker

    08/10/2021, 7:38 AM
    hello need your help guys, I have a table that has a foreign key to about three tables I want to implement an RLS on the main table, the main table has an isPrivate boolean flag if it's true only people under the same company can view this row and I want to apply it on the three related tables as well Is this possible? Can I get a guide on how it would look like in a policy?
  • d

    discobober

    08/10/2021, 10:26 AM
    is it possible to create new tables programmatically from an authenticated web client?
  • s

    silentworks

    08/10/2021, 10:34 AM
    yes but its advised against
  • d

    discobober

    08/10/2021, 10:36 AM
    thanks! can it be done through the supabase JS api or I need to use PostgREST? I can't find anything about it in the docs
  • l

    laznic

    08/10/2021, 10:42 AM
    Would someone have an idea how I could leverage the Row-Level Security features when using a direct DB connection with an ORM (Knex.js/Objection.js)?
    s
    • 2
    • 7
  • u

    2% space milk

    08/10/2021, 12:27 PM
    Does anyone know how I can create a policy that disallows selecting of certain fields?
    b
    s
    • 3
    • 3
  • c

    carlomigueldy.eth

    08/10/2021, 1:00 PM
    Is this fine? I got 2 columns referencing into a single table "users"
    Copy code
    sql
    CREATE TABLE public.team_requests (
        user_id uuid NOT NULL REFERENCES public.users (id),
        team_id uuid NOT NULL REFERENCES public.teams (id),
        type VARCHAR NOT NULL,
        created_by uuid NOT NULL REFERENCES public.users (id),
        created_at TIMESTAMP DEFAULT now() NOT NULL,
        updated_at TIMESTAMP DEFAULT now() NOT NULL,
        deleted_at TIMESTAMP
    );
  • t

    thomassk

    08/10/2021, 1:12 PM
    My realtime subscriptions just keep growing and growing. Don't no why... I'm re-creating my realtime subscriptions in my React app whenever specific data changes and it's done in a single place like: subscriptions.forEach((subscription) => subscription.unsubscribe()); createSubscriptions(); But supabase.getSubscriptions().length just keep getting larger and larger? Anyone has any clue why?
  • d

    donpuerto

    08/10/2021, 1:13 PM
    Hi how to query using SQL lang?
  • j

    JW

    08/10/2021, 1:27 PM
    yes, you can reference the same table multiple times. if your column "type" is more like an enum, just create one.
  • j

    JW

    08/10/2021, 1:46 PM
    to join
    users
    do something like
    col1, col2, col3, requester:user_id(*), creator:created_by(*)
    . Both
    requester
    and
    creator
    are the keys to the joined user data
  • c

    CAMOU

    08/10/2021, 2:44 PM
    hey I feel like the Svelte QuickStart tutorial on Supabase docs is kinda outdated isnt it
  • m

    MrScorpioXX

    08/10/2021, 2:45 PM
    okay so i have been getting a weird error. it says fetch is not a function when trying to read data from a table. I am using svelte
  • m

    MrScorpioXX

    08/10/2021, 2:47 PM
    Copy code
    javascript
    async function getPending() {
            return await supabase
            .from('pending')
            .select("*")
            .eq('userId', $userId);
        }
    console.log(getPending());
  • g

    GandalfG

    08/10/2021, 3:14 PM
    Hi All! Just bugging my head with this for the last 1-2 hrs. I am trying to fetch some data from a table that I created and I am using the API with the provided libraries. Thats my code.
  • g

    GandalfG

    08/10/2021, 3:15 PM
    But, even if the network is 200, I never get the data back, the console.log(data) simply shows an empty array. When there are actually 3 rows of data in my table. Do u think it might an issue of the promise never resolving? Is there a way to resolve it?
  • s

    Sduu_

    08/10/2021, 3:16 PM
    When there's an error with the results, supabase doesn't throw so the try catch block will most likely not catch all the errors
  • s

    Sduu_

    08/10/2021, 3:17 PM
    Rather add the property error to the destructed object i.e.
    const { data, error } = await ...
  • s

    Sduu_

    08/10/2021, 3:17 PM
    And then check against that property as to what the issue is from there
  • g

    GandalfG

    08/10/2021, 3:17 PM
    no issue, the error is coming back as null.
  • g

    GandalfG

    08/10/2021, 3:18 PM
    and network request status is 200
  • s

    Scott P

    08/10/2021, 3:18 PM
    I'd say it's probably to do with your table name being camelCased - Postgres is weird about that. If you change the table name and your request to
    user_profile
    , does it work?
  • s

    Sduu_

    08/10/2021, 3:18 PM
    If there is no error there also, check if your row level security entries are not the issue there, I usually disable them to debug, and bring them back after I've confirmed that the data is coming through
  • s

    Sduu_

    08/10/2021, 3:18 PM
    Also, yes @User a 100%
  • g

    GandalfG

    08/10/2021, 3:20 PM
    Thanks for that, is something I did not know. However, did not fix the issue 😛 same behavior
  • s

    Sduu_

    08/10/2021, 3:21 PM
    Mind jumping in the voice channel to go over this? @User
1...424344...316Latest