-
Notifications
You must be signed in to change notification settings - Fork 83
Open
Description
Problem
The client-side TypeScript interfaces define MongoDB document fields as , but MongoDB typically returns ObjectId objects unless explicitly stringified on the server side. This creates a type safety gap that could lead to runtime issues.
Affected Files
components/webui/client/src/pages/SearchPage/SearchResults/SearchResultsTable/Presto/PrestoResultsVirtualTable/typings.tscomponents/webui/client/src/pages/SearchPage/SearchResults/SearchResultsTable/SearchResultsVirtualTable/typings.tsxcomponents/webui/client/src/typings/query.ts
Potential Solutions
- Server-side approach: Ensure MongoDB ObjectIds are stringified before sending to client
- Client-side approach: Update TypeScript interfaces to accept both string and ObjectId shapes (e.g.,
string | { $oid: string }), then normalize at usage sites
Context
This issue was identified during code review of PR #1179 where new Presto search results functionality uses MongoDB collections.
Backlinks:
Metadata
Metadata
Assignees
Labels
No labels