generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 67
Open
Labels
reliabilityIssues relating to improvements in reliabilityIssues relating to improvements in reliabilityschemaIssues related to the schema definition or synchronizationIssues related to the schema definition or synchronization
Description
While investigating a user's schema sync issue I noticed some code that could use some cleaning up.
- Calls with
mode=detailedbut doesn't use extra fields - Does not validate response structure
- Performs unchecked property access on response
graph-explorer/packages/graph-explorer/src/connector/gremlin/gremlinExplorer.ts
Lines 47 to 69 in b099623
| async function fetchSummary( | |
| connection: NormalizedConnection, | |
| featureFlags: FeatureFlags, | |
| options?: RequestInit | |
| ) { | |
| try { | |
| const response = await fetchDatabaseRequest( | |
| connection, | |
| featureFlags, | |
| `${connection.url}/pg/statistics/summary?mode=detailed`, | |
| { | |
| method: "GET", | |
| ...options, | |
| } | |
| ); | |
| return response.payload.graphSummary as GraphSummary; | |
| } catch (error) { | |
| logger.error( | |
| "[Gremlin Explorer] Failed to gather summary statistics", | |
| error | |
| ); | |
| } | |
| } |
Metadata
Metadata
Assignees
Labels
reliabilityIssues relating to improvements in reliabilityIssues relating to improvements in reliabilityschemaIssues related to the schema definition or synchronizationIssues related to the schema definition or synchronization