The below schemas fail to compose:
According to the logs, it seems that the validation wants to move from Book/C to resolve isbn it attempts to do this via moving to Media/A but since isbn is not defined on Media (just on Book) it fails to find the field.
# Service A
type Query {
book: Book!
}
interface Media @key(fields: "id") {
id: ID!
}
type Book implements Media @key(fields: "id") {
id: ID!
isbn: String!
}
# Service B
type Media @key(fields: "id") @interfaceObject {
id: ID!
}
type Query {
topRatedMedia: [Media!]!
}
extend schema
@link(
url: "https://specs.apollo.dev/federation/v2.3"
import: ["@key", "@interfaceObject"]
)
#Service C
type Query {
cBook: Book
}
type Book @key(fields: "id") {
id: ID!
}