我有apollo界面链接此:
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:[])
}
对于每种类型,我都必须将所有Interface属性复制到我的类型中。
是否有解决方案来编写我的类型?
type PageLayoutBannerRow implements PageLayout {
# not copy interface attributes
banners: [PageLayoutBanner]! @default(value:[])
}