【发布时间】:2020-03-01 21:01:35
【问题描述】:
我有阿波罗接口链接这个:
interface PageLayout {
_id: String!
id: ID! @globalID
title: String
subtitle: String
template: String! @default(value:"none")
layout: String
layoutMobile: String
showCount: Float
showCountMobile: Float
imageHeight: Int
cardDesign: String
cardShadow: Int
}
并拥有实现接口的这种类型:
type PageLayoutBannerRow implements PageLayout {
_id: String!
id: ID! @globalID
title: String
subtitle: String
template: String! @default(value:"none")
layout: String
layoutMobile: String
showCount: Float
showCountMobile: Float
imageHeight: Int
cardDesign: String
cardShadow: Int
banners: [PageLayoutBanner]! @default(value:[])
}
对于每种类型,我必须将所有接口属性复制到我的类型。
有什么办法可以像这样写我的类型吗?
type PageLayoutBannerRow implements PageLayout {
# not copy interface attributes
banners: [PageLayoutBanner]! @default(value:[])
}
【问题讨论】:
标签: graphql apollo apollo-server