https://supabase.com/ logo
Join DiscordCommunities
Powered by
# javascript
  • g

    garyaustin

    12/06/2021, 2:09 AM
    Firebase versus Supabase realtime
  • g

    Gita Alekhya Paul | Quinence

    12/06/2021, 6:35 AM
    Hello everyone, I have a table called
    sources
    which has a column
    sourceAddresses
    of type
    jsonb[]
    of the following structure:
    Copy code
    [
      {
        "address": "0xsomething1",
        "type": "SOME_PROPERTY_1"
      },
      {
        "address": "0xsomething2",
        "type": "SOME_PROPERTY_2"
      }
    ]
    I want to check for a row in which the array in the column sourcesAddresses contains a certain source, identified by the
    address
    property. I tried to implement the code:
    Copy code
    const { data, error } = await supabase
            .from("sources")
            .select("*")
            .contains("address:sourceContractAddresses->>address", contractAddress);
    Unfortunately it returns
    null
    Can someone please guide me?
    c
    r
    • 3
    • 31
  • r

    Ratul Saha | Quinence

    12/06/2021, 6:49 AM
    @copple can you please help? We are stuck on this basic thing for a while, must be missing something obvious. Appreciate the help in the time-sensitive issue.
  • j

    Jer

    12/06/2021, 7:31 AM
    Hi! I'm using
    @supbase/supabase-js
    and trying to use the
    redirectTo
    on
    signUp
    and it's not working. I'm not sure I understand why:
    Copy code
    const {
              error: e,
              user,
              session,
            } = await supabase.auth.signUp(
              { email, password },
              { redirectTo: 'http://localhost:3000/access' }
            );
    I have this URL added in my Auth settings as well.
  • c

    chipilov

    12/06/2021, 8:07 AM
    Query against a jsonb array
  • w

    wiesson

    12/06/2021, 3:22 PM
    I think the redirectTo URL has be defined in the supabase settings as well - I had the same question a couple of weeks ago, but I can't remember 🙈
  • w

    wiesson

    12/06/2021, 3:24 PM
    Is it possible that postgres uses
    snake_case
    and from postgrest onwards I can receive
    camelCase
    ? I'm migrating a huge website/app and we are coming from firestore / firebase and everything is based on
    camelCase
    but as far as I know, postgres works best with snake case due to various reasons
  • s

    SETY

    12/06/2021, 4:18 PM
    If i am inserting/upserting with a default primary key
  • s

    SETY

    12/06/2021, 4:18 PM
    do I want to leave it out of the object, or assign it to null
  • s

    SETY

    12/06/2021, 4:18 PM
    Using supabase-js
  • s

    Scott P

    12/06/2021, 4:25 PM
    Default value on a column = the value that will be set if not provided when updating or inserting a record
  • s

    SETY

    12/06/2021, 4:49 PM
    appreciate it
  • j

    Jer

    12/06/2021, 5:08 PM
    Thanks, i’ve defined it there as well, and no luck 😩
  • r

    RB_Gaura

    12/06/2021, 5:28 PM
    how do I do a text search in JS like this:
  • r

    RB_Gaura

    12/06/2021, 5:28 PM
    How would I concat the columns in the textSearch function?
  • k

    KailiKameoka

    12/06/2021, 6:10 PM
    I don’t understand how to use the real-time subscription in react. I copied the examples from the docs into a function that gets called in useEffect. It doesn’t seem to be using the callback.
    w
    k
    s
    • 4
    • 15
  • s

    Scott P

    12/06/2021, 6:38 PM
    React realtime
  • j

    jaded

    12/08/2021, 1:54 PM
    hey team, just want to ask if anyone has any good learning material for implementing google oauth with supabase on reactjs? i have no idea where to start. would love to find an example that has something end to end. thank you
  • m

    Midas

    12/08/2021, 4:03 PM
    Help with real-time subscription in React
    g
    • 2
    • 6
  • j

    jonny

    12/08/2021, 6:03 PM
    Real-time and react
  • m

    Mihai

    12/09/2021, 12:31 PM
    Hello, what's a good way to way to implement realtime subscriber with React ? I'm using on the useEffect with cleanup once the component is removed from the dom, sometimes it works sometimes it fails to change the state. Any docs & tips ? I can see the payload coming in on the websocket from the [network] tab, but the code isn't updating nor do something..
    g
    • 2
    • 3
  • m

    Mihai

    12/09/2021, 1:09 PM
    Realtime cold start?
  • w

    wiesson

    12/09/2021, 2:55 PM
    I'm wondering how I can apply filters to a subscription? For example, I'd like to subscribe to the users profile and not to all profiles at once
  • w

    wiesson

    12/09/2021, 2:59 PM
    Are subscriptions all or nothing?
  • a

    anothercoder

    12/09/2021, 4:03 PM
    https://supabase.com/docs/reference/javascript/subscribe#listening-to-row-level-changes
  • w

    wiesson

    12/09/2021, 4:59 PM
    ok, I missed the last part - thank you! // edit: works perfectly 👌
  • f

    fayaz

    12/10/2021, 7:49 AM
    How do you authenticate a user on your server via the auth token? Couldnt find this in the docs.
  • a

    anothercoder

    12/10/2021, 9:04 AM
    https://github.com/supabase/supabase/discussions/2873
  • m

    Martin INDIE MAKERS

    12/10/2021, 1:30 PM
    There is the doc : https://supabase.com/docs/reference/javascript/auth-api-getuser
  • g

    Geoffrey

    12/11/2021, 9:18 PM
    Is there a way to redirect on the index page when you're not logged in? (using Next.js and getServerSideProps). I can manage to make it work for any page apart from the index page. When I reach getServerSideProps the token is not there yet causing the a redirect back to /login and thus breaking my login flow.
1...353637...81Latest