Dozens of services changing contract, with the frontend in production.
A private healthcare network
Healthcare · API migration · Strangler fig · Serverless
A private healthcare network has dozens of REST microservices and a frontend, website and online booking, that depends on their contracts. The technical leadership chose GraphQL as the common layer between applications. The move had to happen with the service live, without rewriting the interfaces and without changing a single answer patients see.
A serverless Node gateway acts as the translation layer. Every handler was ported one to one with parity tests, the ERP integration is governed by a switch, and token signatures moved to asymmetric keys during review.
- 1:1
- handlers ported with parity verified on behaviour
- 0
- changes required to the frontend during the migration
- RS256
- token signatures moved to asymmetric keys in review
The context
Over the years the platform became distributed: a Laravel core governing registries and bookings, a serverless proxy exposing data to applications, micro-frontends for calendar and online booking, dedicated services for reports, consents and tickets. Many of them speak REST with their own contracts, and the frontend knows each one.
Moving everything onto a common GraphQL schema makes life simpler for whoever builds new applications. But if the frontend had to change together with the services, every migration would become a coordinated release across several teams, with the risk concentrated on one day.
The constraint
Three things could not break: online booking, report consultation and the patients' privacy area. For each, the frontend had to receive the same answers as before, including error codes and edge cases, such as a 404 on a non-existent availability or a retry that spans several weeks.
On top of that, part of the doctors' onboarding flow wrote to an ERP through a Laravel 7 application with dependencies locked for two years. The ERP itself was changing, and those writes had to be switchable off in a controlled way without stopping the rest of the process.
The decision
We adopted the strangler fig pattern with an anti-corruption layer: a serverless Node gateway exposing to the frontend the contract it already knows and, behind it, resolving against the new GraphQL schema. The frontend keeps calling what it called; what changes is who answers.
The rule for every handler was to port the logic one to one, without reasoning about what to improve during the transport. Improvements are a later job, with the old already switched off. Even the multi-week retry of the availability search was replicated as is, because the visible behaviour was part of the contract.
For the ERP the decision was an explicit switch: with writes disabled, the process still completes document verification and archiving and emails the people who handle the case by hand. The flow degrades legibly instead of failing.
The intervention
First the gateway's base layer, so the internal team could add endpoints without reopening the architecture: serverless structure, resolvers, structured logging with context, token refresh handling with backoff, propagation of application errors from services to the frontend. Then migration by domain: consents and report archive, then availability search and booking.
Every domain went through rounds of cross-review. One of them found that a handler migrated in parity was signing tokens with a symmetric key: it was corrected to asymmetric keys and secrets moved from code to configuration, within the environment's limits. Another clarified the resource cache logic on Redis and the order in which keys are looked up before querying the core.
On the ERP side, the map of every integration in the onboarding flow was written before touching the code. From that map, the controlled shutdown: document verification and archiving on S3 continue, writes toward the ERP stop behind the flag, and the customer code the ERP used to generate is supplied by hand together with the data. It is system integration and serverless infrastructure work at once.
FRONTEND → GATEWAY (contratto invariato) → SCHEMA GRAPHQL → SERVIZI · CORE · ERP (interruttore)
The result
The migration proceeds by domain and the service has never stopped. The frontend required no changes; the client's team adds new endpoints on the architecture we set up, with the same structure for each. Token signatures moved to asymmetric keys during review, before reaching production.
The ERP integration can be switched off and on with a variable, and when it is off the right people receive what they need to finish the case by hand. No process was left hanging on a system in transition.
After the release
With the gateway standing, each next domain costs less than the previous one: the structure is the same, only the resolvers change. The old proxy switches off one handler at a time. The work belongs to our healthcare sector, where continuity of service decides the architecture.
Inside an ecosystem of forty microservices →Describe the system. We'll tell you what we see.
Ten minutes, one question at a time. At the end, our honest read of the case. It's the filter, before the call.