Skip to content

QuestGiverOrg/TransferGraph

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Overview

TransferGraph is small node.js project to transfer data from one GraphQL instance to another.

You must have already migrated your schema to the new GraphQL instance before this will work.

THIS WILL CLOBBER DATA IN THE TARGET GRAPHQL INSTANCE

Before transfering in the data from the old GraphQL instance, it will clear the data in the new instance!

If your database is complicated, feel free to reimplement main.js with manual calls to clearTable() and transferTableData()

If you want to do a dry run, there is a variable called dryRun you can set to true(if someone wants to submit a PR to turn this into a cli option, please do)

Instructions

  1. back up your data by exporting a .json from every table in the hasura console
  2. run npm install
  3. fill out the .env-example
    1. Be VERY careful about getting this right
    2. Don't mix up the servers, you could destroy your old data
    3. Don't commit this file, you could leak your admin secrets
  4. rename .env-example to .env
  5. fill out the transfer-example.json while ensuring it is in the right order for your database
  6. rename transfer-example.json to transfer.json
  7. run npm run transfer

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published