diff --git a/core/graphene/mutations.py b/core/graphene/mutations.py index e8ec944d..85131820 100644 --- a/core/graphene/mutations.py +++ b/core/graphene/mutations.py @@ -493,5 +493,6 @@ class Search(BaseMutation): products=data["products"], categories=data["categories"], brands=data["brands"], + posts=data["posts"], ) ) diff --git a/core/graphene/object_types.py b/core/graphene/object_types.py index 5cea32e6..bebc6603 100644 --- a/core/graphene/object_types.py +++ b/core/graphene/object_types.py @@ -454,19 +454,29 @@ class LanguageType(ObjectType): class SearchProductsResultsType(ObjectType): uuid = UUID() name = String() + slug = String() class SearchCategoriesResultsType(ObjectType): uuid = UUID() name = String() + slug = String() class SearchBrandsResultsType(ObjectType): uuid = UUID() name = String() + slug = String() + + +class SearchPostsResultsType(ObjectType): + uuid = UUID() + name = String() + slug = String() class SearchResultsType(ObjectType): products = List(description=_("products search results"), of_type=SearchProductsResultsType) categories = List(description=_("products search results"), of_type=SearchCategoriesResultsType) brands = List(description=_("products search results"), of_type=SearchBrandsResultsType) + posts = List(description=_("posts search results"), of_type=SearchPostsResultsType)