https://supabase.com/ logo
Join Discord
Powered by
# help
  • j

    jon.m

    01/03/2022, 4:49 AM
    @User are you using the client library? Next question, after looking at the docs, what piece are you unclear on?
  • a

    akshg05

    01/03/2022, 5:28 AM
    Hi @jon.m Yes the client library. I want to get data by joining two to three tables. I don't know postgres, pretty new with it so I don't know how to join tables and get data and the js reference docs for select() method isn't telling much.
  • j

    jon.m

    01/03/2022, 5:29 AM
    Do you have key relationships set up between the tables, the two or the three?
  • j

    jon.m

    01/03/2022, 5:37 AM
    In the documentation, this example shows a join.
    Copy code
    const { data, error } = await supabase
      .from('countries')
      .select(`
        name,
        cities (
          name
        )
      `)
  • j

    jon.m

    01/03/2022, 5:38 AM
    The countries table has a relationship to the cities table, which you would have needed to set up in the supabase dashboard
  • j

    jon.m

    01/03/2022, 5:38 AM
    The Client library knows that the relationship exists, so this query will join up the two tables.
  • a

    akshg05

    01/03/2022, 6:30 AM
    Thanks for responding Jon. I'm not aware of explicitly setting up relationships between tables but I'll list briefly wat I have I have a messages table and a chat table where chatId is unique prim key for chats table and messages table contains chatId column. I want to get a result which includes the message row and some details from the chat row for a particular msg id which is a primary key for messages table. How do I do that?
  • a

    akshg05

    01/03/2022, 7:22 AM
    Ok so I was able to set up the relationship now through UI. Though I'm still getting error that the relationships don't exist and try reloading schema cache.
  • a

    akshg05

    01/03/2022, 7:51 AM
    I was able to get it working I guess. Thank you for guidance :)
  • a

    Antonio Giroz

    01/03/2022, 12:15 PM
    Hello everybody! I'm developing an application in Vue 3 where an admin user can invite to other users send them a link. But is this feature only available server side? I would like to send an invitation and then the user should set a password. How can I do this? Thanks!
  • w

    wiesson

    01/03/2022, 1:22 PM
    I have my supabase app on myproduct.com/app - does anyone know where I can redirect the user to
    /app
    after a successful gogole oauth login?
  • w

    wiesson

    01/03/2022, 1:23 PM
    The user always gets redirected to the base url / domain. Do I have to use the redirectTo parameter?
    Copy code
    async function signInWithGoogle() {
        await supabase.auth.signIn(
          {
            provider: "google",
          },
          { redirectTo: "/app" }
        );
      }
    Do I have to add the absolute / full path here? The docs aren't that clear 😅 // edit: only full path works
  • k

    kresimirgalic

    01/03/2022, 2:01 PM
    Hey everyone, did anyone tried to create rpc with query and pagination with react-query?
  • r

    recursionDev

    01/03/2022, 3:36 PM
    Hey, I don't know if this is the right channel, but I think it fits. Is anyone having trouble logging into supabase lately? The day before yesterday it wasn't possible to log in, yesterday it worked, today it doesn't work again.
  • d

    Deleted User

    01/03/2022, 3:37 PM
    nevermind I mistook your question, you couldn't login with github you said?
  • r

    recursionDev

    01/03/2022, 3:38 PM
    Yes, the data from the database goes into the application. I cannot log into the panel using github. edit: the sentence was badly put
  • d

    Deleted User

    01/03/2022, 3:39 PM
    no issues on this personally, perhaps an ad blocker or any other browser extention above that won't allow to run a bot check perhaps? Wouldn't really know otherwise :/
  • r

    recursionDev

    01/03/2022, 3:40 PM
    thanks
  • u

    1304654

    01/03/2022, 4:16 PM
    Hi!! Do you know if there are some method to block or invaldate session user?
    c
    s
    • 3
    • 9
  • c

    coozamano

    01/03/2022, 4:20 PM
    Has anyone else run into this issue a LOT when using supabase postgres?
    remaining connection slots are reserved for non-replication superuser connections
    For context: My frontend is Vercel, I have several data jobs which are consistently connected and a decent amount of active users
  • c

    cookie mob

    01/03/2022, 4:54 PM
    Could someone tell me exactly how this supabase on().subscribe() function works? I'm working in React Native.
    s
    • 2
    • 4
  • j

    jon.m

    01/03/2022, 5:43 PM
    You would do a select messages then inside the message query nest a chats query, similar to the code snippet i shared from he documentation. Then you would add a filter or match method do the end for the specific message id.
  • j

    jon.m

    01/03/2022, 5:43 PM
    Similar to this:
    Copy code
    const { data, error } = await supabase
      .from('cities')
      .select('name, country_id')
      .eq('name', 'The shire')
  • s

    Snehal

    01/03/2022, 5:59 PM
    I implemented Google Sign-in using supabase and flutter web auth package then I got stuck into platform exception that automatically cancel login process. Tried to implement the solution available on stack overflow and https://github.com/LinusU/flutter_web_auth/issues/92. Can anyone help me to implement working Google authentication?
  • a

    Antonio Giroz

    01/03/2022, 6:45 PM
    Maybe calling directly to /auth endpoint instead of using supabase api methods?
  • u

    user

    01/03/2022, 7:10 PM
    how do you make a POST call with supabase?
  • u

    user

    01/03/2022, 7:11 PM
    Can't seem to find it in the docs
  • p

    Pozzuh

    01/03/2022, 8:47 PM
    Is there a way to create a plpgsql function that
    RETURNS table (content json)
    instead of
    RETURNS json
    in the Supabase interface?
  • g

    Garrett Tolbert

    01/03/2022, 9:09 PM
    I'm new to RLS policies. How can i write a policy to allow completely open access to a storage bucket?
  • n

    Null

    01/03/2022, 10:32 PM
    Where do I get the access token from when using getUser()? https://supabase.com/docs/reference/javascript/auth-api-getuser
1...182183184...316Latest