supabase / postgrest-js

Isomorphic JavaScript client for PostgREST.
https://supabase.com
MIT License
1.03k stars 133 forks source link

fix: add link on how to enable explain on the explain() method #507

Closed dshukertjr closed 8 months ago

dshukertjr commented 10 months ago

What kind of change does this PR introduce?

Thought it would be helpful to include a link on how to enable the explain() feature on the method itself so that people know how to enable it.

soedirgo commented 10 months ago

Let's put this in Supabase docs instead - it's a bit odd to have Supabase-specific instructions in postgrest-js

dshukertjr commented 10 months ago

@soedirgo Sure, but do people use this library out side of Supabase's context though? Or do we have any plans of promoting postgrest-js to the general PostgREST community?

I personally would find it helpful if the IDE told me that this method doesn't work unless I take specific actions when I hover over it.

Screenshot 2023-11-28 at 17 30 05
soedirgo commented 8 months ago

We do promote it as a standalone library: https://postgrest.org/en/stable/ecosystem.html#client-side-libraries

While there's merit to only sanctioning the hosted platform (less environments to maintain), we've committed to making sure each service works on its own, and this runs counter to that. E.g. this wouldn't help people using the library on a self-hosted setup (they may need to update the Compose file instead), or local development via Supabase CLI (they may need to update supabase/config.toml).

But I agree, the tradeoff is that the advice is not front and center. Alternatively we can update the docs page to show how to enable .explain() on all environments.

dshukertjr commented 8 months ago

Sounds good. I will close this one!

soedirgo commented 8 months ago

Sorry, I sent that too quick 😬 Since the docs page is already not Supabase specific, we can change the language to make it not Supabase-specific, e.g. "you need to set pgrst.db_plan_enabled to 'true'", since the steps in the docs page also applies for a generic PostgREST setup

dshukertjr commented 8 months ago

That makes sense. Let me update it real quick now

github-actions[bot] commented 8 months ago

:tada: This PR is included in version 1.9.1 :tada:

The release is available on:

Your semantic-release bot :package::rocket: