I’m trying to migrate to federation and as part of it i have a type in service A
type Product @key(fields: "id") {
id: String!
contentId: String
...rest
}
Where then in service B I’m trying to extend it with
type Content {
id: String!
name: String!
... rest
}
extend type Product @key(fields: "id") {
id: String! @external
contentId: String @external
content: Content @requires(fields: "contentId")
}
Where service B will resolve the details of content
using contentId
But when composing this through the gateway i’m getting an error i don’t quite understand
Error: A valid schema couldn't be composed. The following composition errors were found:
The following supergraph API query:
{
products(id: "A string value") {
content {
...
}
}
}
cannot be satisfied by the subgraphs because:
- from subgraph "A": cannot find field "Product.content".
- from subgraph "B": cannot satisfy @require conditions on field "Product.content" (please ensure that this is not due to key field "id" being accidentally marked @external).
Any help/advice on this would be greatly appreciated.