prime-simplereport icon indicating copy to clipboard operation
prime-simplereport copied to clipboard

Correct GraphQL schema drift for backwards-compatible multiple emails work

Open nathancrtr opened this issue 4 years ago • 0 comments

Description

SimpleReport engineers take care to preserve the backwards-compatibility of the GraphQL schema and the data model, as we currently cannot guarantee that the backend will not receive requests from an older, locally-cached version of the React application. To facilitate this, the work to allow for multiple patient emails added some "bridge" code to properly handle various forms and shapes of data coming in to the resolvers. Once we feel comfortable that the server is no longer receiving requests from an old version of the app, this code can and should be removed.

Acceptance Criteria

  • Ensure the patient.emails column is the source of truth for all patient email data
  • The email column should no longer be read from or written to by the application

Dev Approach

  • Migration to remove patient.email column
    • Maybe - let's talk about this
  • Remove PatientEmailsHolder class
    • Use emails directly in the patient add/edit mutation resolvers
  • Remove references to patient email from frontend code
    • [ETA - this may happen in #1951]

nathancrtr avatar Nov 15 '21 22:11 nathancrtr