How are mutations handled in a federated schema? If I have an accounts service and a course service, the course service will likely extend the User type by some fields. How these fields are resolved for a query using the __resolveReference()
function is well documented, however, if it comes to mutations I can not really find anything. How am I supposed to handle writes from the accounts service to its database without knowing all the fields a user has? I imagine a mutation that looks like this:
mutation{
createUser(username: "Jack" course: "whatever"){
some data...
}
}
Which service is now responsible for writing the course
field to the users database? The course microservice has also its own database and shouldn't write anything to the users database.
Is this still an unsolved problem with Apollo schema federation?