Replies: 2 comments 6 replies
-
|
I don't think there is a way to do so with the existing federation mechanism. The other team's api will have to delegate the calls to your service based on the input variables in that case. You will need to have a proxy service that fulfills the api. The gateway would talk to this proxy service and the proxy service would then determine which subgraph to call. |
Beta Was this translation helpful? Give feedback.
1 reply
-
|
To be clear, are you trying to just use the UserInfo type from the other
team? And my assumption is that your services are behind a federated
gateway? (since you are referring to subgraphs).
If you are just looking to use the other team's type in your schema, you
will need to redefine the type locally to be able to use it in your schema.
…On Mon, Jul 25, 2022 at 10:16 AM Rfank2021 ***@***.***> wrote:
The other team's api
type Query {
user: UserInfo
}
Our api
type Query {
specialUser(encryptedUserId: ID): UserInfo
}
In order to use the same query/return schema, we need @Shareable which
need redefine all fields, not so good. I was trying to extract query and
send the query to the other team's api, but didn't find a way in backend.
—
Reply to this email directly, view it on GitHub
<#1168 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJ5JPXP2PLJN2CTQYKC7XETVV3DVPANCNFSM54SKD4ZQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
We want to have an api in our subgraph returning same data schema as another team's subgraph api, so the query schema is same too. Only difference is the input variables and validations, how to implement a query proxy?
Beta Was this translation helpful? Give feedback.
All reactions