Skip to content

Instantly share code, notes, and snippets.

@afro-coder
Last active March 7, 2024 07:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save afro-coder/3633a1fce6815619ccf29a02eb35dcd0 to your computer and use it in GitHub Desktop.
Save afro-coder/3633a1fce6815619ccf29a02eb35dcd0 to your computer and use it in GitHub Desktop.
Microcks Bookinfo
# microcksId: Bookinfo Graph API: 1.0
type Query {
"""Description of a book in HTML"""
productsForHome: [Product]
}
"""Each book has a product entry"""
type Product {
"""Unique identifier for books"""
id: String
"""The book title"""
title: String
"""Number of pages in the book"""
pages: Int
"""Year the book was published"""
year: Int
"""Description of a book in HTML"""
descriptionHtml: String
"""List of reader reviews for this book. Queries the reviews REST service"""
reviews: [Review]
"""List of reader ratings for this book. Queries the ratings REST service"""
ratings: [Rating]
}
"""A book review"""
type Review {
"""Name of the reviewer"""
reviewer: String
"""Review details"""
text: String
"Reviewer Rating, this field is provided by the reviews REST service, which queries the ratings REST service"
rating: ReviewerRating
}
type ReviewerRating {
stars: Int
color: String
}
"""A book rating"""
type Rating {
"""Name of the user peforming the rating"""
reviewer: String
"""Number of stars for this rating"""
numStars: Int
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment