Sjip 1593 project es source in graphql hits - #269
Merged
evans-g-crsj merged 2 commits intoAug 17, 2026
Conversation
graphql ships parallel CJS/ESM builds and declares no `exports` map, so Vite resolves `module` (index.mjs) while node resolves `main` (index.js) for any externalized dep — graphql-type-json, @graphql-tools/schema. Tests that build a schema then fail with "Cannot use GraphQLObjectType ... from another module or realm". Alias graphql to index.js so tests run against the same copy node loads at runtime. Test-only: vitest.config.ts is not read by `npm run build`. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Creating a saved set above ~10k participants failed with: The content length (538859008) is bigger than the maximum allowed string (536870888) The hits resolver searched ES without `_source`, so ES returned whole documents however few fields the query selected. /sets asks for a single field (the id) across MAX_SET_CONTENT_SIZE=10000 hits; at ~52KB per participant_centric document that is a 514MB response, which the ES client aborts on because it exceeds node's max string length. This restores behaviour the post-arranger rewrite dropped, rather than adding an optimization: @arranger/mapping-utils@2.19.4 resolveHits projected `_source` from the selection set (the top-level keys of edges.node). Same depth-1 rule here — projecting to leaves would break a nested `total`, which resolveNested derives from the array length. `_source` was not expressible on EsSearchParams before, hence the client changes. Also fixes PUT /sets/:setId, and stops every FE table query from fetching whole documents. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
celinepelletier
approved these changes
Aug 17, 2026
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.
No description provided.