2025-02-27 17:26:47 +00:00
|
|
|
extend schema
|
|
|
|
|
@link(
|
|
|
|
|
url: "https://specs.apollo.dev/federation/v2.3"
|
|
|
|
|
import: ["@key", "@shareable", "@override"]
|
|
|
|
|
)
|
|
|
|
|
@link(url: "https://specs.graphql-hive.com/hive/v1.0", import: ["@meta"])
|
|
|
|
|
@meta(name: "owner", content: "reviews-team")
|
|
|
|
|
|
|
|
|
|
directive @meta(
|
|
|
|
|
name: String!
|
|
|
|
|
content: String!
|
|
|
|
|
) repeatable on SCHEMA | OBJECT | INTERFACE | FIELD_DEFINITION
|
|
|
|
|
|
|
|
|
|
type Product implements ProductItf @key(fields: "id") {
|
|
|
|
|
id: ID!
|
|
|
|
|
reviewsCount: Int!
|
|
|
|
|
reviewsScore: Float! @shareable @override(from: "products")
|
|
|
|
|
reviews: [Review!]!
|
2022-05-18 07:26:57 +00:00
|
|
|
}
|
|
|
|
|
|
2025-02-27 17:26:47 +00:00
|
|
|
interface ProductItf {
|
2022-05-18 07:26:57 +00:00
|
|
|
id: ID!
|
2025-02-27 17:26:47 +00:00
|
|
|
reviewsCount: Int!
|
|
|
|
|
reviewsScore: Float!
|
|
|
|
|
reviews: [Review!]!
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type Query {
|
|
|
|
|
review(id: Int!): Review
|
2022-05-18 07:26:57 +00:00
|
|
|
}
|
|
|
|
|
|
2025-02-27 17:26:47 +00:00
|
|
|
type Review {
|
|
|
|
|
id: Int!
|
|
|
|
|
body: String!
|
2022-05-18 07:26:57 +00:00
|
|
|
}
|