Skip to content

Dynamic /defaultConnection route handler #1674

Description

@kmcginnes

Parent PRD

#1670

What to build

Replace the express.static("/defaultConnection", ...) mount with a GET /defaultConnection route handler that returns in-memory computed default connection data as JSON. This eliminates the need for process-environment.sh to write defaultConnection.json to disk.

The route handler:

  • Computes the default connection data from the resolved configuration pipeline (TypeScript configuration pipeline replacing process-environment.sh #1673)
  • Returns the same JSON shape and field names as today (GRAPH_EXP_PUBLIC_OR_PROXY_ENDPOINT, GRAPH_EXP_SERVICE_TYPE, GRAPH_EXP_GRAPH_TYPE, GRAPH_EXP_USING_PROXY_SERVER, GRAPH_EXP_IAM, GRAPH_EXP_CONNECTION_URL, GRAPH_EXP_AWS_REGION, GRAPH_EXP_FETCH_REQUEST_TIMEOUT, GRAPH_EXP_NODE_EXPANSION_LIMIT)
  • Returns 404 if no default connection is configured (no PUBLIC_OR_PROXY_ENDPOINT)
  • Conditionally includes GRAPH_EXP_GRAPH_TYPE only when explicitly provided or auto-detected for neptune-graph (preserving current behavior where omission causes the client to create one connection per query engine)

Refer to the "Default Connection Endpoint" section of #1670 for details.

Acceptance criteria

  • GET /defaultConnection returns JSON with the same shape as the current defaultConnection.json
  • All documented fields are included (including GRAPH_EXP_FETCH_REQUEST_TIMEOUT and GRAPH_EXP_NODE_EXPANSION_LIMIT)
  • GRAPH_EXP_GRAPH_TYPE is conditionally included (omitted when not set, auto-detected for neptune-graph)
  • Returns 404 when no default connection is configured
  • No file is written to disk
  • Existing client-side defaultConnection.ts fetching works without changes
  • Unit tests cover: all fields present, conditional GRAPH_TYPE, neptune-graph auto-detection, 404 case

Blocked by

User stories addressed

  • User story 1
  • User story 2
  • User story 3
  • User story 10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestinfrastructureIssues related to tooling or deployment

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions