Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Improve doc categories (#12529)

Marcin Gębalac2a99ff07ef4
diff --git a/saleor/graphql/channel/types.py b/saleor/graphql/channel/types.py
index 6780e3865f..76c392d637 100644
--- a/saleor/graphql/channel/types.py
+++ b/saleor/graphql/channel/types.py
@@ -24,9 +24,10 @@ from ..core.descriptions import (
ADDED_IN_313,
PREVIEW_FEATURE,
)
+from ..core.doc_category import DOC_CATEGORY_ORDERS, DOC_CATEGORY_PRODUCTS
from ..core.fields import PermissionsField
from ..core.scalars import Minute
-from ..core.types import CountryDisplay, ModelObjectType, NonNullList
+from ..core.types import BaseObjectType, CountryDisplay, ModelObjectType, NonNullList
from ..meta.types import ObjectWithMetadata
from ..translations.resolvers import resolve_translation
from ..warehouse.dataloaders import WarehousesByChannelIdLoader
@@ -152,7 +153,7 @@ class ChannelContextTypeWithMetadata(ChannelContextTypeWithMetadataForObjectType
abstract = True
-class StockSettings(ObjectType):
+class StockSettings(BaseObjectType):
allocation_strategy = AllocationStrategyEnum(
description=(
"Allocation strategy defines the preference of warehouses "
@@ -163,6 +164,7 @@ class StockSettings(ObjectType):
class Meta:
description = "Represents the channel stock settings." + ADDED_IN_37
+ doc_category = DOC_CATEGORY_PRODUCTS
class OrderSettings(ObjectType):
@@ -213,6 +215,7 @@ class OrderSettings(ObjectType):
class Meta:
description = "Represents the channel-specific order settings."
+ doc_category = DOC_CATEGORY_ORDERS
class Channel(ModelObjectType):
diff --git a/saleor/graphql/checkout/types.py b/saleor/graphql/checkout/types.py
index c8b86454b8..bb8e9efce1 100644
--- a/saleor/graphql/checkout/types.py
+++ b/saleor/graphql/checkout/types.py
@@ -37,7 +37,7 @@ from ..core.descriptions import (
DEPRECATED_IN_3X_FIELD,
PREVIEW_FEATURE,
)
-from ..core.doc_category import DOC_CATEGORY_PAYMENTS
+from ..core.doc_category import DOC_CATEGORY_CHECKOUT, DOC_CATEGORY_PAYMENTS
from ..core.enums import LanguageCodeEnum
from ..core.scalars import UUID
from ..core.tracing import traced_resolver
@@ -352,6 +352,7 @@ class CheckoutLine(ModelObjectType[models.CheckoutLine]):
class CheckoutLineCountableConnection(CountableConnection):
class Meta:
+ doc_category = DOC_CATEGORY_CHECKOUT
node = CheckoutLine
@@ -943,4 +944,5 @@ class Checkout(ModelObjectType[models.Checkout]):
class CheckoutCountableConnection(CountableConnection):
class Meta:
+ doc_category = DOC_CATEGORY_CHECKOUT
node = Checkout
diff --git a/saleor/graphql/core/connection.py b/saleor/graphql/core/connection.py
index c47fa14ad5..72297859f5 100644
--- a/saleor/graphql/core/connection.py
+++ b/saleor/graphql/core/connection.py
@@ -631,6 +631,7 @@ class NonNullConnection(BaseConnection):
edge_name = cls.Edge._meta.name
edge_bases = (EdgeBase, graphene.ObjectType)
edge = type(edge_name, edge_bases, {})
+ edge.doc_category = options.get("doc_category") # type: ignore[attr-defined]
cls.Edge = edge
# Override the `edges` field to make it non-null list
diff --git a/saleor/graphql/core/doc_category.py b/saleor/graphql/core/doc_category.py
index 6f8ce26dc2..02384e3043 100644
--- a/saleor/graphql/core/doc_category.py
+++ b/saleor/graphql/core/doc_category.py
@@ -5,11 +5,13 @@ DOC_CATEGORY_CHANNELS = "Channels"
DOC_CATEGORY_CHECKOUT = "Checkout"
DOC_CATEGORY_DISCOUNTS = "Discounts"
DOC_CATEGORY_GIFT_CARDS = "Gift cards"
+DOC_CATEGORY_MENU = "Menu"
DOC_CATEGORY_ORDERS = "Orders"
DOC_CATEGORY_PAGES = "Pages"
DOC_CATEGORY_PAYMENTS = "Payments"
DOC_CATEGORY_PRODUCTS = "Products"
DOC_CATEGORY_SHIPPING = "Shipping"
+DOC_CATEGORY_SHOP = "Shop"
DOC_CATEGORY_TAXES = "Taxes"
DOC_CATEGORY_USERS = "Users"
DOC_CATEGORY_WEBHOOKS = "Webhooks"
@@ -27,19 +29,27 @@ DOC_CATEGORY_MAP = {
"app.AppExtension": DOC_CATEGORY_APPS,
"app.AppInstallation": DOC_CATEGORY_APPS,
"attribute.Attribute": DOC_CATEGORY_ATTRIBUTES,
+ "attribute.AttributeTranslation": DOC_CATEGORY_ATTRIBUTES,
"attribute.AttributeValue": DOC_CATEGORY_ATTRIBUTES,
+ "attribute.AttributeValueTranslation": DOC_CATEGORY_ATTRIBUTES,
"channel.Channel": DOC_CATEGORY_CHANNELS,
"checkout.Checkout": DOC_CATEGORY_CHECKOUT,
"checkout.CheckoutLine": DOC_CATEGORY_CHECKOUT,
"discount.Sale": DOC_CATEGORY_DISCOUNTS,
+ "discount.SaleTranslation": DOC_CATEGORY_DISCOUNTS,
+ "discount.SaleChannelListing": DOC_CATEGORY_DISCOUNTS,
"discount.VoucherChannelListing": DOC_CATEGORY_DISCOUNTS,
"discount.Voucher": DOC_CATEGORY_DISCOUNTS,
+ "discount.VoucherTranslation": DOC_CATEGORY_DISCOUNTS,
"discount.OrderDiscount": DOC_CATEGORY_DISCOUNTS,
"invoice.Invoice": DOC_CATEGORY_ORDERS,
"invoice.InvoiceEvent": DOC_CATEGORY_ORDERS,
"giftcard.GiftCard": DOC_CATEGORY_GIFT_CARDS,
"giftcard.GiftCardTag": DOC_CATEGORY_GIFT_CARDS,
- "giftcard.GiftEvent": DOC_CATEGORY_GIFT_CARDS,
+ "giftcard.GiftCardEvent": DOC_CATEGORY_GIFT_CARDS,
+ "menu.Menu": DOC_CATEGORY_MENU,
+ "menu.MenuItem": DOC_CATEGORY_MENU,
+ "menu.MenuItemTranslation": DOC_CATEGORY_MENU,
"order.OrderGrantedRefund": DOC_CATEGORY_ORDERS,
"order.Order": DOC_CATEGORY_ORDERS,
"order.OrderLine": DOC_CATEGORY_ORDERS,
@@ -48,20 +58,31 @@ DOC_CATEGORY_MAP = {
"order.FulfillmentLine": DOC_CATEGORY_ORDERS,
"page.Page": DOC_CATEGORY_PAGES,
"page.PageType": DOC_CATEGORY_PAGES,
+ "page.PageTranslation": DOC_CATEGORY_PAGES,
"payment.Payment": DOC_CATEGORY_PAYMENTS,
"payment.Transaction": DOC_CATEGORY_PAYMENTS,
"payment.TransactionItem": DOC_CATEGORY_PAYMENTS,
"payment.TransactionEvent": DOC_CATEGORY_PAYMENTS,
"product.Category": DOC_CATEGORY_PRODUCTS,
+ "product.CategoryTranslation": DOC_CATEGORY_PRODUCTS,
"product.Collection": DOC_CATEGORY_PRODUCTS,
+ "product.CollectionChannelListing": DOC_CATEGORY_PRODUCTS,
+ "product.CollectionTranslation": DOC_CATEGORY_PRODUCTS,
+ "product.DigitalContent": DOC_CATEGORY_PRODUCTS,
+ "product.DigitalContentUrl": DOC_CATEGORY_PRODUCTS,
"product.Product": DOC_CATEGORY_PRODUCTS,
+ "product.ProductTranslation": DOC_CATEGORY_PRODUCTS,
"product.ProductChannelListing": DOC_CATEGORY_PRODUCTS,
"product.ProductMedia": DOC_CATEGORY_PRODUCTS,
"product.ProductType": DOC_CATEGORY_PRODUCTS,
"product.ProductVariant": DOC_CATEGORY_PRODUCTS,
+ "product.ProductVariantTranslation": DOC_CATEGORY_PRODUCTS,
"product.ProductVariantChannelListing": DOC_CATEGORY_PRODUCTS,
+ "site.SiteSettings": DOC_CATEGORY_SHOP,
+ "site.SiteSettingsTranslation": DOC_CATEGORY_SHOP,
"shipping.ShippingMethodChannelListing": DOC_CATEGORY_SHIPPING,
"shipping.ShippingMethod": DOC_CATEGORY_SHIPPING,
+ "shipping.ShippingMethodTranslation": DOC_CATEGORY_SHIPPING,
"shipping.ShippingZone": DOC_CATEGORY_SHIPPING,
"shipping.ShippingMethodPostalCodeRule": DOC_CATEGORY_SHIPPING,
"tax.TaxConfiguration": DOC_CATEGORY_TAXES,
diff --git a/saleor/graphql/core/types/common.py b/saleor/graphql/core/types/common.py
index 20d4b76369..b19e3b5264 100644
--- a/saleor/graphql/core/types/common.py
+++ b/saleor/graphql/core/types/common.py
@@ -9,15 +9,18 @@ from ...account.enums import AddressTypeEnum
from ...core.doc_category import (
DOC_CATEGORY_APPS,
DOC_CATEGORY_ATTRIBUTES,
+ DOC_CATEGORY_AUTH,
DOC_CATEGORY_CHANNELS,
DOC_CATEGORY_CHECKOUT,
DOC_CATEGORY_DISCOUNTS,
DOC_CATEGORY_GIFT_CARDS,
+ DOC_CATEGORY_MENU,
DOC_CATEGORY_ORDERS,
DOC_CATEGORY_PAGES,
DOC_CATEGORY_PAYMENTS,
DOC_CATEGORY_PRODUCTS,
DOC_CATEGORY_SHIPPING,
+ DOC_CATEGORY_SHOP,
DOC_CATEGORY_TAXES,
DOC_CATEGORY_USERS,
DOC_CATEGORY_WEBHOOKS,
@@ -122,6 +125,7 @@ class Permission(BaseObjectType):
)
class Meta:
+ doc_category = DOC_CATEGORY_AUTH
description = "Represents a permission object in a friendly form."
@@ -139,7 +143,7 @@ class Error(BaseObjectType):
description = "Represents an error in the input of a mutation."
-class BulkError(graphene.ObjectType):
+class BulkError(BaseObjectType):
path = graphene.String(
description=(
"Path to field that caused the error. A value of `null` indicates that "
@@ -244,6 +248,9 @@ class CheckoutError(Error):
class CustomerBulkUpdateError(BulkError):
code = CustomerBulkUpdateErrorCode(description="The error code.", required=True)
+ class Meta:
+ doc_category = DOC_CATEGORY_USERS
+
class ProductWithoutVariantError(Error):
products = NonNullList(
@@ -280,6 +287,9 @@ class ExternalNotificationError(Error):
class MenuError(Error):
code = MenuErrorCode(description="The error code.", required=True)
+ class Meta:
+ doc_category = DOC_CATEGORY_MENU
+
class OrderSettingsError(Error):
code = OrderSettingsErrorCode(description="The error code.", required=True)
@@ -440,6 +450,9 @@ class ProductBulkCreateError(BulkError):
required=False,
)
+ class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
+
class ProductVariantBulkError(Error):
code = ProductVariantBulkErrorCode(description="The error code.", required=True)
@@ -481,6 +494,9 @@ class ProductVariantBulkError(Error):
class ShopError(Error):
code = ShopErrorCode(description="The error code.", required=True)
+ class Meta:
+ doc_category = DOC_CATEGORY_SHOP
+
class ShippingError(Error):
code = ShippingErrorCode(description="The error code.", required=True)
@@ -554,24 +570,39 @@ class TransactionRequestActionError(Error):
class TransactionEventReportError(Error):
code = TransactionEventReportErrorCode(description="The error code.", required=True)
+ class Meta:
+ doc_category = DOC_CATEGORY_PAYMENTS
+
class TransactionInitializeError(Error):
code = TransactionInitializeErrorCode(description="The error code.", required=True)
+ class Meta:
+ doc_category = DOC_CATEGORY_PAYMENTS
+
class TransactionProcessError(Error):
code = TransactionProcessErrorCode(description="The error code.", required=True)
+ class Meta:
+ doc_category = DOC_CATEGORY_PAYMENTS
+
class PaymentGatewayConfigError(Error):
code = PaymentGatewayConfigErrorCode(description="The error code.", required=True)
+ class Meta:
+ doc_category = DOC_CATEGORY_PAYMENTS
+
class PaymentGatewayInitializeError(Error):
code = PaymentGatewayInitializeErrorCode(
description="The error code.", required=True
)
+ class Meta:
+ doc_category = DOC_CATEGORY_PAYMENTS
+
class GiftCardError(Error):
code = GiftCardErrorCode(description="The error code.", required=True)
diff --git a/saleor/graphql/core/types/model.py b/saleor/graphql/core/types/model.py
index aa42014edc..2b5fc402dc 100644
--- a/saleor/graphql/core/types/model.py
+++ b/saleor/graphql/core/types/model.py
@@ -50,7 +50,9 @@ class ModelObjectType(Generic[MT], BaseObjectType):
_meta.metadata_since = options.pop("metadata_since", None)
doc_category_key = f"{model._meta.app_label}.{model.__name__}"
- if "doc_category" not in options and doc_category_key in DOC_CATEGORY_MAP:
+ if doc_category not in options:
+ options["doc_category"] = doc_category
+ if not options["doc_category"] and doc_category_key in DOC_CATEGORY_MAP:
options["doc_category"] = DOC_CATEGORY_MAP[doc_category_key]
super(ModelObjectType, cls).__init_subclass_with_meta__(
diff --git a/saleor/graphql/core/types/money.py b/saleor/graphql/core/types/money.py
index 6ecd7e9282..eef97b61a8 100644
--- a/saleor/graphql/core/types/money.py
+++ b/saleor/graphql/core/types/money.py
@@ -2,6 +2,8 @@ import graphene
from django_prices.templatetags import prices
from ....core.prices import quantize_price
+from ...core.doc_category import DOC_CATEGORY_TAXES
+from ...core.types import BaseObjectType
class Money(graphene.ObjectType):
@@ -53,7 +55,7 @@ class TaxedMoneyRange(graphene.ObjectType):
description = "Represents a range of monetary values."
-class VAT(graphene.ObjectType):
+class VAT(BaseObjectType):
country_code = graphene.String(description="Country code.", required=True)
standard_rate = graphene.Float(description="Standard VAT rate in percent.")
reduced_rates = graphene.List(
@@ -64,6 +66,7 @@ class VAT(graphene.ObjectType):
class Meta:
description = "Represents a VAT rate for a country."
+ doc_category = DOC_CATEGORY_TAXES
@staticmethod
def resolve_standard_rate(root, _info):
@@ -78,9 +81,10 @@ class VAT(graphene.ObjectType):
]
-class ReducedRate(graphene.ObjectType):
+class ReducedRate(BaseObjectType):
rate = graphene.Float(description="Reduced VAT rate in percent.", required=True)
rate_type = graphene.String(description="A type of goods.", required=True)
class Meta:
description = "Represents a reduced VAT rate for a particular type of goods."
+ doc_category = DOC_CATEGORY_TAXES
diff --git a/saleor/graphql/discount/types.py b/saleor/graphql/discount/types.py
index cbc5a25b04..69bee81b96 100644
--- a/saleor/graphql/discount/types.py
+++ b/saleor/graphql/discount/types.py
@@ -15,6 +15,7 @@ from ..core import ResolveInfo, types
from ..core.connection import CountableConnection, create_connection_slice
from ..core.context import get_database_connection_name
from ..core.descriptions import ADDED_IN_31
+from ..core.doc_category import DOC_CATEGORY_DISCOUNTS
from ..core.fields import ConnectionField, PermissionsField
from ..core.scalars import PositiveDecimal
from ..core.types import ModelObjectType, Money, NonNullList
@@ -191,6 +192,7 @@ class Sale(ChannelContextTypeWithMetadata, ModelObjectType[models.Sale]):
class SaleCountableConnection(CountableConnection):
class Meta:
+ doc_category = DOC_CATEGORY_DISCOUNTS
node = Sale
@@ -379,6 +381,7 @@ class Voucher(ChannelContextTypeWithMetadata[models.Voucher]):
class VoucherCountableConnection(CountableConnection):
class Meta:
+ doc_category = DOC_CATEGORY_DISCOUNTS
node = Voucher
diff --git a/saleor/graphql/giftcard/types.py b/saleor/graphql/giftcard/types.py
index 1ebe0e1de2..88bb469b80 100644
--- a/saleor/graphql/giftcard/types.py
+++ b/saleor/graphql/giftcard/types.py
@@ -552,9 +552,11 @@ class GiftCard(ModelObjectType[models.GiftCard]):
class GiftCardCountableConnection(CountableConnection):
class Meta:
+ doc_category = DOC_CATEGORY_GIFT_CARDS
node = GiftCard
class GiftCardTagCountableConnection(CountableConnection):
class Meta:
+ doc_category = DOC_CATEGORY_GIFT_CARDS
node = GiftCardTag
diff --git a/saleor/graphql/menu/mutations.py b/saleor/graphql/menu/mutations.py
index 6d49770ac2..4d26a5ca3a 100644
--- a/saleor/graphql/menu/mutations.py
+++ b/saleor/graphql/menu/mutations.py
@@ -13,6 +13,7 @@ from ...permission.enums import MenuPermissions, SitePermissions
from ...product import models as product_models
from ..channel import ChannelContext
from ..core import ResolveInfo
+from ..core.doc_category import DOC_CATEGORY_MENU
from ..core.mutations import BaseMutation, ModelDeleteMutation, ModelMutation
from ..core.types import MenuError, NonNullList
from ..core.utils.reordering import perform_reordering
@@ -346,6 +347,7 @@ class MenuItemMove(BaseMutation):
class Meta:
description = "Moves items of menus."
+ doc_category = DOC_CATEGORY_MENU
permissions = (MenuPermissions.MANAGE_MENUS,)
error_type_class = MenuError
error_type_field = "menu_errors"
@@ -510,6 +512,7 @@ class AssignNavigation(BaseMutation):
class Meta:
description = "Assigns storefront's navigation menus."
+ doc_category = DOC_CATEGORY_MENU
permissions = (MenuPermissions.MANAGE_MENUS, SitePermissions.MANAGE_SETTINGS)
error_type_class = MenuError
error_type_field = "menu_errors"
diff --git a/saleor/graphql/menu/types.py b/saleor/graphql/menu/types.py
index 4d81e1eeb0..72e4a8391b 100644
--- a/saleor/graphql/menu/types.py
+++ b/saleor/graphql/menu/types.py
@@ -13,6 +13,7 @@ from ..channel.types import (
)
from ..core import ResolveInfo
from ..core.connection import CountableConnection
+from ..core.doc_category import DOC_CATEGORY_MENU
from ..core.types import NonNullList
from ..meta.types import ObjectWithMetadata
from ..page.dataloaders import PageByIdLoader
@@ -62,6 +63,7 @@ class Menu(ChannelContextTypeWithMetadata[models.Menu]):
class MenuCountableConnection(CountableConnection):
class Meta:
+ doc_category = DOC_CATEGORY_MENU
node = Menu
@@ -222,6 +224,7 @@ class MenuItem(ChannelContextTypeWithMetadata[models.MenuItem]):
class MenuItemCountableConnection(CountableConnection):
class Meta:
node = MenuItem
+ doc_category = DOC_CATEGORY_MENU
class MenuItemMoveInput(graphene.InputObjectType):
diff --git a/saleor/graphql/order/types.py b/saleor/graphql/order/types.py
index b1fae2db9c..6fd926dad1 100644
--- a/saleor/graphql/order/types.py
+++ b/saleor/graphql/order/types.py
@@ -274,6 +274,9 @@ class OrderEventDiscountObject(OrderDiscount):
Money, required=False, description="Returns amount of discount."
)
+ class Meta:
+ doc_category = DOC_CATEGORY_ORDERS
+
class OrderEventOrderLineObject(BaseObjectType):
quantity = graphene.Int(description="The variant quantity.")
@@ -535,6 +538,7 @@ class OrderEvent(ModelObjectType[models.OrderEvent]):
class OrderEventCountableConnection(CountableConnection):
class Meta:
+ doc_category = DOC_CATEGORY_ORDERS
node = OrderEvent
@@ -2132,4 +2136,5 @@ class Order(ModelObjectType[models.Order]):
class OrderCountableConnection(CountableConnection):
class Meta:
+ doc_category = DOC_CATEGORY_ORDERS
node = Order
diff --git a/saleor/graphql/page/types.py b/saleor/graphql/page/types.py
index 82eb8766df..2bd4d05403 100644
--- a/saleor/graphql/page/types.py
+++ b/saleor/graphql/page/types.py
@@ -14,6 +14,7 @@ from ..core.connection import (
filter_connection_queryset,
)
from ..core.descriptions import ADDED_IN_33, DEPRECATED_IN_3X_FIELD, RICH_CONTENT
+from ..core.doc_category import DOC_CATEGORY_PAGES
from ..core.federation import federated_entity, resolve_federation_references
from ..core.fields import FilterConnectionField, JSONString, PermissionsField
from ..core.scalars import Date
@@ -97,6 +98,7 @@ class PageType(ModelObjectType[models.PageType]):
class PageTypeCountableConnection(CountableConnection):
class Meta:
+ doc_category = DOC_CATEGORY_PAGES
node = PageType
@@ -163,4 +165,5 @@ class Page(ModelObjectType[models.Page]):
class PageCountableConnection(CountableConnection):
class Meta:
+ doc_category = DOC_CATEGORY_PAGES
node = Page
diff --git a/saleor/graphql/payment/mutations.py b/saleor/graphql/payment/mutations.py
index 1b579514d3..06fde7cc07 100644
--- a/saleor/graphql/payment/mutations.py
+++ b/saleor/graphql/payment/mutations.py
@@ -97,7 +97,7 @@ from ..core.enums import (
from ..core.fields import JSONString
from ..core.mutations import BaseMutation, ModelMutation
from ..core.scalars import JSON, UUID, PositiveDecimal
-from ..core.types import BaseInputObjectType
+from ..core.types import BaseInputObjectType, BaseObjectType
from ..core.types import common as common_types
from ..core.utils import from_global_id_or_error
from ..discount.dataloaders import load_discounts
@@ -1647,13 +1647,16 @@ class TransactionEventReport(ModelMutation):
)
-class PaymentGatewayConfig(graphene.ObjectType):
+class PaymentGatewayConfig(BaseObjectType):
id = graphene.String(required=True, description="The app identifier.")
data = graphene.Field(
JSON, description="The JSON data required to initialize the payment gateway."
)
errors = common_types.NonNullList(common_types.PaymentGatewayConfigError)
+ class Meta:
+ doc_category = DOC_CATEGORY_PAYMENTS
+
class PaymentGatewayToInitialize(BaseInputObjectType):
id = graphene.String(
diff --git a/saleor/graphql/payment/types.py b/saleor/graphql/payment/types.py
index ab737073b1..4a11995169 100644
--- a/saleor/graphql/payment/types.py
+++ b/saleor/graphql/payment/types.py
@@ -249,6 +249,7 @@ class Payment(ModelObjectType[models.Payment]):
class PaymentCountableConnection(CountableConnection):
class Meta:
+ doc_category = DOC_CATEGORY_PAYMENTS
node = Payment
diff --git a/saleor/graphql/product/types/categories.py b/saleor/graphql/product/types/categories.py
index e6d02558d8..a96047b645 100644
--- a/saleor/graphql/product/types/categories.py
+++ b/saleor/graphql/product/types/categories.py
@@ -19,6 +19,7 @@ from ...core.connection import (
filter_connection_queryset,
)
from ...core.descriptions import ADDED_IN_310, DEPRECATED_IN_3X_FIELD, RICH_CONTENT
+from ...core.doc_category import DOC_CATEGORY_PRODUCTS
from ...core.federation import federated_entity, resolve_federation_references
from ...core.fields import ConnectionField, FilterConnectionField, JSONString
from ...core.tracing import traced_resolver
@@ -179,4 +180,5 @@ class Category(ModelObjectType[models.Category]):
class CategoryCountableConnection(CountableConnection):
class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
node = Category
diff --git a/saleor/graphql/product/types/collections.py b/saleor/graphql/product/types/collections.py
index 55c43f57c7..8f43cf976f 100644
--- a/saleor/graphql/product/types/collections.py
+++ b/saleor/graphql/product/types/collections.py
@@ -20,6 +20,7 @@ from ...core.connection import (
filter_connection_queryset,
)
from ...core.descriptions import DEPRECATED_IN_3X_FIELD, RICH_CONTENT
+from ...core.doc_category import DOC_CATEGORY_PRODUCTS
from ...core.federation import federated_entity
from ...core.fields import FilterConnectionField, JSONString, PermissionsField
from ...core.types import Image, NonNullList, ThumbnailField
@@ -170,4 +171,5 @@ class Collection(ChannelContextTypeWithMetadata[models.Collection]):
class CollectionCountableConnection(CountableConnection):
class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
node = Collection
diff --git a/saleor/graphql/product/types/digital_contents.py b/saleor/graphql/product/types/digital_contents.py
index a20bc57d1e..a923ecfe2d 100644
--- a/saleor/graphql/product/types/digital_contents.py
+++ b/saleor/graphql/product/types/digital_contents.py
@@ -5,6 +5,7 @@ from ....product import models
from ...channel import ChannelContext
from ...core import ResolveInfo
from ...core.connection import CountableConnection
+from ...core.doc_category import DOC_CATEGORY_PRODUCTS
from ...core.scalars import UUID
from ...core.types import ModelObjectType, NonNullList
from ...meta.types import ObjectWithMetadata
@@ -68,4 +69,5 @@ class DigitalContent(ModelObjectType[models.DigitalContent]):
class DigitalContentCountableConnection(CountableConnection):
class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
node = DigitalContent
diff --git a/saleor/graphql/product/types/products.py b/saleor/graphql/product/types/products.py
index 4eb2a124e0..679f295dfd 100644
--- a/saleor/graphql/product/types/products.py
+++ b/saleor/graphql/product/types/products.py
@@ -805,6 +805,7 @@ class ProductVariant(ChannelContextTypeWithMetadata[models.ProductVariant]):
class ProductVariantCountableConnection(CountableConnection):
class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
node = ProductVariant
@@ -1559,6 +1560,7 @@ class Product(ChannelContextTypeWithMetadata[models.Product]):
class ProductCountableConnection(CountableConnection):
class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
node = Product
@@ -1762,6 +1764,7 @@ class ProductType(ModelObjectType[models.ProductType]):
class ProductTypeCountableConnection(CountableConnection):
class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
node = ProductType
diff --git a/saleor/graphql/schema.graphql b/saleor/graphql/schema.graphql
index e4b7c7a132..eba3c368ca 100644
--- a/saleor/graphql/schema.graphql
+++ b/saleor/graphql/schema.graphql
@@ -721,7 +721,7 @@ type Query {
Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
"""
last: Int
- ): OrderEventCountableConnection
+ ): OrderEventCountableConnection @doc(category: "Orders")
"""Look up an order by ID or external reference."""
order(
@@ -829,7 +829,7 @@ type Query {
"""The menu's slug."""
slug: String
- ): Menu
+ ): Menu @doc(category: "Menu")
"""List of the storefront's menus."""
menus(
@@ -861,7 +861,7 @@ type Query {
Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
"""
last: Int
- ): MenuCountableConnection
+ ): MenuCountableConnection @doc(category: "Menu")
"""Look up a menu item by ID."""
menuItem(
@@ -870,7 +870,7 @@ type Query {
"""Slug of a channel for which the data should be returned."""
channel: String
- ): MenuItem
+ ): MenuItem @doc(category: "Menu")
"""List of the storefronts's menu items."""
menuItems(
@@ -898,7 +898,7 @@ type Query {
Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
"""
last: Int
- ): MenuItemCountableConnection
+ ): MenuItemCountableConnection @doc(category: "Menu")
"""
Look up a gift card by ID.
@@ -2841,7 +2841,7 @@ Example:
scalar Metadata
"""Represents a permission object in a friendly form."""
-type Permission {
+type Permission @doc(category: "Authentication") {
"""Internal code for permission."""
code: PermissionEnum!
@@ -3427,7 +3427,7 @@ type CountryDisplay {
}
"""Represents a VAT rate for a country."""
-type VAT {
+type VAT @doc(category: "Taxes") {
"""Country code."""
countryCode: String!
@@ -3439,7 +3439,7 @@ type VAT {
}
"""Represents a reduced VAT rate for a particular type of goods."""
-type ReducedRate {
+type ReducedRate @doc(category: "Taxes") {
"""Reduced VAT rate in percent."""
rate: Float!
@@ -3454,7 +3454,7 @@ enum WarehouseClickAndCollectOptionEnum @doc(category: "Products") {
ALL
}
-type ShippingZoneCountableConnection {
+type ShippingZoneCountableConnection @doc(category: "Shipping") {
"""Pagination data for this connection."""
pageInfo: PageInfo!
edges: [ShippingZoneCountableEdge!]!
@@ -3463,7 +3463,7 @@ type ShippingZoneCountableConnection {
totalCount: Int
}
-type ShippingZoneCountableEdge {
+type ShippingZoneCountableEdge @doc(category: "Shipping") {
"""The item at the end of the edge."""
node: ShippingZone!
@@ -3703,7 +3703,7 @@ enum ShippingMethodTypeEnum @doc(category: "Shipping") {
WEIGHT
}
-type ShippingMethodTranslation implements Node {
+type ShippingMethodTranslation implements Node @doc(category: "Shipping") {
id: ID!
"""Translation language."""
@@ -4978,7 +4978,7 @@ Represents the channel stock settings.
Added in Saleor 3.7.
"""
-type StockSettings {
+type StockSettings @doc(category: "Products") {
"""
Allocation strategy defines the preference of warehouses for allocations and reservations.
"""
@@ -5091,7 +5091,7 @@ enum PostalCodeRuleInclusionTypeEnum @doc(category: "Shipping") {
EXCLUDE
}
-type ProductCountableConnection {
+type ProductCountableConnection @doc(category: "Products") {
"""Pagination data for this connection."""
pageInfo: PageInfo!
edges: [ProductCountableEdge!]!
@@ -5100,7 +5100,7 @@ type ProductCountableConnection {
totalCount: Int
}
-type ProductCountableEdge {
+type ProductCountableEdge @doc(category: "Products") {
"""The item at the end of the edge."""
node: Product!
@@ -5800,7 +5800,7 @@ type AttributeValueCountableConnection @doc(category: "Attributes") {
totalCount: Int
}
-type AttributeValueCountableEdge {
+type AttributeValueCountableEdge @doc(category: "Attributes") {
"""The item at the end of the edge."""
node: AttributeValue!
@@ -5867,7 +5867,7 @@ type AttributeValue implements Node @doc(category: "Attributes") {
externalReference: String
}
-type AttributeValueTranslation implements Node {
+type AttributeValueTranslation implements Node @doc(category: "Attributes") {
id: ID!
"""Translation language."""
@@ -5921,7 +5921,7 @@ input AttributeValueFilterInput @doc(category: "Attributes") {
ids: [ID!]
}
-type AttributeTranslation implements Node {
+type AttributeTranslation implements Node @doc(category: "Attributes") {
id: ID!
"""Translation language."""
@@ -5929,7 +5929,7 @@ type AttributeTranslation implements Node {
name: String!
}
-type ProductTypeCountableConnection {
+type ProductTypeCountableConnection @doc(category: "Products") {
"""Pagination data for this connection."""
pageInfo: PageInfo!
edges: [ProductTypeCountableEdge!]!
@@ -5938,7 +5938,7 @@ type ProductTypeCountableConnection {
totalCount: Int
}
-type ProductTypeCountableEdge {
+type ProductTypeCountableEdge @doc(category: "Products") {
"""The item at the end of the edge."""
node: ProductType!
@@ -5976,7 +5976,7 @@ type AttributeCountableConnection @doc(category: "Attributes") {
totalCount: Int
}
-type AttributeCountableEdge {
+type AttributeCountableEdge @doc(category: "Attributes") {
"""The item at the end of the edge."""
node: Attribute!
@@ -6260,7 +6260,7 @@ type Category implements Node & ObjectWithMetadata @doc(category: "Products") {
): CategoryTranslation
}
-type CategoryCountableConnection {
+type CategoryCountableConnection @doc(category: "Products") {
"""Pagination data for this connection."""
pageInfo: PageInfo!
edges: [CategoryCountableEdge!]!
@@ -6269,7 +6269,7 @@ type CategoryCountableConnection {
totalCount: Int
}
-type CategoryCountableEdge {
+type CategoryCountableEdge @doc(category: "Products") {
"""The item at the end of the edge."""
node: Category!
@@ -6515,7 +6515,7 @@ enum ThumbnailFormatEnum {
WEBP
}
-type CategoryTranslation implements Node {
+type CategoryTranslation implements Node @doc(category: "Products") {
id: ID!
"""Translation language."""
@@ -6952,7 +6952,7 @@ enum ProductMediaType @doc(category: "Products") {
VIDEO
}
-type ProductVariantTranslation implements Node {
+type ProductVariantTranslation implements Node @doc(category: "Products") {
id: ID!
"""Translation language."""
@@ -6960,7 +6960,7 @@ type ProductVariantTranslation implements Node {
name: String!
}
-type DigitalContent implements Node & ObjectWithMetadata {
+type DigitalContent implements Node & ObjectWithMetadata @doc(category: "Products") {
id: ID!
"""List of private metadata items. Requires staff permissions to access."""
@@ -7021,7 +7021,7 @@ type DigitalContent implements Node & ObjectWithMetadata {
productVariant: ProductVariant!
}
-type DigitalContentUrl implements Node {
+type DigitalContentUrl implements Node @doc(category: "Products") {
id: ID!
content: DigitalContent!
created: DateTime!
@@ -7320,7 +7320,7 @@ type Collection implements Node & ObjectWithMetadata @doc(category: "Products")
channelListings: [CollectionChannelListing!]
}
-type CollectionTranslation implements Node {
+type CollectionTranslation implements Node @doc(category: "Products") {
id: ID!
"""Translation language."""
@@ -7345,7 +7345,7 @@ type CollectionTranslation implements Node {
}
"""Represents collection channel listing."""
-type CollectionChannelListing implements Node {
+type CollectionChannelListing implements Node @doc(category: "Products") {
id: ID!
publicationDate: Date @deprecated(reason: "This field will be removed in Saleor 4.0. Use the `publishedAt` field to fetch the publication date.")
@@ -7359,7 +7359,7 @@ type CollectionChannelListing implements Node {
channel: Channel!
}
-type ProductTranslation implements Node {
+type ProductTranslation implements Node @doc(category: "Products") {
id: ID!
"""Translation language."""
@@ -7392,7 +7392,7 @@ type WarehouseCountableConnection @doc(category: "Products") {
totalCount: Int
}
-type WarehouseCountableEdge {
+type WarehouseCountableEdge @doc(category: "Products") {
"""The item at the end of the edge."""
node: Warehouse!
@@ -7631,7 +7631,7 @@ type PageTranslatableContent implements Node @doc(category: "Pages") {
attributeValues: [AttributeValueTranslatableContent!]!
}
-type PageTranslation implements Node {
+type PageTranslation implements Node @doc(category: "Pages") {
id: ID!
"""Translation language."""
@@ -7880,7 +7880,7 @@ type SaleTranslatableContent implements Node @doc(category: "Discounts") {
sale: Sale @deprecated(reason: "This field will be removed in Saleor 4.0. Get model fields from the root level queries.")
}
-type SaleTranslation implements Node {
+type SaleTranslation implements Node @doc(category: "Discounts") {
id: ID!
"""Translation language."""
@@ -8061,7 +8061,7 @@ enum SaleType @doc(category: "Discounts") {
PERCENTAGE
}
-type CollectionCountableConnection {
+type CollectionCountableConnection @doc(category: "Products") {
"""Pagination data for this connection."""
pageInfo: PageInfo!
edges: [CollectionCountableEdge!]!
@@ -8070,7 +8070,7 @@ type CollectionCountableConnection {
totalCount: Int
}
-type CollectionCountableEdge {
+type CollectionCountableEdge @doc(category: "Products") {
"""The item at the end of the edge."""
node: Collection!
@@ -8078,7 +8078,7 @@ type CollectionCountableEdge {
cursor: String!
}
-type ProductVariantCountableConnection {
+type ProductVariantCountableConnection @doc(category: "Products") {
"""Pagination data for this connection."""
pageInfo: PageInfo!
edges: [ProductVariantCountableEdge!]!
@@ -8087,7 +8087,7 @@ type ProductVariantCountableConnection {
totalCount: Int
}
-type ProductVariantCountableEdge {
+type ProductVariantCountableEdge @doc(category: "Products") {
"""The item at the end of the edge."""
node: ProductVariant!
@@ -8096,7 +8096,7 @@ type ProductVariantCountableEdge {
}
"""Represents sale channel listing."""
-type SaleChannelListing implements Node {
+type SaleChannelListing implements Node @doc(category: "Discounts") {
id: ID!
channel: Channel!
discountValue: Float!
@@ -8121,7 +8121,7 @@ type VoucherTranslatableContent implements Node @doc(category: "Discounts") {
voucher: Voucher @deprecated(reason: "This field will be removed in Saleor 4.0. Get model fields from the root level queries.")
}
-type VoucherTranslation implements Node {
+type VoucherTranslation implements Node @doc(category: "Discounts") {
id: ID!
"""Translation language."""
@@ -8333,7 +8333,7 @@ type VoucherChannelListing implements Node @doc(category: "Discounts") {
minSpent: Money
}
-type MenuItemTranslatableContent implements Node {
+type MenuItemTranslatableContent implements Node @doc(category: "Menu") {
id: ID!
name: String!
@@ -8349,7 +8349,7 @@ type MenuItemTranslatableContent implements Node {
menuItem: MenuItem @deprecated(reason: "This field will be removed in Saleor 4.0. Get model fields from the root level queries.")
}
-type MenuItemTranslation implements Node {
+type MenuItemTranslation implements Node @doc(category: "Menu") {
id: ID!
"""Translation language."""
@@ -8360,7 +8360,7 @@ type MenuItemTranslation implements Node {
"""
Represents a single item of the related menu. Can store categories, collection or pages.
"""
-type MenuItem implements Node & ObjectWithMetadata {
+type MenuItem implements Node & ObjectWithMetadata @doc(category: "Menu") {
id: ID!
"""List of private metadata items. Requires staff permissions to access."""
@@ -8438,7 +8438,7 @@ type MenuItem implements Node & ObjectWithMetadata {
"""
Represents a single menu - an object that is used to help navigate through the store.
"""
-type Menu implements Node & ObjectWithMetadata {
+type Menu implements Node & ObjectWithMetadata @doc(category: "Menu") {
id: ID!
"""List of private metadata items. Requires staff permissions to access."""
@@ -8620,7 +8620,7 @@ type TaxConfigurationCountableConnection @doc(category: "Taxes") {
totalCount: Int
}
-type TaxConfigurationCountableEdge {
+type TaxConfigurationCountableEdge @doc(category: "Taxes") {
"""The item at the end of the edge."""
node: TaxConfiguration!
@@ -8642,7 +8642,7 @@ type TaxClassCountableConnection @doc(category: "Taxes") {
totalCount: Int
}
-type TaxClassCountableEdge {
+type TaxClassCountableEdge @doc(category: "Taxes") {
"""The item at the end of the edge."""
node: TaxClass!
@@ -8691,7 +8691,7 @@ type StockCountableConnection @doc(category: "Products") {
totalCount: Int
}
-type StockCountableEdge {
+type StockCountableEdge @doc(category: "Products") {
"""The item at the end of the edge."""
node: Stock!
@@ -8937,7 +8937,7 @@ type GatewayConfigLine @doc(category: "Payments") {
value: String
}
-type ExternalAuthentication {
+type ExternalAuthentication @doc(category: "Authentication") {
"""ID of external authentication plugin."""
id: String!
@@ -8964,7 +8964,7 @@ type Domain {
url: String!
}
-type ShopTranslation implements Node {
+type ShopTranslation implements Node @doc(category: "Shop") {
id: ID!
"""Translation language."""
@@ -9530,7 +9530,7 @@ History log of the gift card.
Added in Saleor 3.1.
"""
-type GiftCardEvent implements Node {
+type GiftCardEvent implements Node @doc(category: "Gift cards") {
id: ID!
"""Date when event happened at in ISO 8601 format."""
@@ -11054,7 +11054,7 @@ type OrderEventOrderLineObject @doc(category: "Orders") {
discount: OrderEventDiscountObject
}
-type OrderEventDiscountObject {
+type OrderEventDiscountObject @doc(category: "Orders") {
"""Type of the discount: fixed or percent."""
valueType: DiscountValueTypeEnum!
@@ -11370,7 +11370,7 @@ enum CheckoutChargeStatusEnum @doc(category: "Checkout") {
OVERCHARGED
}
-type CheckoutCountableConnection {
+type CheckoutCountableConnection @doc(category: "Checkout") {
"""Pagination data for this connection."""
pageInfo: PageInfo!
edges: [CheckoutCountableEdge!]!
@@ -11379,7 +11379,7 @@ type CheckoutCountableConnection {
totalCount: Int
}
-type CheckoutCountableEdge {
+type CheckoutCountableEdge @doc(category: "Checkout") {
"""The item at the end of the edge."""
node: Checkout!
@@ -11387,7 +11387,7 @@ type CheckoutCountableEdge {
cursor: String!
}
-type GiftCardCountableConnection {
+type GiftCardCountableConnection @doc(category: "Gift cards") {
"""Pagination data for this connection."""
pageInfo: PageInfo!
edges: [GiftCardCountableEdge!]!
@@ -11396,7 +11396,7 @@ type GiftCardCountableConnection {
totalCount: Int
}
-type GiftCardCountableEdge {
+type GiftCardCountableEdge @doc(category: "Gift cards") {
"""The item at the end of the edge."""
node: GiftCard!
@@ -11404,7 +11404,7 @@ type GiftCardCountableEdge {
cursor: String!
}
-type OrderCountableConnection {
+type OrderCountableConnection @doc(category: "Orders") {
"""Pagination data for this connection."""
pageInfo: PageInfo!
edges: [OrderCountableEdge!]!
@@ -11413,7 +11413,7 @@ type OrderCountableConnection {
totalCount: Int
}
-type OrderCountableEdge {
+type OrderCountableEdge @doc(category: "Orders") {
"""The item at the end of the edge."""
node: Order!
@@ -11545,7 +11545,7 @@ type Limits {
}
"""Gift card related settings from site settings."""
-type GiftCardSettings {
+type GiftCardSettings @doc(category: "Gift cards") {
"""The gift card expiry type settings."""
expiryType: GiftCardSettingsExpiryTypeEnum!
@@ -11580,7 +11580,7 @@ input ShippingZoneFilterInput @doc(category: "Shipping") {
channels: [ID!]
}
-type DigitalContentCountableConnection {
+type DigitalContentCountableConnection @doc(category: "Products") {
"""Pagination data for this connection."""
pageInfo: PageInfo!
edges: [DigitalContentCountableEdge!]!
@@ -11589,7 +11589,7 @@ type DigitalContentCountableConnection {
totalCount: Int
}
-type DigitalContentCountableEdge {
+type DigitalContentCountableEdge @doc(category: "Products") {
"""The item at the end of the edge."""
node: DigitalContent!
@@ -11754,7 +11754,7 @@ enum ProductVariantSortField @doc(category: "Products") {
LAST_MODIFIED_AT
}
-type PaymentCountableConnection {
+type PaymentCountableConnection @doc(category: "Payments") {
"""Pagination data for this connection."""
pageInfo: PageInfo!
edges: [PaymentCountableEdge!]!
@@ -11763,7 +11763,7 @@ type PaymentCountableConnection {
totalCount: Int
}
-type PaymentCountableEdge {
+type PaymentCountableEdge @doc(category: "Payments") {
"""The item at the end of the edge."""
node: Payment!
@@ -11781,7 +11781,7 @@ input PaymentFilterInput @doc(category: "Payments") {
checkouts: [ID!]
}
-type PageCountableConnection {
+type PageCountableConnection @doc(category: "Pages") {
"""Pagination data for this connection."""
pageInfo: PageInfo!
edges: [PageCountableEdge!]!
@@ -11790,7 +11790,7 @@ type PageCountableConnection {
totalCount: Int
}
-type PageCountableEdge {
+type PageCountableEdge @doc(category: "Pages") {
"""The item at the end of the edge."""
node: Page!
@@ -11853,7 +11853,7 @@ input PageFilterInput @doc(category: "Pages") {
slugs: [String!]
}
-type PageTypeCountableConnection {
+type PageTypeCountableConnection @doc(category: "Pages") {
"""Pagination data for this connection."""
pageInfo: PageInfo!
edges: [PageTypeCountableEdge!]!
@@ -11862,7 +11862,7 @@ type PageTypeCountableConnection {
totalCount: Int
}
-type PageTypeCountableEdge {
+type PageTypeCountableEdge @doc(category: "Pages") {
"""The item at the end of the edge."""
node: PageType!
@@ -11891,7 +11891,7 @@ input PageTypeFilterInput @doc(category: "Pages") {
slugs: [String!]
}
-type OrderEventCountableConnection {
+type OrderEventCountableConnection @doc(category: "Orders") {
"""Pagination data for this connection."""
pageInfo: PageInfo!
edges: [OrderEventCountableEdge!]!
@@ -11900,7 +11900,7 @@ type OrderEventCountableConnection {
totalCount: Int
}
-type OrderEventCountableEdge {
+type OrderEventCountableEdge @doc(category: "Orders") {
"""The item at the end of the edge."""
node: OrderEvent!
@@ -11990,7 +11990,7 @@ input OrderDraftFilterInput @doc(category: "Orders") {
channels: [ID!]
}
-type MenuCountableConnection {
+type MenuCountableConnection @doc(category: "Menu") {
"""Pagination data for this connection."""
pageInfo: PageInfo!
edges: [MenuCountableEdge!]!
@@ -11999,7 +11999,7 @@ type MenuCountableConnection {
totalCount: Int
}
-type MenuCountableEdge {
+type MenuCountableEdge @doc(category: "Menu") {
"""The item at the end of the edge."""
node: Menu!
@@ -12030,7 +12030,7 @@ input MenuFilterInput {
slugs: [String!]
}
-type MenuItemCountableConnection {
+type MenuItemCountableConnection @doc(category: "Menu") {
"""Pagination data for this connection."""
pageInfo: PageInfo!
edges: [MenuItemCountableEdge!]!
@@ -12039,7 +12039,7 @@ type MenuItemCountableConnection {
totalCount: Int
}
-type MenuItemCountableEdge {
+type MenuItemCountableEdge @doc(category: "Menu") {
"""The item at the end of the edge."""
node: MenuItem!
@@ -12104,7 +12104,7 @@ input GiftCardFilterInput @doc(category: "Gift cards") {
code: String
}
-type GiftCardTagCountableConnection {
+type GiftCardTagCountableConnection @doc(category: "Gift cards") {
"""Pagination data for this connection."""
pageInfo: PageInfo!
edges: [GiftCardTagCountableEdge!]!
@@ -12113,7 +12113,7 @@ type GiftCardTagCountableConnection {
totalCount: Int
}
-type GiftCardTagCountableEdge {
+type GiftCardTagCountableEdge @doc(category: "Gift cards") {
"""The item at the end of the edge."""
node: GiftCardTag!
@@ -12230,7 +12230,7 @@ enum PluginSortField {
IS_ACTIVE
}
-type SaleCountableConnection {
+type SaleCountableConnection @doc(category: "Discounts") {
"""Pagination data for this connection."""
pageInfo: PageInfo!
edges: [SaleCountableEdge!]!
@@ -12239,7 +12239,7 @@ type SaleCountableConnection {
totalCount: Int
}
-type SaleCountableEdge {
+type SaleCountableEdge @doc(category: "Discounts") {
"""The item at the end of the edge."""
node: Sale!
@@ -12304,7 +12304,7 @@ enum SaleSortField @doc(category: "Discounts") {
LAST_MODIFIED_AT
}
-type VoucherCountableConnection {
+type VoucherCountableConnection @doc(category: "Discounts") {
"""Pagination data for this connection."""
pageInfo: PageInfo!
edges: [VoucherCountableEdge!]!
@@ -12313,7 +12313,7 @@ type VoucherCountableConnection {
totalCount: Int
}
-type VoucherCountableEdge {
+type VoucherCountableEdge @doc(category: "Discounts") {
"""The item at the end of the edge."""
node: Voucher!
@@ -12513,7 +12513,7 @@ input CheckoutFilterInput @doc(category: "Checkout") {
chargeStatus: [CheckoutChargeStatusEnum!]
}
-type CheckoutLineCountableConnection {
+type CheckoutLineCountableConnection @doc(category: "Checkout") {
"""Pagination data for this connection."""
pageInfo: PageInfo!
edges: [CheckoutLineCountableEdge!]!
@@ -12522,7 +12522,7 @@ type CheckoutLineCountableConnection {
totalCount: Int
}
-type CheckoutLineCountableEdge {
+type CheckoutLineCountableEdge @doc(category: "Checkout") {
"""The item at the end of the edge."""
node: CheckoutLine!
@@ -12597,7 +12597,7 @@ type AppCountableConnection @doc(category: "Apps") {
totalCount: Int
}
-type AppCountableEdge {
+type AppCountableEdge @doc(category: "Apps") {
"""The item at the end of the edge."""
node: App!
@@ -12636,7 +12636,7 @@ type AppExtensionCountableConnection @doc(category: "Apps") {
totalCount: Int
}
-type AppExtensionCountableEdge {
+type AppExtensionCountableEdge @doc(category: "Apps") {
"""The item at the end of the edge."""
node: AppExtension!
@@ -12684,7 +12684,7 @@ type UserCountableConnection @doc(category: "Users") {
totalCount: Int
}
-type UserCountableEdge {
+type UserCountableEdge @doc(category: "Users") {
"""The item at the end of the edge."""
node: User!
@@ -12745,7 +12745,7 @@ type GroupCountableConnection @doc(category: "Users") {
totalCount: Int
}
-type GroupCountableEdge {
+type GroupCountableEdge @doc(category: "Users") {
"""The item at the end of the edge."""
node: Group!
@@ -13080,7 +13080,7 @@ type Mutation {
shopDomainUpdate(
"""Fields required to update site."""
input: SiteDomainInput
- ): ShopDomainUpdate
+ ): ShopDomainUpdate @doc(category: "Shop")
"""
Updates shop settings.
@@ -13090,14 +13090,14 @@ type Mutation {
shopSettingsUpdate(
"""Fields required to update shop settings."""
input: ShopSettingsInput!
- ): ShopSettingsUpdate
+ ): ShopSettingsUpdate @doc(category: "Shop")
"""
Fetch tax rates.
Requires one of the following permissions: MANAGE_SETTINGS.
"""
- shopFetchTaxRates: ShopFetchTaxRates @deprecated(reason: "\\n\\nDEPRECATED: this mutation will be removed in Saleor 4.0.")
+ shopFetchTaxRates: ShopFetchTaxRates @doc(category: "Shop") @deprecated(reason: "\\n\\nDEPRECATED: this mutation will be removed in Saleor 4.0.")
"""
Creates/updates translations for shop settings.
@@ -13110,7 +13110,7 @@ type Mutation {
"""Translation language code."""
languageCode: LanguageCodeEnum!
- ): ShopSettingsTranslate
+ ): ShopSettingsTranslate @doc(category: "Shop")
"""
Update the shop's address. If the `null` value is passed, the currently selected address will be deleted.
@@ -13120,7 +13120,7 @@ type Mutation {
shopAddressUpdate(
"""Fields required to update shop address."""
input: AddressInput
- ): ShopAddressUpdate
+ ): ShopAddressUpdate @doc(category: "Shop")
"""
Update shop order settings across all channels. Returns `orderSettings` for the first `channel` in alphabetical order.
@@ -13782,7 +13782,7 @@ type Mutation {
digitalContentUrlCreate(
"""Fields required to create a new url."""
input: DigitalContentUrlCreateInput!
- ): DigitalContentUrlCreate
+ ): DigitalContentUrlCreate @doc(category: "Products")
"""
Creates a new variant for a product.
@@ -14904,7 +14904,7 @@ type Mutation {
"""Type of the navigation bar to assign the menu to."""
navigationType: NavigationType!
- ): AssignNavigation
+ ): AssignNavigation @doc(category: "Menu")
"""
Creates a new Menu.
@@ -14914,7 +14914,7 @@ type Mutation {
menuCreate(
"""Fields required to create a menu."""
input: MenuCreateInput!
- ): MenuCreate
+ ): MenuCreate @doc(category: "Menu")
"""
Deletes a menu.
@@ -14924,7 +14924,7 @@ type Mutation {
menuDelete(
"""ID of a menu to delete."""
id: ID!
- ): MenuDelete
+ ): MenuDelete @doc(category: "Menu")
"""
Deletes menus.
@@ -14934,7 +14934,7 @@ type Mutation {
menuBulkDelete(
"""List of menu IDs to delete."""
ids: [ID!]!
- ): MenuBulkDelete
+ ): MenuBulkDelete @doc(category: "Menu")
"""
Updates a menu.
@@ -14947,7 +14947,7 @@ type Mutation {
"""Fields required to update a menu."""
input: MenuInput!
- ): MenuUpdate
+ ): MenuUpdate @doc(category: "Menu")
"""
Creates a new menu item.
@@ -14959,7 +14959,7 @@ type Mutation {
Fields required to update a menu item. Only one of `url`, `category`, `page`, `collection` is allowed per item.
"""
input: MenuItemCreateInput!
- ): MenuItemCreate
+ ): MenuItemCreate @doc(category: "Menu")
"""
Deletes a menu item.
@@ -14969,7 +14969,7 @@ type Mutation {
menuItemDelete(
"""ID of a menu item to delete."""
id: ID!
- ): MenuItemDelete
+ ): MenuItemDelete @doc(category: "Menu")
"""
Deletes menu items.
@@ -14979,7 +14979,7 @@ type Mutation {
menuItemBulkDelete(
"""List of menu item IDs to delete."""
ids: [ID!]!
- ): MenuItemBulkDelete
+ ): MenuItemBulkDelete @doc(category: "Menu")
"""
Updates a menu item.
@@ -14994,7 +14994,7 @@ type Mutation {
Fields required to update a menu item. Only one of `url`, `category`, `page`, `collection` is allowed per item.
"""
input: MenuItemInput!
- ): MenuItemUpdate
+ ): MenuItemUpdate @doc(category: "Menu")
"""
Creates/updates translations for a menu item.
@@ -15008,7 +15008,7 @@ type Mutation {
"""Translation language code."""
languageCode: LanguageCodeEnum!
- ): MenuItemTranslate
+ ): MenuItemTranslate @doc(category: "Menu")
"""
Moves items of menus.
@@ -15021,7 +15021,7 @@ type Mutation {
"""The menu position data."""
moves: [MenuItemMoveInput!]!
- ): MenuItemMove
+ ): MenuItemMove @doc(category: "Menu")
"""
Request an invoice for the order using plugin.
@@ -17657,7 +17657,7 @@ type StaffNotificationRecipientCreate @doc(category: "Users") {
staffNotificationRecipient: StaffNotificationRecipient
}
-type ShopError {
+type ShopError @doc(category: "Shop") {
"""
Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
"""
@@ -17719,7 +17719,7 @@ Updates site domain of the shop.
Requires one of the following permissions: MANAGE_SETTINGS.
"""
-type ShopDomainUpdate {
+type ShopDomainUpdate @doc(category: "Shop") {
"""Updated shop."""
shop: Shop
shopErrors: [ShopError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -17739,7 +17739,7 @@ Updates shop settings.
Requires one of the following permissions: MANAGE_SETTINGS.
"""
-type ShopSettingsUpdate {
+type ShopSettingsUpdate @doc(category: "Shop") {
"""Updated shop."""
shop: Shop
shopErrors: [ShopError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -17839,7 +17839,7 @@ Fetch tax rates.
Requires one of the following permissions: MANAGE_SETTINGS.
"""
-type ShopFetchTaxRates {
+type ShopFetchTaxRates @doc(category: "Shop") {
"""Updated shop."""
shop: Shop
shopErrors: [ShopError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -17851,7 +17851,7 @@ Creates/updates translations for shop settings.
Requires one of the following permissions: MANAGE_TRANSLATIONS.
"""
-type ShopSettingsTranslate {
+type ShopSettingsTranslate @doc(category: "Shop") {
"""Updated shop settings."""
shop: Shop
translationErrors: [TranslationError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -17889,7 +17889,7 @@ Update the shop's address. If the `null` value is passed, the currently selected
Requires one of the following permissions: MANAGE_SETTINGS.
"""
-type ShopAddressUpdate {
+type ShopAddressUpdate @doc(category: "Shop") {
"""Updated shop."""
shop: Shop
shopErrors: [ShopError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -19033,7 +19033,7 @@ type ProductBulkResult @doc(category: "Products") {
errors: [ProductBulkCreateError!]
}
-type ProductBulkCreateError {
+type ProductBulkCreateError @doc(category: "Products") {
"""
Path to field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
"""
@@ -19894,7 +19894,7 @@ Generate new URL to digital content.
Requires one of the following permissions: MANAGE_PRODUCTS.
"""
-type DigitalContentUrlCreate {
+type DigitalContentUrlCreate @doc(category: "Products") {
productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [ProductError!]!
digitalContentUrl: DigitalContentUrl
@@ -20959,7 +20959,7 @@ type TransactionEventReport @doc(category: "Payments") {
errors: [TransactionEventReportError!]!
}
-type TransactionEventReportError {
+type TransactionEventReportError @doc(category: "Payments") {
"""
Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
"""
@@ -20993,7 +20993,7 @@ type PaymentGatewayInitialize @doc(category: "Payments") {
errors: [PaymentGatewayInitializeError!]!
}
-type PaymentGatewayConfig {
+type PaymentGatewayConfig @doc(category: "Payments") {
"""The app identifier."""
id: String!
@@ -21004,7 +21004,7 @@ type PaymentGatewayConfig {
scalar JSON
-type PaymentGatewayConfigError {
+type PaymentGatewayConfigError @doc(category: "Payments") {
"""
Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
"""
@@ -21024,7 +21024,7 @@ enum PaymentGatewayConfigErrorCode @doc(category: "Payments") {
NOT_FOUND
}
-type PaymentGatewayInitializeError {
+type PaymentGatewayInitializeError @doc(category: "Payments") {
"""
Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
"""
@@ -21071,7 +21071,7 @@ type TransactionInitialize @doc(category: "Payments") {
errors: [TransactionInitializeError!]!
}
-type TransactionInitializeError {
+type TransactionInitializeError @doc(category: "Payments") {
"""
Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
"""
@@ -21110,7 +21110,7 @@ type TransactionProcess @doc(category: "Payments") {
errors: [TransactionProcessError!]!
}
-type TransactionProcessError {
+type TransactionProcessError @doc(category: "Payments") {
"""
Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
"""
@@ -22269,14 +22269,14 @@ Assigns storefront's navigation menus.
Requires one of the following permissions: MANAGE_MENUS, MANAGE_SETTINGS.
"""
-type AssignNavigation {
+type AssignNavigation @doc(category: "Menu") {
"""Assigned navigation menu."""
menu: Menu
menuErrors: [MenuError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [MenuError!]!
}
-type MenuError {
+type MenuError @doc(category: "Menu") {
"""
Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
"""
@@ -22315,7 +22315,7 @@ Creates a new Menu.
Requires one of the following permissions: MANAGE_MENUS.
"""
-type MenuCreate {
+type MenuCreate @doc(category: "Menu") {
menuErrors: [MenuError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [MenuError!]!
menu: Menu
@@ -22354,7 +22354,7 @@ Deletes a menu.
Requires one of the following permissions: MANAGE_MENUS.
"""
-type MenuDelete {
+type MenuDelete @doc(category: "Menu") {
menuErrors: [MenuError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [MenuError!]!
menu: Menu
@@ -22365,7 +22365,7 @@ Deletes menus.
Requires one of the following permissions: MANAGE_MENUS.
"""
-type MenuBulkDelete {
+type MenuBulkDelete @doc(category: "Menu") {
"""Returns how many objects were affected."""
count: Int!
menuErrors: [MenuError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -22377,7 +22377,7 @@ Updates a menu.
Requires one of the following permissions: MANAGE_MENUS.
"""
-type MenuUpdate {
+type MenuUpdate @doc(category: "Menu") {
menuErrors: [MenuError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [MenuError!]!
menu: Menu
@@ -22396,7 +22396,7 @@ Creates a new menu item.
Requires one of the following permissions: MANAGE_MENUS.
"""
-type MenuItemCreate {
+type MenuItemCreate @doc(category: "Menu") {
menuErrors: [MenuError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [MenuError!]!
menuItem: MenuItem
@@ -22430,7 +22430,7 @@ Deletes a menu item.
Requires one of the following permissions: MANAGE_MENUS.
"""
-type MenuItemDelete {
+type MenuItemDelete @doc(category: "Menu") {
menuErrors: [MenuError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [MenuError!]!
menuItem: MenuItem
@@ -22441,7 +22441,7 @@ Deletes menu items.
Requires one of the following permissions: MANAGE_MENUS.
"""
-type MenuItemBulkDelete {
+type MenuItemBulkDelete @doc(category: "Menu") {
"""Returns how many objects were affected."""
count: Int!
menuErrors: [MenuError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -22453,7 +22453,7 @@ Updates a menu item.
Requires one of the following permissions: MANAGE_MENUS.
"""
-type MenuItemUpdate {
+type MenuItemUpdate @doc(category: "Menu") {
menuErrors: [MenuError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [MenuError!]!
menuItem: MenuItem
@@ -22464,7 +22464,7 @@ Creates/updates translations for a menu item.
Requires one of the following permissions: MANAGE_TRANSLATIONS.
"""
-type MenuItemTranslate {
+type MenuItemTranslate @doc(category: "Menu") {
translationErrors: [TranslationError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [TranslationError!]!
menuItem: MenuItem
@@ -22475,7 +22475,7 @@ Moves items of menus.
Requires one of the following permissions: MANAGE_MENUS.
"""
-type MenuItemMove {
+type MenuItemMove @doc(category: "Menu") {
"""Assigned menu to move within."""
menu: Menu
menuErrors: [MenuError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -25456,7 +25456,7 @@ type CustomerBulkResult @doc(category: "Users") {
errors: [CustomerBulkUpdateError!]
}
-type CustomerBulkUpdateError {
+type CustomerBulkUpdateError @doc(category: "Users") {
"""
Path to field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
"""
@@ -26387,7 +26387,7 @@ Event sent when new menu is created.
Added in Saleor 3.4.
"""
-type MenuCreated implements Event {
+type MenuCreated implements Event @doc(category: "Menu") {
"""Time of the event."""
issuedAt: DateTime
@@ -26412,7 +26412,7 @@ Event sent when menu is updated.
Added in Saleor 3.4.
"""
-type MenuUpdated implements Event {
+type MenuUpdated implements Event @doc(category: "Menu") {
"""Time of the event."""
issuedAt: DateTime
@@ -26437,7 +26437,7 @@ Event sent when menu is deleted.
Added in Saleor 3.4.
"""
-type MenuDeleted implements Event {
+type MenuDeleted implements Event @doc(category: "Menu") {
"""Time of the event."""
issuedAt: DateTime
@@ -26462,7 +26462,7 @@ Event sent when new menu item is created.
Added in Saleor 3.4.
"""
-type MenuItemCreated implements Event {
+type MenuItemCreated implements Event @doc(category: "Menu") {
"""Time of the event."""
issuedAt: DateTime
@@ -26487,7 +26487,7 @@ Event sent when menu item is updated.
Added in Saleor 3.4.
"""
-type MenuItemUpdated implements Event {
+type MenuItemUpdated implements Event @doc(category: "Menu") {
"""Time of the event."""
issuedAt: DateTime
@@ -26512,7 +26512,7 @@ Event sent when menu item is deleted.
Added in Saleor 3.4.
"""
-type MenuItemDeleted implements Event {
+type MenuItemDeleted implements Event @doc(category: "Menu") {
"""Time of the event."""
issuedAt: DateTime
@@ -27067,7 +27067,7 @@ Added in Saleor 3.11.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type ProductVariantStockUpdated implements Event {
+type ProductVariantStockUpdated implements Event @doc(category: "Products") {
"""Time of the event."""
issuedAt: DateTime
@@ -27890,7 +27890,7 @@ Event sent when new shipping price is created.
Added in Saleor 3.2.
"""
-type ShippingPriceCreated implements Event {
+type ShippingPriceCreated implements Event @doc(category: "Shipping") {
"""Time of the event."""
issuedAt: DateTime
@@ -27921,7 +27921,7 @@ Event sent when shipping price is updated.
Added in Saleor 3.2.
"""
-type ShippingPriceUpdated implements Event {
+type ShippingPriceUpdated implements Event @doc(category: "Shipping") {
"""Time of the event."""
issuedAt: DateTime
@@ -27952,7 +27952,7 @@ Event sent when shipping price is deleted.
Added in Saleor 3.2.
"""
-type ShippingPriceDeleted implements Event {
+type ShippingPriceDeleted implements Event @doc(category: "Shipping") {
"""Time of the event."""
issuedAt: DateTime
@@ -28151,7 +28151,7 @@ Added in Saleor 3.4.
DEPRECATED: this subscription will be removed in Saleor 3.14 (Preview Feature). Use `TransactionChargeRequested`, `TransactionRefundRequested`, `TransactionCancelationRequested` instead.
"""
-type TransactionActionRequest implements Event {
+type TransactionActionRequest implements Event @doc(category: "Payments") {
"""Time of the event."""
issuedAt: DateTime
@@ -28171,7 +28171,7 @@ type TransactionActionRequest implements Event {
action: TransactionAction!
}
-type TransactionAction {
+type TransactionAction @doc(category: "Payments") {
"""Determines the action type."""
actionType: TransactionActionEnum!
@@ -28487,7 +28487,7 @@ Authorize payment.
Added in Saleor 3.6.
"""
-type PaymentAuthorize implements Event {
+type PaymentAuthorize implements Event @doc(category: "Payments") {
"""Time of the event."""
issuedAt: DateTime
@@ -28509,7 +28509,7 @@ Capture payment.
Added in Saleor 3.6.
"""
-type PaymentCaptureEvent implements Event {
+type PaymentCaptureEvent implements Event @doc(category: "Payments") {
"""Time of the event."""
issuedAt: DateTime
@@ -28531,7 +28531,7 @@ Refund payment.
Added in Saleor 3.6.
"""
-type PaymentRefundEvent implements Event {
+type PaymentRefundEvent implements Event @doc(category: "Payments") {
"""Time of the event."""
issuedAt: DateTime
@@ -28553,7 +28553,7 @@ Void payment.
Added in Saleor 3.6.
"""
-type PaymentVoidEvent implements Event {
+type PaymentVoidEvent implements Event @doc(category: "Payments") {
"""Time of the event."""
issuedAt: DateTime
@@ -28575,7 +28575,7 @@ Confirm payment.
Added in Saleor 3.6.
"""
-type PaymentConfirmEvent implements Event {
+type PaymentConfirmEvent implements Event @doc(category: "Payments") {
"""Time of the event."""
issuedAt: DateTime
@@ -28597,7 +28597,7 @@ Process payment.
Added in Saleor 3.6.
"""
-type PaymentProcessEvent implements Event {
+type PaymentProcessEvent implements Event @doc(category: "Payments") {
"""Time of the event."""
issuedAt: DateTime
@@ -28619,7 +28619,7 @@ List payment gateways.
Added in Saleor 3.6.
"""
-type PaymentListGateways implements Event {
+type PaymentListGateways implements Event @doc(category: "Payments") {
"""Time of the event."""
issuedAt: DateTime
@@ -28643,7 +28643,7 @@ Added in Saleor 3.13.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type TransactionCancelationRequested implements Event {
+type TransactionCancelationRequested implements Event @doc(category: "Payments") {
"""Time of the event."""
issuedAt: DateTime
@@ -28670,7 +28670,7 @@ Added in Saleor 3.13.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type TransactionChargeRequested implements Event {
+type TransactionChargeRequested implements Event @doc(category: "Payments") {
"""Time of the event."""
issuedAt: DateTime
@@ -28697,7 +28697,7 @@ Added in Saleor 3.13.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type TransactionRefundRequested implements Event {
+type TransactionRefundRequested implements Event @doc(category: "Payments") {
"""Time of the event."""
issuedAt: DateTime
@@ -28722,7 +28722,7 @@ Filter shipping methods for order.
Added in Saleor 3.6.
"""
-type OrderFilterShippingMethods implements Event {
+type OrderFilterShippingMethods implements Event @doc(category: "Orders") {
"""Time of the event."""
issuedAt: DateTime
@@ -28751,7 +28751,7 @@ Filter shipping methods for checkout.
Added in Saleor 3.6.
"""
-type CheckoutFilterShippingMethods implements Event {
+type CheckoutFilterShippingMethods implements Event @doc(category: "Checkout") {
"""Time of the event."""
issuedAt: DateTime
@@ -28780,7 +28780,7 @@ List shipping methods for checkout.
Added in Saleor 3.6.
"""
-type ShippingListMethodsForCheckout implements Event {
+type ShippingListMethodsForCheckout implements Event @doc(category: "Checkout") {
"""Time of the event."""
issuedAt: DateTime
@@ -28809,7 +28809,7 @@ Synchronous webhook for calculating checkout/order taxes.
Added in Saleor 3.7.
"""
-type CalculateTaxes implements Event {
+type CalculateTaxes implements Event @doc(category: "Taxes") {
"""Time of the event."""
issuedAt: DateTime
@@ -28893,7 +28893,7 @@ Added in Saleor 3.13.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type PaymentGatewayInitializeSession implements Event {
+type PaymentGatewayInitializeSession implements Event @doc(category: "Payments") {
"""Time of the event."""
issuedAt: DateTime
@@ -28925,7 +28925,7 @@ Added in Saleor 3.13.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type TransactionInitializeSession implements Event {
+type TransactionInitializeSession implements Event @doc(category: "Payments") {
"""Time of the event."""
issuedAt: DateTime
@@ -28954,7 +28954,7 @@ type TransactionInitializeSession implements Event {
action: TransactionProcessAction!
}
-type TransactionProcessAction {
+type TransactionProcessAction @doc(category: "Payments") {
"""Transaction amount to process."""
amount: PositiveDecimal!
@@ -28970,7 +28970,7 @@ Added in Saleor 3.13.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type TransactionProcessSession implements Event {
+type TransactionProcessSession implements Event @doc(category: "Payments") {
"""Time of the event."""
issuedAt: DateTime
diff --git a/saleor/graphql/shipping/types.py b/saleor/graphql/shipping/types.py
index bd47c463da..1570d35016 100644
--- a/saleor/graphql/shipping/types.py
+++ b/saleor/graphql/shipping/types.py
@@ -404,6 +404,7 @@ class ShippingMethod(BaseObjectType):
class ShippingZoneCountableConnection(CountableConnection):
class Meta:
+ doc_category = DOC_CATEGORY_SHIPPING
node = ShippingZone
diff --git a/saleor/graphql/shop/mutations.py b/saleor/graphql/shop/mutations.py
index bf4eb8124e..e1b75e41da 100644
--- a/saleor/graphql/shop/mutations.py
+++ b/saleor/graphql/shop/mutations.py
@@ -14,7 +14,11 @@ from ..account.types import AddressInput, StaffNotificationRecipient
from ..channel.types import OrderSettings
from ..core import ResolveInfo
from ..core.descriptions import ADDED_IN_31, DEPRECATED_IN_3X_INPUT
-from ..core.doc_category import DOC_CATEGORY_GIFT_CARDS, DOC_CATEGORY_ORDERS
+from ..core.doc_category import (
+ DOC_CATEGORY_GIFT_CARDS,
+ DOC_CATEGORY_ORDERS,
+ DOC_CATEGORY_SHOP,
+)
from ..core.enums import WeightUnitsEnum
from ..core.mutations import BaseMutation, ModelDeleteMutation, ModelMutation
from ..core.types import (
@@ -110,6 +114,9 @@ class SiteDomainInput(graphene.InputObjectType):
domain = graphene.String(description="Domain name for shop.")
name = graphene.String(description="Shop site name.")
+ class Meta:
+ doc_category = DOC_CATEGORY_SHOP
+
class ShopSettingsUpdate(BaseMutation):
shop = graphene.Field(Shop, description="Updated shop.")
@@ -121,6 +128,7 @@ class ShopSettingsUpdate(BaseMutation):
class Meta:
description = "Updates shop settings."
+ doc_category = DOC_CATEGORY_SHOP
permissions = (SitePermissions.MANAGE_SETTINGS,)
error_type_class = ShopError
error_type_field = "shop_errors"
@@ -191,6 +199,7 @@ class ShopAddressUpdate(BaseMutation, I18nMixin):
"Update the shop's address. If the `null` value is passed, the currently "
"selected address will be deleted."
)
+ doc_category = DOC_CATEGORY_SHOP
permissions = (SitePermissions.MANAGE_SETTINGS,)
error_type_class = ShopError
error_type_field = "shop_errors"
@@ -225,6 +234,7 @@ class ShopDomainUpdate(BaseMutation):
class Meta:
description = "Updates site domain of the shop."
+ doc_category = DOC_CATEGORY_SHOP
permissions = (SitePermissions.MANAGE_SETTINGS,)
error_type_class = ShopError
error_type_field = "shop_errors"
@@ -250,6 +260,7 @@ class ShopFetchTaxRates(BaseMutation):
class Meta:
description = "Fetch tax rates."
+ doc_category = DOC_CATEGORY_SHOP
permissions = (SitePermissions.MANAGE_SETTINGS,)
error_type_class = ShopError
error_type_field = "shop_errors"
diff --git a/saleor/graphql/shop/types.py b/saleor/graphql/shop/types.py
index b0d5caf268..8f540ae44c 100644
--- a/saleor/graphql/shop/types.py
+++ b/saleor/graphql/shop/types.py
@@ -21,10 +21,16 @@ from ..core.descriptions import (
DEPRECATED_IN_3X_FIELD,
DEPRECATED_IN_3X_INPUT,
)
+from ..core.doc_category import (
+ DOC_CATEGORY_AUTH,
+ DOC_CATEGORY_GIFT_CARDS,
+ DOC_CATEGORY_ORDERS,
+)
from ..core.enums import LanguageCodeEnum, WeightUnitsEnum
from ..core.fields import PermissionsField
from ..core.tracing import traced_resolver
from ..core.types import (
+ BaseObjectType,
CountryDisplay,
LanguageDisplay,
ModelObjectType,
@@ -62,6 +68,7 @@ class OrderSettings(ModelObjectType[site_models.SiteSettings]):
class Meta:
description = "Order related settings from site settings."
+ doc_category = DOC_CATEGORY_ORDERS
model = site_models.SiteSettings
@@ -75,6 +82,7 @@ class GiftCardSettings(ModelObjectType[site_models.SiteSettings]):
class Meta:
description = "Gift card related settings from site settings."
+ doc_category = DOC_CATEGORY_GIFT_CARDS
model = site_models.SiteSettings
def resolve_expiry_type(root, info):
@@ -88,12 +96,15 @@ class GiftCardSettings(ModelObjectType[site_models.SiteSettings]):
)
-class ExternalAuthentication(graphene.ObjectType):
+class ExternalAuthentication(BaseObjectType):
id = graphene.String(
description="ID of external authentication plugin.", required=True
)
name = graphene.String(description="Name of external authentication plugin.")
+ class Meta:
+ doc_category = DOC_CATEGORY_AUTH
+
class Limits(graphene.ObjectType):
channels = graphene.Int()
diff --git a/saleor/graphql/translations/mutations.py b/saleor/graphql/translations/mutations.py
index d0f472e728..4b8ee362e1 100644
--- a/saleor/graphql/translations/mutations.py
+++ b/saleor/graphql/translations/mutations.py
@@ -21,6 +21,7 @@ from ..attribute.types import Attribute, AttributeValue
from ..channel import ChannelContext
from ..core import ResolveInfo
from ..core.descriptions import RICH_CONTENT
+from ..core.doc_category import DOC_CATEGORY_SHOP
from ..core.enums import LanguageCodeEnum, TranslationErrorCode
from ..core.fields import JSONString
from ..core.mutations import BaseMutation, ModelMutation
@@ -538,6 +539,7 @@ class ShopSettingsTranslate(BaseMutation):
class Meta:
description = "Creates/updates translations for shop settings."
+ doc_category = DOC_CATEGORY_SHOP
error_type_class = TranslationError
error_type_field = "translation_errors"
permissions = (SitePermissions.MANAGE_TRANSLATIONS,)
diff --git a/saleor/graphql/webhook/subscription_types.py b/saleor/graphql/webhook/subscription_types.py
index 468fc60028..5b03c66b47 100644
--- a/saleor/graphql/webhook/subscription_types.py
+++ b/saleor/graphql/webhook/subscription_types.py
@@ -40,6 +40,14 @@ from ..core.descriptions import (
ADDED_IN_313,
PREVIEW_FEATURE,
)
+from ..core.doc_category import (
+ DOC_CATEGORY_CHECKOUT,
+ DOC_CATEGORY_ORDERS,
+ DOC_CATEGORY_PAYMENTS,
+ DOC_CATEGORY_PRODUCTS,
+ DOC_CATEGORY_SHIPPING,
+ DOC_CATEGORY_TAXES,
+)
from ..core.scalars import JSON, PositiveDecimal
from ..core.types import NonNullList, SubscriptionObjectType
from ..core.types.order_or_checkout import OrderOrCheckout
@@ -817,6 +825,7 @@ class ProductVariantStockUpdated(SubscriptionObjectType, ProductVariantBase):
+ ADDED_IN_311
+ PREVIEW_FEATURE
)
+ doc_category = DOC_CATEGORY_PRODUCTS
@staticmethod
def resolve_product_variant(root, info: ResolveInfo, channel=None):
@@ -1265,6 +1274,7 @@ class ShippingPriceCreated(SubscriptionObjectType, ShippingPriceBase):
enable_dry_run = False
interfaces = (Event,)
description = "Event sent when new shipping price is created." + ADDED_IN_32
+ doc_category = DOC_CATEGORY_SHIPPING
class ShippingPriceUpdated(SubscriptionObjectType, ShippingPriceBase):
@@ -1273,6 +1283,7 @@ class ShippingPriceUpdated(SubscriptionObjectType, ShippingPriceBase):
enable_dry_run = False
interfaces = (Event,)
description = "Event sent when shipping price is updated." + ADDED_IN_32
+ doc_category = DOC_CATEGORY_SHIPPING
class ShippingPriceDeleted(SubscriptionObjectType, ShippingPriceBase):
@@ -1281,6 +1292,7 @@ class ShippingPriceDeleted(SubscriptionObjectType, ShippingPriceBase):
enable_dry_run = False
interfaces = (Event,)
description = "Event sent when shipping price is deleted." + ADDED_IN_32
+ doc_category = DOC_CATEGORY_SHIPPING
class ShippingZoneBase(AbstractType):
@@ -1364,6 +1376,9 @@ class TransactionAction(SubscriptionObjectType, AbstractType):
description="Transaction request amount. Null when action type is VOID.",
)
+ class Meta:
+ doc_category = DOC_CATEGORY_PAYMENTS
+
@staticmethod
def resolve_amount(root: TransactionActionData, _info: ResolveInfo):
if root.action_value:
@@ -1407,6 +1422,7 @@ class TransactionActionRequest(TransactionActionBase, SubscriptionObjectType):
+ "(Preview Feature). Use `TransactionChargeRequested`, "
+ "`TransactionRefundRequested`, `TransactionCancelationRequested` instead."
)
+ doc_category = DOC_CATEGORY_PAYMENTS
class TransactionChargeRequested(TransactionActionBase, SubscriptionObjectType):
@@ -1419,6 +1435,7 @@ class TransactionChargeRequested(TransactionActionBase, SubscriptionObjectType):
+ ADDED_IN_313
+ PREVIEW_FEATURE
)
+ doc_category = DOC_CATEGORY_PAYMENTS
class TransactionRefundRequested(TransactionActionBase, SubscriptionObjectType):
@@ -1431,6 +1448,7 @@ class TransactionRefundRequested(TransactionActionBase, SubscriptionObjectType):
+ ADDED_IN_313
+ PREVIEW_FEATURE
)
+ doc_category = DOC_CATEGORY_PAYMENTS
class TransactionCancelationRequested(TransactionActionBase, SubscriptionObjectType):
@@ -1443,6 +1461,7 @@ class TransactionCancelationRequested(TransactionActionBase, SubscriptionObjectT
+ ADDED_IN_313
+ PREVIEW_FEATURE
)
+ doc_category = DOC_CATEGORY_PAYMENTS
class PaymentGatewayInitializeSession(SubscriptionObjectType):
@@ -1467,6 +1486,7 @@ class PaymentGatewayInitializeSession(SubscriptionObjectType):
+ ADDED_IN_313
+ PREVIEW_FEATURE
)
+ doc_category = DOC_CATEGORY_PAYMENTS
@staticmethod
def resolve_source_object(root, _info: ResolveInfo):
@@ -1494,6 +1514,9 @@ class TransactionProcessAction(SubscriptionObjectType, AbstractType):
currency = graphene.String(description="Currency of the amount.", required=True)
action_type = graphene.Field(TransactionFlowStrategyEnum, required=True)
+ class Meta:
+ doc_category = DOC_CATEGORY_PAYMENTS
+
class TransactionSessionBase(SubscriptionObjectType, AbstractType):
transaction = graphene.Field(
@@ -1562,6 +1585,7 @@ class TransactionInitializeSession(TransactionSessionBase):
+ ADDED_IN_313
+ PREVIEW_FEATURE
)
+ doc_category = DOC_CATEGORY_PAYMENTS
class TransactionProcessSession(TransactionSessionBase):
@@ -1574,6 +1598,7 @@ class TransactionProcessSession(TransactionSessionBase):
+ ADDED_IN_313
+ PREVIEW_FEATURE
)
+ doc_category = DOC_CATEGORY_PAYMENTS
class TransactionItemMetadataUpdated(SubscriptionObjectType):
@@ -1589,6 +1614,7 @@ class TransactionItemMetadataUpdated(SubscriptionObjectType):
description = (
"Event sent when transaction item metadata is updated." + ADDED_IN_38
)
+ doc_category = DOC_CATEGORY_PAYMENTS
@staticmethod
def resolve_transaction(root, _info: ResolveInfo):
@@ -1701,6 +1727,7 @@ class PaymentAuthorize(SubscriptionObjectType, PaymentBase):
enable_dry_run = False
interfaces = (Event,)
description = "Authorize payment." + ADDED_IN_36
+ doc_category = DOC_CATEGORY_PAYMENTS
class PaymentCaptureEvent(SubscriptionObjectType, PaymentBase):
@@ -1709,6 +1736,7 @@ class PaymentCaptureEvent(SubscriptionObjectType, PaymentBase):
enable_dry_run = False
interfaces = (Event,)
description = "Capture payment." + ADDED_IN_36
+ doc_category = DOC_CATEGORY_PAYMENTS
class PaymentRefundEvent(SubscriptionObjectType, PaymentBase):
@@ -1717,6 +1745,7 @@ class PaymentRefundEvent(SubscriptionObjectType, PaymentBase):
enable_dry_run = False
interfaces = (Event,)
description = "Refund payment." + ADDED_IN_36
+ doc_category = DOC_CATEGORY_PAYMENTS
class PaymentVoidEvent(SubscriptionObjectType, PaymentBase):
@@ -1725,6 +1754,7 @@ class PaymentVoidEvent(SubscriptionObjectType, PaymentBase):
enable_dry_run = False
interfaces = (Event,)
description = "Void payment." + ADDED_IN_36
+ doc_category = DOC_CATEGORY_PAYMENTS
class PaymentConfirmEvent(SubscriptionObjectType, PaymentBase):
@@ -1733,6 +1763,7 @@ class PaymentConfirmEvent(SubscriptionObjectType, PaymentBase):
enable_dry_run = False
interfaces = (Event,)
description = "Confirm payment." + ADDED_IN_36
+ doc_category = DOC_CATEGORY_PAYMENTS
class PaymentProcessEvent(SubscriptionObjectType, PaymentBase):
@@ -1741,6 +1772,7 @@ class PaymentProcessEvent(SubscriptionObjectType, PaymentBase):
enable_dry_run = False
interfaces = (Event,)
description = "Process payment." + ADDED_IN_36
+ doc_category = DOC_CATEGORY_PAYMENTS
class PaymentListGateways(SubscriptionObjectType, CheckoutBase):
@@ -1749,6 +1781,7 @@ class PaymentListGateways(SubscriptionObjectType, CheckoutBase):
enable_dry_run = False
interfaces = (Event,)
description = "List payment gateways." + ADDED_IN_36
+ doc_category = DOC_CATEGORY_PAYMENTS
class ShippingListMethodsForCheckout(SubscriptionObjectType, CheckoutBase):
@@ -1769,6 +1802,7 @@ class ShippingListMethodsForCheckout(SubscriptionObjectType, CheckoutBase):
enable_dry_run = False
interfaces = (Event,)
description = "List shipping methods for checkout." + ADDED_IN_36
+ doc_category = DOC_CATEGORY_CHECKOUT
class CalculateTaxes(SubscriptionObjectType):
@@ -1783,6 +1817,7 @@ class CalculateTaxes(SubscriptionObjectType):
description = (
"Synchronous webhook for calculating checkout/order taxes." + ADDED_IN_37
)
+ doc_category = DOC_CATEGORY_TAXES
@staticmethod
def resolve_tax_base(root, _info: ResolveInfo):
@@ -1808,6 +1843,7 @@ class CheckoutFilterShippingMethods(SubscriptionObjectType, CheckoutBase):
enable_dry_run = False
interfaces = (Event,)
description = "Filter shipping methods for checkout." + ADDED_IN_36
+ doc_category = DOC_CATEGORY_CHECKOUT
class OrderFilterShippingMethods(SubscriptionObjectType, OrderBase):
@@ -1838,6 +1874,7 @@ class OrderFilterShippingMethods(SubscriptionObjectType, OrderBase):
enable_dry_run = False
interfaces = (Event,)
description = "Filter shipping methods for order." + ADDED_IN_36
+ doc_category = DOC_CATEGORY_ORDERS
class WarehouseBase(AbstractType):