First, some context.
We are migrating from a monolithic GraphQL backend built entirely on top of a third party CRM into private microservices with Apollo Federation. In the monolithic backend every entity has a unique identifier managed by the CRM. In our microservices we have our own identifier we are assigning to all of our entities, including those that are being migrated from the CRM, however we are also maintaining the CRM identifier alongside for historical purposes.
Now for the problem. We have mutations that mutate entities by their CRM identifier, but depending on the microservice they may not be aware of that CRM identifier, especially if it identifies an entity that lives in a separate microservice/database. For example, let’s say we have a User microservice and an Address microservice (we don’t, but for simplicity’s sake go with it). In the User microservice we define a User with a user_id as our internal id and a user_crm_id as the CRM id. Now imagine we have a mutation that updates a User’s address by their CRM id. Now we have a conundrum. The Address service doesn’t know anything about a User’s CRM id, only about their internal id.
That leads to my question. Is there a way we can resolve properties on input types before they are finally forwarded on to mutations? In this instance I’d like to resolve the User’s internal id before passing the mutation input on to the Address subgraph. Is that possible?