Skip to content

Conversation

stenlan
Copy link

@stenlan stenlan commented Sep 30, 2025

What kind of change does this PR introduce?

Introduces a way to pass options to the PostgrestQueryBuilder instance on a per-request basis.

What is the current behavior?

There is no way to specify per-request options currently.
#438

What is the new behavior?

An optional parameter is introduced that can be passed to the .from method, where users can optionally specify custom fetch and headers options.

Additional context

This is a supporting PR for supabase/postgrest-js#648 that updates the method signature in the @supabase/supabase-js package.

@stenlan stenlan changed the title Feat/expose postgrest query builder options Expose query builder options to .from method Sep 30, 2025
@mandarini
Copy link
Contributor

Hi @stenlan ! Thank you very much for your contribution. Can you please import your changes from this PR here, and make the changes needed in the new monorepo? I will be archiving the old repos soon. You will still be able to view the PR content, don't worry.

I understand that this may be frustrating, but thank you very much for your time and contribution!

@stenlan stenlan force-pushed the feat/expose-postgrest-query-builder-options branch from 14bc550 to 59a5899 Compare October 13, 2025 10:52
@stenlan stenlan requested review from a team as code owners October 13, 2025 10:52
@stenlan stenlan requested review from a team as code owners October 13, 2025 11:02
@stenlan
Copy link
Author

stenlan commented Oct 13, 2025

Thank you @mandarini for the response. I have integrated the changes into the new monorepo structure to the best of my ability, but because of time constraints I have not yet been able to successfully set up the monorepo locally. For some reason, in packages/core/supabase-js, it seems to not be able to resolve an entirely unrelated package @supabase/storage-js, nor can it resolve the PostgrestQueryBuilderOptions that I have added to @supabase/postgrest-js anymore, since it seems to be using a different version of this package, even if I set up a local file link to the package. Are there any specific environment setup instructions I should be following?

"@supabase/postgrest-js": "*",
"@supabase/realtime-js": "*",
"@supabase/storage-js": "*",
"@supabase/node-fetch": "2.6.15"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please revert changes to package.json

"@supabase/auth-js": "*",
"@supabase/functions-js": "*",
"@supabase/node-fetch": "2.6.15",
"@supabase/postgrest-js": "*",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please revert this change

@mandarini
Copy link
Contributor

@stenlan thank you for your contribution! Nothing special is needed to set up your local environment. Did you go through our contributing guide? Just clone the repo, run npm i and it should work out of the box. Is this not your experience? What errors are you seeing? Can you share some logs?

@mandarini mandarini added the postgrest-js Related to the postgrest-js library. label Oct 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

postgrest-js Related to the postgrest-js library.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants