Closed txbrown closed 3 years ago
Can you check your supabase url? Your url must something like this: https://github.com/supabase/postgrest-go/issues/3#issuecomment-854105015
@yusufpapurcu thanks, that helped. however I still get no api key found error too. Would you be able to point me to documentation where I can read about these endpoints and how to communicate with the api e.g. with curl or insomnia for example?
Actually there is no referance that I can mention. I learned using API from debugging JS library. So we are working on other libraries (goTrue-Storage-Realtime) for provide support them in golang.
For now you can get api-key from js library's user object and you can use it.
I see. having had a look I also noticed that the headers need to be like
headers = map[string]string{"apikey": "<supaba_api_key>"}
Now the requests go through! However getting errors for non existing public relations "public.users does not exist".
I'll keep trying to reverse-engineer it for my needs and if I find useful things to document I'll report back. Thanks!
@txbrown Regarding returning an error. I did just submit PR #11 for Execute() to actually return errors when there are any
Bug report
Describe the bug
Following the test example and the supabase-js example in the documentation I am not able to fetch data using the
From().Select()
chain and an error is returned in the response body instead of the err value itself.The json response looks like:
To Reproduce
Expected behavior
Expected to have a valid user response and no error. Also expected error to be returned in err variable but instead it's nil.