Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/scandipwa/reviews-graphql
Reviews GraphQL endpoints for M2
https://github.com/scandipwa/reviews-graphql
Last synced: 14 days ago
JSON representation
Reviews GraphQL endpoints for M2
- Host: GitHub
- URL: https://github.com/scandipwa/reviews-graphql
- Owner: scandipwa
- License: osl-3.0
- Created: 2019-05-09T07:59:46.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-10-06T10:27:59.000Z (about 4 years ago)
- Last Synced: 2024-09-22T15:47:57.369Z (about 2 months ago)
- Language: PHP
- Size: 23.4 KB
- Stars: 2
- Watchers: 4
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ScandiPWA_ReviewsGraphQl
**ReviewsGraphQl** provides basic types and resolvers for adding and displaying customer reviews.
Module also adds new fields to `ProductInterface`:
- `review_summary` which includes information about product review summary:
- `rating_summary`,
- `review_count`.
- `reviews` - a list of product reviews containing following review information:- `review_id`,
- `entity_id`,
- `entity_code`,
- `entity_pk_value`,
- `status_id`,
- `store_id`,
- `customer_id`,
- `nickname`,
- `title`,
- `detail_id`,
- `detail`,
- `created_at`,
- `rating_votes`.### addProductReview
```graphql
mutation AddProductReview($productReviewItem: ProductReviewInput!) {
addProductReview(productReviewItem: $productReviewItem) {
review_id
entity_id
entity_pk_value
status_id
store_id
customer_id
nickname
title
detail
created_at
}
}
``````json
{
"productReviewItem": {
"nickname": "John",
"title": "Review Title",
"detail": "Review Detail",
"product_sku": "n31191497",
"rating_data":[
{
"rating_id": 1,
"option_id": 4
},{
"rating_id": 2,
"option_id": 8
}
]
}
}
```### getRatings
```graphql
query GetRatings {
getRatings {
rating_id
rating_code
rating_options {
option_id
value
}
}
}
```