prime-simplereport
prime-simplereport copied to clipboard
Correct GraphQL schema drift for backwards-compatible multiple emails work
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.emailscolumn is the source of truth for all patient email data - The
emailcolumn should no longer be read from or written to by the application
Dev Approach
- Migration to remove
patient.emailcolumn- Maybe - let's talk about this
- Remove
PatientEmailsHolderclass- Use
emailsdirectly in the patient add/edit mutation resolvers
- Use
- Remove references to patient
emailfrom frontend code- [ETA - this may happen in #1951]