mirror of
https://github.com/graphql-hive/console
synced 2026-04-23 07:27:17 +00:00
35 lines
730 B
GraphQL
35 lines
730 B
GraphQL
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!]!
|
|
}
|
|
|
|
interface ProductItf {
|
|
id: ID!
|
|
reviewsCount: Int!
|
|
reviewsScore: Float!
|
|
reviews: [Review!]!
|
|
}
|
|
|
|
type Query {
|
|
review(id: Int!): Review
|
|
}
|
|
|
|
type Review {
|
|
id: Int!
|
|
body: String!
|
|
}
|