Supabase.js (Bubble plugin)
  • Setup
    • Basic Setup
      • General notes on Bubble setup
    • Supabase Auth
      • Initializing Auth
      • How to: Login
      • How to: Sign Up
      • How to: MFA
      • Identity linking
    • Supabase Data
      • How to: Fetch Data
      • Data Realtime V2 (beta)
      • Foreign Table
      • How to: Create a Thing
      • How to: Update a thing
      • How to: Delete a thing
      • Data Realtime
      • Optimization Tips
      • Schema Validation
      • Create XML Sitemap
    • Supabase Storage
    • Supabase Realtime
    • Supabase Edge Functions
      • Basic Edge Function
      • Bubble Setup
Powered by GitBook
On this page
  1. Setup
  2. Supabase Data

Optimization Tips

PreviousData RealtimeNextSchema Validation

Last updated 1 year ago

When using the Supabase.js plugin, you can set it up in a way that you can specify what data you wish to return. By doing so you can greatly speed up Data retrieval and decrease bandwidth and cost.

Let's say we have an Admin to manage our blog posts. We'd like to create a Repeating Group to have an overview of our articles. Since we don't need every value for that we can setup the plugin to return only certain values:

With this setup we only return the data we actually want to use inside my repeating group, like title, unique_id, created_at, thumbnail. We can also return the referenced Category's name just to show it visually as well.

Once we have all this data, let's setup a workflow where if we click on one of the posts, it redirect us to another page or part of the app where we can actually edit all of the data of the single post.

Now that we only need to return a single post we can actually return all of the data like so:

Here we return all the fields of the post, and also all the fields for the related category. Make sure you've set it up properly the same with this .

guide