mirror of
https://github.com/graphql-hive/console
synced 2026-05-05 14:38:32 +00:00
20 lines
500 B
GraphQL
20 lines
500 B
GraphQL
extend type Product @key(fields: "id") {
|
|
id: ID! @external
|
|
reviews: [Review]
|
|
reviewSummary: ReviewSummary
|
|
}
|
|
|
|
"""
|
|
This is an Entity, docs:https://www.apollographql.com/docs/federation/entities/
|
|
You will need to define a __resolveReference resolver for the type you define, docs: https://www.apollographql.com/docs/federation/entities/#resolving
|
|
"""
|
|
type Review @key(fields: "id") {
|
|
id: ID!
|
|
rating: Float
|
|
content: String
|
|
}
|
|
|
|
type ReviewSummary {
|
|
totalReviews: Int
|
|
averageRating: Float
|
|
}
|