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

    Flyken

    07/27/2021, 8:38 PM
    its adding to the state
  • f

    frubalu

    07/27/2021, 8:38 PM
    then however you're adding it to state is incorrect
  • f

    Flyken

    07/27/2021, 8:38 PM
    Copy code
    setGames(prev => [...prev, game.games])
  • f

    frubalu

    07/27/2021, 8:38 PM
    ah, does game.games give you an array of games?
  • f

    Flyken

    07/27/2021, 8:39 PM
    yea
  • f

    frubalu

    07/27/2021, 8:39 PM
    ok so you'd probably just do
    setGames(games)
    for that one
  • f

    Flyken

    07/27/2021, 8:39 PM
    or no
  • f

    Flyken

    07/27/2021, 8:39 PM
    it returns each object alone
  • f

    frubalu

    07/27/2021, 8:39 PM
    and whenever you click the button to add a new one, you'd do
    setGames(prev => [...prev, game.games])
  • f

    Flyken

    07/27/2021, 8:39 PM
    thats
    game.games
  • f

    frubalu

    07/27/2021, 8:42 PM
    honestly this is all react stuff, not supabase
  • s

    Scott P

    07/27/2021, 8:45 PM
    At this point, it might be easier to consider writing a postgres function in SQL and using the
    .rpc()
    method to run it. I'm not personally convinced it's supposed to be bringing back individual objects instead of an array of objects.
  • f

    Flyken

    07/27/2021, 8:47 PM
    ;_;
  • f

    Flyken

    07/27/2021, 8:47 PM
    i don't know this stuff
  • f

    Flyken

    07/27/2021, 8:47 PM
    never had to work with sql plain like this
  • f

    frubalu

    07/27/2021, 8:48 PM
    you're not really needing to write any sql, i think there are just some small React-specific issues going on here
  • f

    Flyken

    07/27/2021, 8:49 PM
    i meant the whole rpc thing
  • s

    Scott P

    07/27/2021, 8:49 PM
    rpc calls still return json
  • f

    Flyken

    07/27/2021, 8:49 PM
    man...
  • f

    Flyken

    07/27/2021, 8:50 PM
    idk how to go about this man
  • f

    frubalu

    07/27/2021, 8:50 PM
    is this repo public? i can take about 15 min to iron out whatever's going on here
  • f

    frubalu

    07/27/2021, 8:50 PM
    and we can privately chat since we're choking up the help channel haha
  • u

    user

    07/27/2021, 9:08 PM
    How can i set the database to allow multiple Sessions at once?
  • w

    wmd

    07/27/2021, 9:18 PM
    Sorry, wrong server lmao
  • u

    user

    07/27/2021, 9:20 PM
    huh?
  • g

    grosse_tortue

    07/27/2021, 11:09 PM
    From the documentation (https://supabase.io/docs/guides/auth#how-it-works): "Every request to your database also sends the JWT."
  • g

    grosse_tortue

    07/27/2021, 11:09 PM
    Would it be possible to provide our own JWT instead? And how would I go and consume it from a stored procedure/function? I need this as I want to use RLS with an auth provider that isn't natively supported by Supabase.
  • g

    grosse_tortue

    07/27/2021, 11:10 PM
    Any help would be highly appreciated.
  • f

    Flyken

    07/27/2021, 11:11 PM
    goto authentication, settings, scroll down
  • f

    Flyken

    07/27/2021, 11:11 PM
    or sorry hold on
1...111213...316Latest