So in Federation I could have a type that contains a field of entities resolved in another subgraph using an id as the key. Something like this
'''
resolved in another subgraph
'''
type Entity @key(fields: id) {
id: ID!
}
type Something {
id: ID!
field: [Entity!]
field2: SomeType!
}
My understanding is that the gateway will send my subgraph the request for this data, I will resolve all that I can, send it back to the gateway and then the gateway will take the keys it needs and go to the other subgraph to resolve the entities. The gateway will handle all the stitching of the data and my subgraph will never see that array.
Now lets say the array of entities is a list of products. I don’t want any products in that list to be sent back if they are out of stock. This, stock level, is part of the information that makes up the entity in its subgraph where it is resolved. As I never see those entities in my subgraph I can’t do any filtering to remove those products with no stock. I could do a call in my subgraph directly to the API responsable for resolving those entities with the ID and remove the IDs of products with no stock but then I have increased the number of calls I am making to that service. Is there anyway I could get the resolved entities back into my subgraph from the gateway so I can filter them, or is this just not supported like that?