Federated Field Migration with Apollo

Why?

  • Migrating data from one service to another with zero downtime
  • Possible examples:
    • moving passport numbers to a new service
    • moving customer to a new service
    • moving credits to a new service
    • etc. etc. etc.
  • This way we can keep the same GQL API and avoid creditsV2, creditsV3, ..., creditsV99 etc. 

Steps

  • Extend the original entity in the new service
  • Add a field resolver in the new service
  • Deploy the new service (schema update fails)
  • Remove the old field from the original service (schema will now update)

Code examples

Build log examples

Federated Field Migration in Apollo

By Alex Hughes

Federated Field Migration in Apollo

  • 63