aws / aws/graph-explorer

Migration CLI tool for old config to new format

Open
#1,667 0 comments 0 reactions 0 assignees View on GitHub
enhancement fundamental infrastructure
Dominant language
TypeScript
Stars
481
Forks
108
Avg merge
6d 8h
Merged PRs (30d)
5

Description

## Parent PRD

#1660

## What to build

Create a `pnpm migrate-config` script that reads the old configuration files (`.env`, `config.json`, `defaultConnection.json`) and generates a `graph-explorer.config.json` in the new format.

The tool should handle all old env var names and map them to the new config structure: `PUBLIC_OR_PROXY_ENDPOINT` / `GRAPH_CONNECTION_URL` → connection url, `GRAPH_TYPE` → queryEngine, `IAM` + `AWS_REGION` + `SERVICE_TYPE` → authentication block, `PROXY_SERVER_HTTPS_CONNECTION` → server.tls, port mappings, log level/style mappings.

## Acceptance criteria

- [ ] `pnpm migrate-config` reads old `.env` and/or `config.json` and/or `defaultConnection.json`
- [ ] Outputs a valid `graph-explorer.config.json` in the new schema
- [ ] Maps all old env var names to new config fields
- [ ] Handles partial old configs gracefully (missing fields get defaults)
- [ ] Prints a summary of what was migrated
- [ ] Unit tests covering various old config combinations

## Blocked by

- Blocked by #1661

## User stories addressed

- User story 12

## Related Issues

- Part of #1660

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.