Hey guys, Just wanted to jump in here as I really like the discussion! I also use the API connector to some actions related to Supabase, mostly when I have a scheduled action on the backend. This plugin was mainly developed so that we can have a simple plug and play option, super fast data retrieval, and all the special thing you can do only with the Javascript SDK. I’ve also added some custom features, mostly for CSV upload and Realtime: Showing User’s online status and Showing Live Cursor on screen which works with Supabase Realtime but the rest is custom code, more unique things are in progress too.
I might be wrong but if you pass a header in the API connector (which supabase expects) it won’t run from the browser, but maybe I’m incorrect, let me know if that works too!
Hello, I did exactly as shown by @siddharth but I am getting getting which is fully blank only two brackets are returned. My database is all set and i triple checked the api connection. Any ideas ?
Did you disabled the RLS policy?
Go to your database> RLS policy and check if it’s disabled or not. If already disabled check if your table and cells are named in all small letters.
Hello there,
I reason for this is because the maximum amount of rows you can pull from Supabase at once is 1000. I am using Backendless, and it has a lower limit of 100. What we need to do is learn to use pagination. When you have more than 1000 rows you will need to make two api calls, one for first 1000 and another one for the last 108. Im still trying to figure this out but i believe when you make the first api call for supabase there should be a field called “page” or something. Could you check it out? Or does someone else can give a hando on this? since i am working out this too.
range=0-999 specifies the range of records to fetch in the current request. This fetches the first 1000 records (0-indexed) and limit=1000 specifies the max number of records to fetch in a single request.
Please try and let me know if it works
If 5k records we can use
rest/v1/table_name?range=0-4999&limit=5000
Also , However due to supabase in built limit we can also use Pagination Parameters
Record 0-999
rest/v1/table_name?range=0-999&limit=1000
Record 1000-1999
rest/v1/table_name?range=1000-1999&limit=1000
Request 3: Fetch records 2000-2999
rest/v1/table_name?range=2000-2999&limit=1000
And so on
Whether the SQL Connector or API Connector is better depends on your specific requirements. SQL Connector offers direct SQL database access, which can be beneficial for complex queries and data manipulation. But, using API might provide better abstraction and security, especially if you’re dealing with sensitive data.
Thank you so much for your breakdown. I’ve followed closely and everything is working, however, I can’t figure out how to upload files to Supabase. Were you able to figure this out?
Ensure that you have set up storage in your Supabase project. You can do this by navigating to the “Storage” tab in your Supabase dashboard and creating a new bucket if you haven’t already done so.
Method: POST
Endpoint: https://.supabase.co/storage/v1/object/
Body: Include the file data (e.g., binary data) as part of the request body, along with any metadata if required.