Apollo Federation - Best practice for publishing multiple subgraphs with breaking changes

Let’s say I’m moving an entity from subgraph A to subgraph B, but subgraph A still references this entity. This is a breaking change.

Currently I’m publishing the two subgraphs in parallel. It does work but the output of the console can be disturbing since the first publish will result in composition error (but the second publish will fix them and update the gateway). So the user will see an error in the console.

Is there any best practice concerning the publishing of multiple subgraphs?

Take a look at the Migrating entities and fields docs. It has a very good example of entity migration from one sub-graph to another.

Thanks for the link!

However I think my use case is a bit more complex: service A will be still responsible for a few fields of the entity which is moved. So I can’t simply replicate all the resolvers and the schema in service B, then publish + deploy service B, then remove then entity from service A as indicated in the doc.

I think I could resolve all possible fields in service B, publish and deploy it and then implement the remaining fields in service A and replace type Entity by extend type Entity in service A. But this migration seems quite complex to me, I wonder if I’m following the best practices here.