https://supabase.com/ logo
Join Discord
Powered by
# off-topic
  • m

    MDobs

    11/21/2022, 7:12 AM
    Anyone else having issues with insert returning values (data and error are both null) on a simple INSERT (JS SDK)? We've been having these since last week but now it happens on a new project as well (new supabase account, project, table)
  • k

    konga

    11/21/2022, 7:57 AM
    With supabase v2 you need to append a
    .select()
    on insert now
  • k

    konga

    11/21/2022, 7:57 AM
    https://supabase.com/docs/reference/javascript/insert#create-a-record-and-return-it
  • k

    konga

    11/21/2022, 7:59 AM
    error should return null on a successful insert. There's not a real need to return data on insert because you just sent that data to the database.
  • m

    MDobs

    11/21/2022, 8:03 AM
    ok I'll try it out, well there is need if you want to know the assigned row id so you can keep track of the data
  • k

    konga

    11/21/2022, 8:06 AM
    True, I guess I should reword it and say there are certain scenarios where you don't need the data back.
  • k

    konga

    11/21/2022, 8:06 AM
    supabase-js v1 would just automatically append a select on an insert command. supabase-js v2 gives you the option to not include it
  • m

    MDobs

    11/21/2022, 8:08 AM
    got it! Thanks so much, ye the data return successfully now
  • m

    MDobs

    11/21/2022, 9:12 AM
    this code on the user management API (api?page=users) documentation
    Copy code
    let { user, error } = await supabase.auth.signUp({
      email: 'someone@email.com',
      password: 'LHVsQdmiqqmfyGAJgGfx'
    })
    user
    is not correct, it should be
    data
  • s

    silentworks

    11/21/2022, 9:45 AM
    Send pull request 😆, If not I'll get it updated soon.
  • s

    silentworks

    11/21/2022, 9:47 AM
    Oh wait you are talking about the API docs in the Supabase Dashboard, ok I will raise it with the team, I think this issue floated around in our discussions last week and will be resolved soon.
  • c

    chuwai

    11/21/2022, 2:15 PM
    Is there a native way of preventing the supabase domain from being exposed to client? or perhaps other means to secure it ? (sorry for some reason i couldnt post on #1006358244786196510
    g
    • 2
    • 1
  • q

    quentin_guerrier

    11/21/2022, 4:28 PM
    Hello, i hope you all are good. I use supabase for my startup up and i need help where i can ask ? 🙂 thanks
    g
    • 2
    • 1
  • g

    garyaustin

    11/21/2022, 5:05 PM
    Hello i hope you all are good I use
  • g

    garyaustin

    11/21/2022, 5:08 PM
    Is there a native way of preventing the
  • a

    Anurag

    11/21/2022, 6:44 PM
    oops! the css on the docs website is broken
  • c

    caseycrogers

    11/21/2022, 7:06 PM
    Just bumped
    supabase_flutter
    from v
    1.0.1
    to
    1.2.0
    . Generally I'm super happy with the work you guys are doing, so I don't want this to come off too critical, just throwing in some customer feedback: I really really really don't like the change where
    select
    now takes type parameters. It makes the API extremely kludgy to use. If you want to give users the flexibility to pick the return format, maybe have a private method that takes type parameters and then a series of public methods that are just thin wrappers on top of the private function? like
    selectRows()
    ,
    selectResponse
    etc. or accomplish the same with a default
    select
    behavior and then a series of modifiers to get the non-default behavior:
    select().asRows()
    ,
    select().asResponse()
    etc
  • c

    caseycrogers

    11/21/2022, 7:09 PM
    generally, I think these are two really important rules of thumb for good APIs: 1. Improper input should produce static analysis errors, NOT runtime 2. Your IDEs autocomplete should be able to suggest all the valid options while you're typing The new type parameter system violates both of the rules above.
  • c

    caseycrogers

    11/21/2022, 7:12 PM
    Looking more closely, I see that the type parameters are optional and all they do is cast the result rather than affecting the return logic. This is still very suboptimal because, if you're using strong dart analysis options, not specifying a generic is a static analysis error.
  • c

    caseycrogers

    11/21/2022, 7:15 PM
    actually, more to the point, maybe this type parameter should just be moved to
    withConverter
    ?
  • v

    Vinzent

    11/21/2022, 7:36 PM
    I agree with you. We could definitely have done that better. But we missed this in the dev version and I couldn't find a great way without a breaking change. The optional generics are now a compromise without a breaking change. There are many different return values for
    select
    , select with count or force response, single and maybeSingle. The first thing I want to improve in v2.
  • c

    caseycrogers

    11/21/2022, 7:37 PM
    makes sense, do you guys have any current proposals for the v2 API?
    v
    t
    • 3
    • 42
  • s

    silentworks

    11/21/2022, 10:52 PM
    I've opened a PR to fix this, so hopefully this will be resolved soon.
  • p

    PSully

    11/22/2022, 5:33 AM
    Does anyone happen to know where I can find some docs on error handling? For the life of me, I can't seem to find anything. For example, just finding examples of telling the user their login credentials are incorrect. (Other than checking for just a general 400)
  • p

    PSully

    11/22/2022, 5:35 AM
    Actually, taking random stabs, I was just able to do
    error.message
    , but docs would still be nice if anyone has a link. 😅
  • o

    Olyno

    11/22/2022, 2:30 PM
    You can find details about an error in the dashboard
  • k

    Kamaelæ„›

    11/22/2022, 5:17 PM
    hi, why is my project always like this?
  • o

    Olyno

    11/22/2022, 5:26 PM
    Hi If this problem persists after some time, please contact the support: https://app.supabase.io/support/new
  • k

    Kamaelæ„›

    11/22/2022, 5:32 PM
    Thanks! I restarted my project and it's back to normal now but I contacted support since this happened multiple times in the past couple of days.
  • k

    Kamaelæ„›

    11/22/2022, 7:13 PM
    Hi, got a reply that im hitting my free tier limits, decided to go pro. How long will my db will be down for the upgrades? @Olyno
1...297298299...392Latest