0

I am trying to use Graphql federation in multiple service configurations, where some services might be present in one configuration, while others - in another.

The type extension is not callable directly in each service subgraphs and is only turned into a "live" type once it is joined to the "main" type in the federation builder.

I was wondering if it is possible to define @extends for a type that does not exist in any subgraphs (in a particular configuration) in a way that it would be discarded/ignored by the gateway, but visible in the different configuration where the parent type is present.

Maybe there is another "graceful" approach that I overlooked.?

i.e. @sharable would also work, moving the resolution of such a type into the parent service, however, the maintenance of such a @sharable type would be complicated as any update to the type would have to be done in every service that shares it.

These are the two ways I've come up with to deal with this kind of requirement in the federation, however, I thought to ask here to see if the community has met similar requirement and can provide a better approach~

Simas Joneliunas
  • 2,890
  • 20
  • 28
  • 35

0 Answers0