There is a graphql api in a subgraph owned by another team
type Query {
user: UserInfo
}
Our team wants to create a new graphql api in our subgraph that return the same data type as a proxy.
type Query {
specialUser(encryptedUserId: ID): UserInfo
}
In our proxy, we will first decode the user id, then check if valid, then call the other team's api to get UserInfo, then do some modification to the result then return it.
Note the UserInfo object is very complicated, so we don't want to re-create resolver for each field.
I didn't find a way to extract the query then pass to the other team's api. We're using https://netflix.github.io/dgs/ and apollo in backend.