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

    Yonben

    02/21/2022, 10:37 PM
    Join tables query
  • a

    anonaki

    02/22/2022, 2:02 AM
    With Supabase Realtime I noticed that the object reflecting the change has all of the fields available under the "new" property, but under the "old" property it only shows the primary key. Is it possible to configure the "old" property to return more fields? This would be good to be able to compare old and new fields without having to do another lookup.
  • a

    anonaki

    02/22/2022, 2:11 AM
    I was able to find that the table must have replica identity full to return all the rows.
  • s

    statico

    02/22/2022, 6:10 PM
    is anyone using
    react-supabase
    or
    use-supabase
    ?
  • j

    JeyJey

    02/22/2022, 9:58 PM
    Hi all i was wondering if there is a way on react/react-native to check when the jwt token/session expires and if there is an event supabase may raise?
  • i

    its-pablo

    02/22/2022, 11:35 PM
    hello, i removed import but im not sure why it still isn't working? could you please take a look
    g
    • 2
    • 3
  • s

    Scott P

    02/22/2022, 11:46 PM
    https://supabase.com/docs/reference/javascript/auth-onauthstatechange
  • j

    JeyJey

    02/22/2022, 11:47 PM
    Hi Scott, this only handles token refresh but doesn't listen to Token Expired specifically. I have to do really weird logic in order sign out
  • g

    garyaustin

    02/22/2022, 11:52 PM
    cdn supabase
  • t

    TitusTetricus

    02/24/2022, 8:15 PM
    Hi all. New to Supabase, and working in a Svelte site. Maybe a silly question, but I can't find much online. I have a database table with 1 row in it. When I use the client as they explain in the documentation, I can see the hit to the API, and it returns a 200, but it is an empty array. I've tried just returning all rows, i.e. no user_id filter or anything, and I get the same. The code is below if that helps.
    Copy code
    let { data: parameters, error, status } = await supabase
            .from('parameters')
            .select(`*`)
            .eq('user_id', user.id);
    Any help as to what I am missing here? Hitting the API directly via Postman does not return the single record either. Thanks.
    g
    • 2
    • 2
  • g

    garyaustin

    02/24/2022, 9:24 PM
    200 with no data on select
  • s

    ShooTeX

    02/26/2022, 11:13 PM
    did you solve your problem? having the same issue
  • s

    ShooTeX

    02/26/2022, 11:18 PM
    can anyone help? trying to use subscription in vanilla nodejs, status is subscribed and replication is enabled for all tables, subscription status is subscribed but i don't get any updates
    Copy code
    supabase
        .from("*")
        .on("*", (payload) => {
          console.log("change", payload)
        })
        .subscribe(console.log)
        .onError((e) => console.log("error", e))
    g
    • 2
    • 90
  • g

    garyaustin

    02/26/2022, 11:46 PM
    realtime node.js
  • r

    RyanHirsch

    02/27/2022, 3:50 AM
    I just gave up and spun up a local redis instance 😦 I was also using prisma and ran all the generated migrations manually.
  • t

    ThomasLeveque

    02/27/2022, 8:53 AM
    Hi guys, Given the following select
    Copy code
    select(
    `
        *,
        votesCount:votes(count)
      `)
    where i get the count of a relational table
    votes
    . Do you know if it is possible to order my result based on
    votesCount
    ? something like this
    order('votesCount', { ascending: false })
    (not working) I have also tried
    order('count', { ascending: false, foreignTable: 'votesCount' })
    (the query is working but northing is ordered)
  • y

    Yeehawlerz101

    02/27/2022, 2:54 PM
    Hey there I'm having issues where I query the db and the data is coming back as an anonymous array
  • g

    garyaustin

    02/27/2022, 3:35 PM
    Not sure what you are saying is the issue. data is an array back from Supabase select whether 0,1 or more items.
    y
    • 2
    • 18
  • g

    garyaustin

    02/27/2022, 3:34 PM
    Query returning anonymous array
  • a

    alxndr

    02/27/2022, 6:10 PM
    Hey all! I'm looking for a way to run a search against a jsonb column, anyone know how to do this? My code so far:
    await supabase.from("posts").select("*").textSearch("title, description, info", searchValues)
    The issue is that
    info
    is a jsonb column and the returned results do not match on any of the strings in that column, anyone know how I can achieve this? Specifically, I want to match on the values, not the keys. So for example, info might have an object like:
    { topic: "postgres" }
    and I'd like for this row to be returned if the provided
    searchValues
    string contains
    "postgres"
    I've been reading about how to create another column on the table that is a concatenation of other columns to run text search against that column, but so far haven't been able to figure out the syntax to do this with a jsonb column, but I was able to create one from other column types be it text or enum, for example, open to a solution like that as well. Thanks in advance!
  • c

    cbert

    02/27/2022, 8:51 PM
    Hi everyone, does anyone know if it is possible to send data to the invite email template when using inviteUserByEmail (https://supabase.com/docs/reference/javascript/auth-api-inviteuserbyemail)? If so how do I access the variables in the template on supabase? Already tried to pass it via the options/data, but can't get it to work. Thanks!
    s
    • 2
    • 2
  • s

    silentworks

    02/27/2022, 9:42 PM
    Sending data in invite email
  • u

    2old4this

    02/27/2022, 11:04 PM
    Is there anyway that when a user clicks on their verify link, to either open or redirect back into the same tab, thats already open on a page?
    s
    • 2
    • 1
  • s

    silentworks

    02/28/2022, 9:47 AM
    Redirect to existing tab when verify link is clicked
  • c

    CHIΞFMCCONNΞLL.ΞTH

    02/28/2022, 8:17 PM
    gm
  • c

    CHIΞFMCCONNΞLL.ΞTH

    02/28/2022, 8:19 PM
    would anyone around have any insight into grabbing web3 wallet address and pushing it to supabase user account (essentially creating login/validate login with web3/metamask)? trying to do a simple web3 login capturing the walletaddress for each user and storing them in supabase rather than say email address. building in react-app
  • g

    garyaustin

    03/01/2022, 10:56 PM
    Not sure this is the level you are thinking about but some work in that area going on (if you mean a true web3 login process): https://github.com/supabase/gotrue/pull/282
  • c

    CHIΞFMCCONNΞLL.ΞTH

    03/01/2022, 11:23 PM
    sick! im thinking of the full monty level. using web3 wallets for "oauth" type logins.. and then validating off of the wallet addresses.. then making things "signable" for different actions on a page (signing with wallet to validate a form or to update a database) such that the signing is both written to the wallet and also stored maybe as a timestamped key in the base. Nice. i will take a look. thank you so much, I thought maybe I was talking to a crowd who hadn
  • c

    CHIΞFMCCONNΞLL.ΞTH

    03/01/2022, 11:23 PM
    t really thought about this
  • c

    CHIΞFMCCONNΞLL.ΞTH

    03/01/2022, 11:26 PM
    is there anything I should know as fundamental baselines when looking to build on this plugin? Haven't really done anything like this before. I assume it will be a plugin / addon and hopefully integrated into the app in the future. since web3 is the future
    g
    • 2
    • 5
1...495051...81Latest