Skip to content

Instantly share code, notes, and snippets.

@ashmita222
ashmita222 / index.js
Last active November 4, 2025 08:02
new migration gist
// Hasura GraphQL → GraphQL-only migration (no SQL, no Express)
// Run locally for 1–2 users first.
// Usage examples:
// node src/index.js --phone='+91 7002720067' # dry-run
// node src/index.js --phone='+91 7002720067' --apply # commit writes
// node src/index.js --csv=users.csv --limit=2 --apply
//
// Flags:
// --retries=3 max attempts for transient failures (default 3)
// --retry-wait=1200 base wait in ms before retry (default 1200)
// Hasura GraphQL → GraphQL-only migration (no SQL, no Express)
// Run locally for 1–2 users first.
// Usage examples:
// node src/index.js --phone=+911111111111 # dry-run
// node src/index.js --phone=+911111111111 --apply # commit writes
// node src/index.js --csv=users.csv --limit=2 --apply
//
// Flags:
// --verbose include detailed 'debug' breakdown in output JSON
// --sample=5 limit debug arrays to first N items (default 5)