Resolving for a Mutation of subgraph

I’m using a gateway and two subgraphs:

  • Accounts service with the Account is an entity type → server1 + database1
    Account: { __resolveReference(reference, { dataSources }, info) { return dataSources.accountsAPI.getAccountById(reference.id); } }
  • Profile service → server2 + database2

Now I want to get an account by Id via the Account reference resolver at my Profile service’s Mutation like:
Mutation: { async createProfile(parent, { accountId }, { dataSources }, info) { const account = await getAccFromAccountService(accountId); //?? Please help me return dataSources.profilesAPI.createProfile(data); } }

Is there any way to do that? Tks!

Hi @xbphamvn found any solution on this? I am also looking for something similar and don’t want to orchestrate on client side :slight_smile: