Conversation
Reads whose URL would exceed the gateway's ~8 KB request-line limit (414 URI Too Long) now split their largest top-level IN list into chunks that each fit, fetched with bounded concurrency and concatenated. Adds a `maxUrlLength` collection option (defaults to the client's `urlLengthLimit`, 8000). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Replace the `maxUrlLength` collection option with a fixed `MAX_URL_LENGTH = 8000`, matching postgrest-js's `urlLengthLimit` default. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Large `inArray` filters (e.g. from lazy joins on on-demand collections) produced URLs past the Supabase gateway's ~8 KB limit and failed with 414 URI Too Long; reads now split the largest top-level `IN` list into chunks whose rendered URL fits a fixed 8000-character budget (`MAX_URL_LENGTH`, matching postgrest-js's `urlLengthLimit` default), fetch them with up to 6 in parallel (aborting siblings on the first failure), and concatenate the results under the same query key. Subsets that already fit send a byte-identical URL, `not in`/OR-nested `IN` are never split, limit/offset windows fetch a safe superset, and two huge `IN` lists are balanced by halving the next-largest one. The behaviour is documented in the README. Covered by unit tests for the splitter and the fan-out plus e2e tests showing the raw request 414s on the local stack while the same filter loads fully through a collection.
🤖 Generated with Claude Code