GraphQL Federation: Is it possible to have multiple service contribute to a list/array result?

196 views Asked by At

Assuming I have the following GraphQL schema defined:

type Widgets {
  id: ID!
  name: String!
}

type Basket {
  id: ID!
  widgets: [Widgets]!
}

And that I have a widget service that provides those results.

But now I have a new service "NEW widget" service, that I'd like to contribute to the list of widgets. So the widget service provides a list of widgets, but the "NEW widget" service has a few more widgets to add to the list.

Is this possible?

I know I could add a new field to the Widget or Basket types from "NEW widget" service, but I'm wondering if I can contribute results to a list from another service.

This that possible from the GraphQL spec or Apollo federation?

0

There are 0 answers