sim*_*msi 5 apollo graphql apollo-federation
我是阿波罗的新手,我有两个阿波罗服务,我想通过使用阿波罗联合来联合:
产品服务:
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!
}
Run Code Online (Sandbox Code Playgroud)
员工服务:
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!
}
Run Code Online (Sandbox Code Playgroud)
如何在两个对象的响应对象中使用类型Seo?创建接口 Seo 并实现 StaffMemberSeo 和 ProductSeo 的过程是否正确,或者是否有允许我在两个服务中定义完全相同类型的注释?
| 归档时间: |
|
| 查看次数: |
163 次 |
| 最近记录: |