diff --git a/saleor/graphql/review/mutations/__init__.py b/saleor/graphql/review/mutations/__init__.py index 9872fa496..bdc587ea6 100644 --- a/saleor/graphql/review/mutations/__init__.py +++ b/saleor/graphql/review/mutations/__init__.py @@ -1,11 +1,11 @@ from .review_submit import SubmitProductReview from .review_delete import DeleteProductReview from .review_update import UpdateProductReview -from .review_media_create import ReviewMediaCreate +from .review_media_create import CreateReviewMedia __all__ = [ "SubmitProductReview", "DeleteProductReview", "UpdateProductReview", - "ReviewMediaCreate", + "CreateReviewMedia", ] diff --git a/saleor/graphql/review/mutations/review_media_create.py b/saleor/graphql/review/mutations/review_media_create.py index 05349ecf8..480e9f979 100644 --- a/saleor/graphql/review/mutations/review_media_create.py +++ b/saleor/graphql/review/mutations/review_media_create.py @@ -33,7 +33,7 @@ class Meta: doc_category = DOC_CATEGORY_PRODUCTS -class ReviewMediaCreate(BaseMutation): +class CreateReviewMedia(BaseMutation): review = graphene.Field(Review) media = graphene.Field(ReviewMedia) @@ -142,4 +142,4 @@ def perform_mutation( # type: ignore[override] cls.call_event(manager.review_updated, review) cls.call_event(manager.review_media_created, media) review = ChannelContext(node=review, channel_slug=None) - return ReviewMediaCreate(review=review, media=media) + return CreateReviewMedia(review=review, media=media) diff --git a/saleor/graphql/review/schema.py b/saleor/graphql/review/schema.py index 3d37500d8..b8c106908 100644 --- a/saleor/graphql/review/schema.py +++ b/saleor/graphql/review/schema.py @@ -3,7 +3,7 @@ SubmitProductReview, UpdateProductReview, DeleteProductReview, - ReviewMediaCreate, + CreateReviewMedia, ) from ...review import models from .types import Review @@ -36,4 +36,4 @@ class ReviewMutations(graphene.ObjectType): submitProductReview = SubmitProductReview.Field() updateProductReview = UpdateProductReview.Field() deleteProductReview = DeleteProductReview.Field() - createReviewMedia = ReviewMediaCreate.Field() + createReviewMedia = CreateReviewMedia.Field() diff --git a/saleor/graphql/review/types.py b/saleor/graphql/review/types.py index 0f8148816..1ddf36afa 100644 --- a/saleor/graphql/review/types.py +++ b/saleor/graphql/review/types.py @@ -21,7 +21,7 @@ class Review(ModelObjectType[models.Review]): - id = graphene.ID(required=True, description="ID of the review.") + id = graphene.GlobalID(required=True, description="ID of the review.") rating = graphene.Int(required=True, description="Rating of the review") review = graphene.String(required=True, description="Details of the review") title = graphene.String(required=True, description="Title of the review")