You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(postgrest): expose query builder options to .from method
Reimplement the feature from scratch on latest master, addressing all
review feedback from mandarini:
1. PostgrestQueryBuilderOptions type added to postgrest-js with headers,
fetch, urlLengthLimit, and retry fields.
2. PostgrestClient.from() now accepts an optional options parameter.
Per-request headers are merged (request takes precedence), and
per-request fetch/retry/urlLengthLimit override client defaults.
3. SupabaseClient.from() forwards options to rest.from(), wrapping any
custom fetch with fetchWithAuth so auth headers are always injected.
A new options object is created to avoid mutating the caller's object.
4. mergeHeaders utility added for non-destructive header merging.
5. Tests cover: custom fetch usage, header precedence, auth injection,
retry override, and non-mutation of caller options.
Co-authored-by: stenlan <stenlan@users.noreply.github.com>
Closes#438
0 commit comments