I am new to apollo and I have two apollo service that I want to federate by using apollo federation:
Productservice:
extend type Query {
job(id: String!): Job
}
type Seo {
title: String!
description: String!
keywords: String!
}
type Product @key(fields: "id") {
id: ID!
title: String!
seo: Seo!
}
StaffService:
extend type Query {
staffMember(id: String!): StaffMember
}
type Seo {
title: String!
description: String!
keywords: String!
}
type StaffMember @key(fields: "id") {
id: ID!
title: String!
seo: Seo!
}
How can I use the type Seo in response objects of both objects? Is the correct procedure to create an interface Seo and implement StaffMemberSeo and ProductSeo or is there an annotation that allows me to define the exactly same type within two services?