Skip to content

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

Add directive to group API objects by categories (#12276)

Marcin Gębalad6a9fbe84e97
diff --git a/saleor/graphql/account/bulk_mutations.py b/saleor/graphql/account/bulk_mutations.py
index b52bc3f514..40e85b9b06 100644
--- a/saleor/graphql/account/bulk_mutations.py
+++ b/saleor/graphql/account/bulk_mutations.py
@@ -8,6 +8,7 @@ from ...account import models
from ...account.error_codes import AccountErrorCode
from ...permission.enums import AccountPermissions
from ..core import ResolveInfo
+from ..core.doc_category import DOC_CATEGORY_USERS
from ..core.mutations import BaseBulkMutation, ModelBulkDeleteMutation
from ..core.types import AccountError, NonNullList, StaffError
from ..plugins.dataloaders import get_plugin_manager_promise
@@ -28,6 +29,7 @@ class UserBulkDelete(ModelBulkDeleteMutation):
class CustomerBulkDelete(CustomerDeleteMixin, UserBulkDelete):
class Meta:
description = "Deletes customers."
+ doc_category = DOC_CATEGORY_USERS
model = models.User
object_type = User
permissions = (AccountPermissions.MANAGE_USERS,)
@@ -54,6 +56,7 @@ class StaffBulkDelete(StaffDeleteMixin, UserBulkDelete):
description = (
"Deletes staff users. Apps are not allowed to perform this mutation."
)
+ doc_category = DOC_CATEGORY_USERS
model = models.User
object_type = User
permissions = (AccountPermissions.MANAGE_STAFF,)
@@ -107,6 +110,7 @@ class UserBulkSetActive(BaseBulkMutation):
class Meta:
description = "Activate or deactivate users."
+ doc_category = DOC_CATEGORY_USERS
model = models.User
object_type = User
permissions = (AccountPermissions.MANAGE_USERS,)
diff --git a/saleor/graphql/account/enums.py b/saleor/graphql/account/enums.py
index f5eaecb9a3..4a584e06aa 100644
--- a/saleor/graphql/account/enums.py
+++ b/saleor/graphql/account/enums.py
@@ -4,6 +4,8 @@ from django_countries import countries
from ...account import CustomerEvents
from ...checkout import AddressType
from ...graphql.core.enums import to_enum
+from ..core.doc_category import DOC_CATEGORY_USERS
+from ..core.types import BaseEnum
from ..core.utils import str_to_enum
AddressTypeEnum = to_enum(AddressType, type_name="AddressTypeEnum")
@@ -15,10 +17,14 @@ CountryCodeEnum = graphene.Enum(
)
-class StaffMemberStatus(graphene.Enum):
+class StaffMemberStatus(BaseEnum):
ACTIVE = "active"
DEACTIVATED = "deactivated"
+ class Meta:
+ description = "Represents status of a staff account."
+ doc_category = DOC_CATEGORY_USERS
+
@property
def description(self):
if self == StaffMemberStatus.ACTIVE:
diff --git a/saleor/graphql/account/mutations/account.py b/saleor/graphql/account/mutations/account.py
index ac69e22b0f..39488d0ca7 100644
--- a/saleor/graphql/account/mutations/account.py
+++ b/saleor/graphql/account/mutations/account.py
@@ -20,9 +20,10 @@ from ....order.utils import match_orders_with_new_user
from ....permission.auth_filters import AuthorizationFilters
from ...channel.utils import clean_channel
from ...core import ResolveInfo
+from ...core.doc_category import DOC_CATEGORY_USERS
from ...core.enums import LanguageCodeEnum
from ...core.mutations import BaseMutation, ModelDeleteMutation, ModelMutation
-from ...core.types import AccountError, NonNullList
+from ...core.types import AccountError, BaseInputObjectType, NonNullList
from ...meta.mutations import MetadataInput
from ...plugins.dataloaders import get_plugin_manager_promise
from ..enums import AddressTypeEnum
@@ -36,7 +37,7 @@ from .base import (
)
-class AccountBaseInput(graphene.InputObjectType):
+class AccountBaseInput(BaseInputObjectType):
first_name = graphene.String(description="Given name.")
last_name = graphene.String(description="Family name.")
language_code = graphene.Argument(
@@ -70,6 +71,10 @@ class AccountRegisterInput(AccountBaseInput):
)
)
+ class Meta:
+ description = "Fields required to create a user."
+ doc_category = DOC_CATEGORY_USERS
+
class AccountRegister(ModelMutation):
class Arguments:
@@ -83,6 +88,7 @@ class AccountRegister(ModelMutation):
class Meta:
description = "Register a new user."
+ doc_category = DOC_CATEGORY_USERS
exclude = ["password"]
model = models.User
object_type = User
@@ -167,6 +173,10 @@ class AccountInput(AccountBaseInput):
description="Shipping address of the customer."
)
+ class Meta:
+ description = "Fields required to update the user."
+ doc_category = DOC_CATEGORY_USERS
+
class AccountUpdate(BaseCustomerCreate):
class Arguments:
@@ -177,6 +187,7 @@ class AccountUpdate(BaseCustomerCreate):
class Meta:
description = "Updates the account of the logged-in user."
+ doc_category = DOC_CATEGORY_USERS
exclude = ["password"]
model = models.User
object_type = User
@@ -212,6 +223,7 @@ class AccountRequestDeletion(BaseMutation):
description = (
"Sends an email with the account removal link for the logged-in user."
)
+ doc_category = DOC_CATEGORY_USERS
permissions = (AuthorizationFilters.AUTHENTICATED_USER,)
error_type_class = AccountError
error_type_field = "account_errors"
@@ -247,6 +259,7 @@ class AccountDelete(ModelDeleteMutation):
class Meta:
description = "Remove user account."
+ doc_category = DOC_CATEGORY_USERS
model = models.User
object_type = User
error_type_class = AccountError
@@ -308,6 +321,7 @@ class AccountAddressCreate(ModelMutation, I18nMixin):
class Meta:
description = "Create a new address for the customer."
+ doc_category = DOC_CATEGORY_USERS
model = models.Address
object_type = Address
error_type_class = AccountError
@@ -353,6 +367,7 @@ class AccountAddressUpdate(BaseAddressUpdate):
"Updates an address of the logged-in user. Requires one of the following "
"permissions: MANAGE_USERS, IS_OWNER."
)
+ doc_category = DOC_CATEGORY_USERS
error_type_class = AccountError
error_type_field = "account_errors"
model = models.Address
@@ -366,6 +381,7 @@ class AccountAddressDelete(BaseAddressDelete):
"Delete an address of the logged-in user. Requires one of the following "
"permissions: MANAGE_USERS, IS_OWNER."
)
+ doc_category = DOC_CATEGORY_USERS
model = models.Address
object_type = Address
error_type_class = AccountError
@@ -383,6 +399,7 @@ class AccountSetDefaultAddress(BaseMutation):
class Meta:
description = "Sets a default address for the authenticated user."
+ doc_category = DOC_CATEGORY_USERS
error_type_class = AccountError
error_type_field = "account_errors"
permissions = (AuthorizationFilters.AUTHENTICATED_USER,)
@@ -437,6 +454,7 @@ class RequestEmailChange(BaseMutation):
class Meta:
description = "Request email change of the logged in user."
+ doc_category = DOC_CATEGORY_USERS
error_type_class = AccountError
error_type_field = "account_errors"
permissions = (AuthorizationFilters.AUTHENTICATED_USER,)
@@ -517,6 +535,7 @@ class ConfirmEmailChange(BaseMutation):
class Meta:
description = "Confirm the email change of the logged-in user."
+ doc_category = DOC_CATEGORY_USERS
error_type_class = AccountError
error_type_field = "account_errors"
permissions = (AuthorizationFilters.AUTHENTICATED_USER,)
diff --git a/saleor/graphql/account/mutations/authentication.py b/saleor/graphql/account/mutations/authentication.py
index 464f5a232c..57e832dd19 100644
--- a/saleor/graphql/account/mutations/authentication.py
+++ b/saleor/graphql/account/mutations/authentication.py
@@ -28,6 +28,7 @@ from ....permission.auth_filters import AuthorizationFilters
from ....permission.enums import get_permissions_from_names
from ...core import ResolveInfo
from ...core.descriptions import ADDED_IN_38, PREVIEW_FEATURE
+from ...core.doc_category import DOC_CATEGORY_AUTH
from ...core.fields import JSONString
from ...core.mutations import BaseMutation
from ...core.types import AccountError
@@ -95,6 +96,7 @@ class CreateToken(BaseMutation):
class Meta:
description = "Create JWT token."
+ doc_category = DOC_CATEGORY_AUTH
error_type_class = AccountError
error_type_field = "account_errors"
@@ -204,6 +206,7 @@ class RefreshToken(BaseMutation):
f"{JWT_REFRESH_TOKEN_COOKIE_NAME}. csrfToken is required when refreshToken "
"is provided as a cookie."
)
+ doc_category = DOC_CATEGORY_AUTH
error_type_class = AccountError
error_type_field = "account_errors"
@@ -315,6 +318,7 @@ class VerifyToken(BaseMutation):
class Meta:
description = "Verify JWT token."
+ doc_category = DOC_CATEGORY_AUTH
error_type_class = AccountError
error_type_field = "account_errors"
@@ -346,6 +350,7 @@ class VerifyToken(BaseMutation):
class DeactivateAllUserTokens(BaseMutation):
class Meta:
description = "Deactivate all JWT tokens of the currently authenticated user."
+ doc_category = DOC_CATEGORY_AUTH
error_type_class = AccountError
error_type_field = "account_errors"
permissions = (AuthorizationFilters.AUTHENTICATED_USER,)
@@ -378,7 +383,8 @@ class ExternalAuthenticationUrl(BaseMutation):
)
class Meta:
- description = "Prepare external authentication url for user by custom plugin."
+ description = "Prepare external authentication URL for user by custom plugin."
+ doc_category = DOC_CATEGORY_AUTH
error_type_class = AccountError
error_type_field = "account_errors"
@@ -418,6 +424,7 @@ class ExternalObtainAccessTokens(BaseMutation):
class Meta:
description = "Obtain external access tokens for user by custom plugin."
+ doc_category = DOC_CATEGORY_AUTH
error_type_class = AccountError
error_type_field = "account_errors"
@@ -468,6 +475,7 @@ class ExternalRefresh(BaseMutation):
class Meta:
description = "Refresh user's access by custom plugin."
+ doc_category = DOC_CATEGORY_AUTH
error_type_class = AccountError
error_type_field = "account_errors"
@@ -507,6 +515,7 @@ class ExternalLogout(BaseMutation):
class Meta:
description = "Logout user by custom plugin."
+ doc_category = DOC_CATEGORY_AUTH
error_type_class = AccountError
error_type_field = "account_errors"
@@ -539,6 +548,7 @@ class ExternalVerify(BaseMutation):
class Meta:
description = "Verify external authentication data by plugin."
+ doc_category = DOC_CATEGORY_AUTH
error_type_class = AccountError
error_type_field = "account_errors"
diff --git a/saleor/graphql/account/mutations/base.py b/saleor/graphql/account/mutations/base.py
index e3fd53c927..ed5111113f 100644
--- a/saleor/graphql/account/mutations/base.py
+++ b/saleor/graphql/account/mutations/base.py
@@ -33,6 +33,7 @@ from ...channel.utils import clean_channel, validate_channel
from ...core import ResolveInfo
from ...core.context import disallow_replica_in_context
from ...core.descriptions import ADDED_IN_310
+from ...core.doc_category import DOC_CATEGORY_USERS
from ...core.enums import LanguageCodeEnum
from ...core.mutations import (
BaseMutation,
@@ -40,7 +41,7 @@ from ...core.mutations import (
ModelMutation,
validation_error_to_error_type,
)
-from ...core.types import AccountError
+from ...core.types import AccountError, BaseInputObjectType
from ...plugins.dataloaders import get_plugin_manager_promise
from .authentication import CreateToken
@@ -83,6 +84,7 @@ class SetPassword(CreateToken):
"Sets the user's password from the token sent by email "
"using the RequestPasswordReset mutation."
)
+ doc_category = DOC_CATEGORY_USERS
error_type_class = AccountError
error_type_field = "account_errors"
@@ -159,6 +161,7 @@ class RequestPasswordReset(BaseMutation):
class Meta:
description = "Sends an email with the account password modification link."
+ doc_category = DOC_CATEGORY_USERS
error_type_class = AccountError
error_type_field = "account_errors"
@@ -251,6 +254,7 @@ class ConfirmAccount(BaseMutation):
description = (
"Confirm user account with token sent by email during registration."
)
+ doc_category = DOC_CATEGORY_USERS
error_type_class = AccountError
error_type_field = "account_errors"
@@ -297,6 +301,7 @@ class PasswordChange(BaseMutation):
class Meta:
description = "Change the password of the logged in user."
+ doc_category = DOC_CATEGORY_USERS
error_type_class = AccountError
error_type_field = "account_errors"
permissions = (AuthorizationFilters.AUTHENTICATED_USER,)
@@ -447,7 +452,7 @@ class BaseAddressDelete(ModelDeleteMutation):
return response
-class UserInput(graphene.InputObjectType):
+class UserInput(BaseInputObjectType):
first_name = graphene.String(description="Given name.")
last_name = graphene.String(description="Family name.")
email = graphene.String(description="The unique email address of the user.")
@@ -455,7 +460,7 @@ class UserInput(graphene.InputObjectType):
note = graphene.String(description="A note about the user.")
-class UserAddressInput(graphene.InputObjectType):
+class UserAddressInput(BaseInputObjectType):
default_billing_address = AddressInput(
description="Billing address of the customer."
)
diff --git a/saleor/graphql/account/mutations/permission_group.py b/saleor/graphql/account/mutations/permission_group.py
index dbc61c6b18..8da72fa02a 100644
--- a/saleor/graphql/account/mutations/permission_group.py
+++ b/saleor/graphql/account/mutations/permission_group.py
@@ -20,6 +20,7 @@ from ...account.utils import (
)
from ...app.dataloaders import get_app_promise
from ...core import ResolveInfo
+from ...core.doc_category import DOC_CATEGORY_USERS
from ...core.enums import PermissionEnum
from ...core.mutations import ModelDeleteMutation, ModelMutation
from ...core.types import NonNullList, PermissionGroupError
@@ -56,6 +57,7 @@ class PermissionGroupCreate(ModelMutation):
"Create new permission group. "
"Apps are not allowed to perform this mutation."
)
+ doc_category = DOC_CATEGORY_USERS
model = models.Group
object_type = Group
permissions = (AccountPermissions.MANAGE_STAFF,)
@@ -208,6 +210,7 @@ class PermissionGroupUpdate(PermissionGroupCreate):
description = (
"Update permission group. Apps are not allowed to perform this mutation."
)
+ doc_category = DOC_CATEGORY_USERS
model = models.Group
object_type = Group
permissions = (AccountPermissions.MANAGE_STAFF,)
@@ -436,6 +439,7 @@ class PermissionGroupDelete(ModelDeleteMutation):
description = (
"Delete permission group. Apps are not allowed to perform this mutation."
)
+ doc_category = DOC_CATEGORY_USERS
model = models.Group
object_type = Group
permissions = (AccountPermissions.MANAGE_STAFF,)
diff --git a/saleor/graphql/account/mutations/staff.py b/saleor/graphql/account/mutations/staff.py
index 156069fe87..ce5da2cc68 100644
--- a/saleor/graphql/account/mutations/staff.py
+++ b/saleor/graphql/account/mutations/staff.py
@@ -28,6 +28,7 @@ from ...account.types import Address, AddressInput, User
from ...app.dataloaders import get_app_promise
from ...core import ResolveInfo
from ...core.descriptions import ADDED_IN_310
+from ...core.doc_category import DOC_CATEGORY_USERS
from ...core.mutations import (
BaseMutation,
ModelDeleteMutation,
@@ -72,6 +73,10 @@ class StaffCreateInput(StaffInput):
)
)
+ class Meta:
+ description = "Fields required to create a staff user."
+ doc_category = DOC_CATEGORY_USERS
+
class StaffUpdateInput(StaffInput):
remove_groups = NonNullList(
@@ -82,10 +87,15 @@ class StaffUpdateInput(StaffInput):
required=False,
)
+ class Meta:
+ description = "Fields required to update a staff user."
+ doc_category = DOC_CATEGORY_USERS
+
class CustomerCreate(BaseCustomerCreate):
class Meta:
description = "Creates a new customer."
+ doc_category = DOC_CATEGORY_USERS
exclude = ["password"]
model = models.User
object_type = User
@@ -107,6 +117,7 @@ class CustomerUpdate(CustomerCreate, ModelWithExtRefMutation):
class Meta:
description = "Updates an existing customer."
+ doc_category = DOC_CATEGORY_USERS
exclude = ["password"]
model = models.User
object_type = User
@@ -189,6 +200,7 @@ class UserDelete(UserDeleteMixin, ModelDeleteMutation, ModelWithExtRefMutation):
class CustomerDelete(CustomerDeleteMixin, UserDelete):
class Meta:
description = "Deletes a customer."
+ doc_category = DOC_CATEGORY_USERS
model = models.User
object_type = User
permissions = (AccountPermissions.MANAGE_USERS,)
@@ -225,6 +237,7 @@ class StaffCreate(ModelMutation):
"Creates a new staff user. "
"Apps are not allowed to perform this mutation."
)
+ doc_category = DOC_CATEGORY_USERS
exclude = ["password"]
model = models.User
object_type = User
@@ -377,6 +390,7 @@ class StaffUpdate(StaffCreate):
"Updates an existing staff user. "
"Apps are not allowed to perform this mutation."
)
+ doc_category = DOC_CATEGORY_USERS
exclude = ["password"]
model = models.User
object_type = User
@@ -517,6 +531,7 @@ class StaffDelete(StaffDeleteMixin, UserDelete):
description = (
"Deletes a staff user. Apps are not allowed to perform this mutation."
)
+ doc_category = DOC_CATEGORY_USERS
model = models.User
object_type = User
permissions = (AccountPermissions.MANAGE_STAFF,)
@@ -561,6 +576,7 @@ class AddressCreate(ModelMutation, I18nMixin):
class Meta:
description = "Creates user address."
+ doc_category = DOC_CATEGORY_USERS
model = models.Address
object_type = Address
permissions = (AccountPermissions.MANAGE_USERS,)
@@ -599,6 +615,7 @@ class AddressCreate(ModelMutation, I18nMixin):
class AddressUpdate(BaseAddressUpdate):
class Meta:
description = "Updates an address."
+ doc_category = DOC_CATEGORY_USERS
model = models.Address
object_type = Address
permissions = (AccountPermissions.MANAGE_USERS,)
@@ -609,6 +626,7 @@ class AddressUpdate(BaseAddressUpdate):
class AddressDelete(BaseAddressDelete):
class Meta:
description = "Deletes an address."
+ doc_category = DOC_CATEGORY_USERS
model = models.Address
object_type = Address
permissions = (AccountPermissions.MANAGE_USERS,)
@@ -628,6 +646,7 @@ class AddressSetDefault(BaseMutation):
class Meta:
description = "Sets a default address for the given user."
+ doc_category = DOC_CATEGORY_USERS
permissions = (AccountPermissions.MANAGE_USERS,)
error_type_class = AccountError
error_type_field = "account_errors"
@@ -676,6 +695,7 @@ class UserAvatarUpdate(BaseMutation):
"as a `multipart` request. More detailed specs of the upload format can be "
"found here: https://github.com/jaydenseric/graphql-multipart-request-spec"
)
+ doc_category = DOC_CATEGORY_USERS
error_type_class = AccountError
error_type_field = "account_errors"
permissions = (AuthorizationFilters.AUTHENTICATED_STAFF_USER,)
@@ -700,6 +720,7 @@ class UserAvatarDelete(BaseMutation):
class Meta:
description = "Deletes a user avatar. Only for staff members."
+ doc_category = DOC_CATEGORY_USERS
error_type_class = AccountError
error_type_field = "account_errors"
permissions = (AuthorizationFilters.AUTHENTICATED_STAFF_USER,)
diff --git a/saleor/graphql/account/schema.py b/saleor/graphql/account/schema.py
index 479eb630af..d79d8a32b8 100644
--- a/saleor/graphql/account/schema.py
+++ b/saleor/graphql/account/schema.py
@@ -5,7 +5,8 @@ from ..app.dataloaders import app_promise_callback
from ..core import ResolveInfo
from ..core.connection import create_connection_slice, filter_connection_queryset
from ..core.descriptions import ADDED_IN_310
-from ..core.fields import FilterConnectionField, PermissionsField
+from ..core.doc_category import DOC_CATEGORY_USERS
+from ..core.fields import BaseField, FilterConnectionField, PermissionsField
from ..core.types import FilterInputObjectType
from ..core.utils import from_global_id_or_error
from ..core.validators import validate_one_of_args_is_in_query
@@ -82,21 +83,24 @@ from .types import (
class CustomerFilterInput(FilterInputObjectType):
class Meta:
+ doc_category = DOC_CATEGORY_USERS
filterset_class = CustomerFilter
class PermissionGroupFilterInput(FilterInputObjectType):
class Meta:
+ doc_category = DOC_CATEGORY_USERS
filterset_class = PermissionGroupFilter
class StaffUserInput(FilterInputObjectType):
class Meta:
+ doc_category = DOC_CATEGORY_USERS
filterset_class = StaffUserFilter
class AccountQueries(graphene.ObjectType):
- address_validation_rules = graphene.Field(
+ address_validation_rules = BaseField(
AddressValidationData,
description="Returns address validation rules.",
country_code=graphene.Argument(
@@ -111,13 +115,15 @@ class AccountQueries(graphene.ObjectType):
city_area=graphene.Argument(
graphene.String, description="Sublocality like a district."
),
+ doc_category=DOC_CATEGORY_USERS,
)
- address = graphene.Field(
+ address = BaseField(
Address,
id=graphene.Argument(
graphene.ID, description="ID of an address.", required=True
),
description="Look up an address by ID.",
+ doc_category=DOC_CATEGORY_USERS,
)
customers = FilterConnectionField(
UserCountableConnection,
@@ -125,6 +131,7 @@ class AccountQueries(graphene.ObjectType):
sort_by=UserSortingInput(description="Sort customers."),
description="List of the shop's customers.",
permissions=[OrderPermissions.MANAGE_ORDERS, AccountPermissions.MANAGE_USERS],
+ doc_category=DOC_CATEGORY_USERS,
)
permission_groups = FilterConnectionField(
GroupCountableConnection,
@@ -134,6 +141,7 @@ class AccountQueries(graphene.ObjectType):
sort_by=PermissionGroupSortingInput(description="Sort permission groups."),
description="List of permission groups.",
permissions=[AccountPermissions.MANAGE_STAFF],
+ doc_category=DOC_CATEGORY_USERS,
)
permission_group = PermissionsField(
Group,
@@ -142,14 +150,20 @@ class AccountQueries(graphene.ObjectType):
),
description="Look up permission group by ID.",
permissions=[AccountPermissions.MANAGE_STAFF],
+ doc_category=DOC_CATEGORY_USERS,
+ )
+ me = BaseField(
+ User,
+ description="Return the currently authenticated user.",
+ doc_category=DOC_CATEGORY_USERS,
)
- me = graphene.Field(User, description="Return the currently authenticated user.")
staff_users = FilterConnectionField(
UserCountableConnection,
filter=StaffUserInput(description="Filtering options for staff users."),
sort_by=UserSortingInput(description="Sort staff users."),
description="List of the shop's staff users.",
permissions=[AccountPermissions.MANAGE_STAFF],
+ doc_category=DOC_CATEGORY_USERS,
)
user = PermissionsField(
User,
@@ -166,6 +180,7 @@ class AccountQueries(graphene.ObjectType):
OrderPermissions.MANAGE_ORDERS,
],
description="Look up a user by ID or email address.",
+ doc_category=DOC_CATEGORY_USERS,
)
@staticmethod
diff --git a/saleor/graphql/account/sorters.py b/saleor/graphql/account/sorters.py
index 206d937d2f..33ffa52eb1 100644
--- a/saleor/graphql/account/sorters.py
+++ b/saleor/graphql/account/sorters.py
@@ -1,10 +1,10 @@
-import graphene
from django.db.models import Count, QuerySet
-from ..core.types import SortInputObjectType
+from ..core.doc_category import DOC_CATEGORY_USERS
+from ..core.types import BaseEnum, SortInputObjectType
-class UserSortField(graphene.Enum):
+class UserSortField(BaseEnum):
FIRST_NAME = ["first_name", "last_name", "pk"]
LAST_NAME = ["last_name", "first_name", "pk"]
EMAIL = ["email"]
@@ -12,6 +12,9 @@ class UserSortField(graphene.Enum):
CREATED_AT = ["date_joined", "pk"]
LAST_MODIFIED_AT = ["updated_at", "pk"]
+ class Meta:
+ doc_category = DOC_CATEGORY_USERS
+
@property
def description(self):
if self.name in UserSortField.__enum__._member_names_:
@@ -26,13 +29,18 @@ class UserSortField(graphene.Enum):
class UserSortingInput(SortInputObjectType):
class Meta:
+ doc_category = DOC_CATEGORY_USERS
sort_enum = UserSortField
type_name = "users"
-class PermissionGroupSortField(graphene.Enum):
+class PermissionGroupSortField(BaseEnum):
NAME = ["name"]
+ class Meta:
+ description = "Sorting options for permission groups."
+ doc_category = DOC_CATEGORY_USERS
+
@property
def description(self):
# pylint: disable=no-member
@@ -44,5 +52,6 @@ class PermissionGroupSortField(graphene.Enum):
class PermissionGroupSortingInput(SortInputObjectType):
class Meta:
+ doc_category = DOC_CATEGORY_USERS
sort_enum = PermissionGroupSortField
type_name = "permission group"
diff --git a/saleor/graphql/account/types.py b/saleor/graphql/account/types.py
index 2bbad55f4a..83058f8ec3 100644
--- a/saleor/graphql/account/types.py
+++ b/saleor/graphql/account/types.py
@@ -25,12 +25,14 @@ from ..checkout.types import Checkout, CheckoutCountableConnection
from ..core import ResolveInfo
from ..core.connection import CountableConnection, create_connection_slice
from ..core.descriptions import ADDED_IN_38, ADDED_IN_310, DEPRECATED_IN_3X_FIELD
+from ..core.doc_category import DOC_CATEGORY_USERS
from ..core.enums import LanguageCodeEnum
from ..core.federation import federated_entity, resolve_federation_references
from ..core.fields import ConnectionField, PermissionsField
from ..core.scalars import UUID
from ..core.tracing import traced_resolver
from ..core.types import (
+ BaseObjectType,
CountryDisplay,
Image,
ModelObjectType,
@@ -94,6 +96,7 @@ class Address(ModelObjectType[models.Address]):
interfaces = [relay.Node, ObjectWithMetadata]
model = models.Address
metadata_since = ADDED_IN_310
+ doc_category = DOC_CATEGORY_USERS
@staticmethod
def resolve_country(root: models.Address, _info: ResolveInfo):
@@ -177,6 +180,7 @@ class CustomerEvent(ModelObjectType[models.CustomerEvent]):
description = "History log of the customer."
interfaces = [relay.Node]
model = models.CustomerEvent
+ doc_category = DOC_CATEGORY_USERS
@staticmethod
def resolve_user(root: models.CustomerEvent, info: ResolveInfo):
@@ -233,6 +237,10 @@ class UserPermission(Permission):
required=False,
)
+ class Meta:
+ description = "Represents user's permissions."
+ doc_category = DOC_CATEGORY_USERS
+
@staticmethod
@traced_resolver
def resolve_source_permission_groups(root: Permission, _info: ResolveInfo, user_id):
@@ -343,6 +351,7 @@ class User(ModelObjectType[models.User]):
description = "Represents user data."
interfaces = [relay.Node, ObjectWithMetadata]
model = get_user_model()
+ doc_category = DOC_CATEGORY_USERS
@staticmethod
def resolve_addresses(root: models.User, _info: ResolveInfo):
@@ -551,6 +560,7 @@ class User(ModelObjectType[models.User]):
class UserCountableConnection(CountableConnection):
class Meta:
+ doc_category = DOC_CATEGORY_USERS
node = User
@@ -559,7 +569,7 @@ class ChoiceValue(graphene.ObjectType):
verbose = graphene.String()
-class AddressValidationData(graphene.ObjectType):
+class AddressValidationData(BaseObjectType):
country_code = graphene.String(required=True)
country_name = graphene.String(required=True)
address_format = graphene.String(required=True)
@@ -578,6 +588,10 @@ class AddressValidationData(graphene.ObjectType):
postal_code_examples = NonNullList(graphene.String, required=True)
postal_code_prefix = graphene.String(required=True)
+ class Meta:
+ description = "Represents address validation rules for a country."
+ doc_category = DOC_CATEGORY_USERS
+
class StaffNotificationRecipient(graphene.ObjectType):
id = graphene.ID(required=True)
@@ -648,6 +662,7 @@ class Group(ModelObjectType[models.Group]):
description = "Represents permission group data."
interfaces = [relay.Node]
model = models.Group
+ doc_category = DOC_CATEGORY_USERS
@staticmethod
def resolve_users(root: models.Group, _info: ResolveInfo):
@@ -682,4 +697,5 @@ class Group(ModelObjectType[models.Group]):
class GroupCountableConnection(CountableConnection):
class Meta:
+ doc_category = DOC_CATEGORY_USERS
node = Group
diff --git a/saleor/graphql/api.py b/saleor/graphql/api.py
index 9d98280e9c..0c75bfb3dd 100644
--- a/saleor/graphql/api.py
+++ b/saleor/graphql/api.py
@@ -1,3 +1,4 @@
+import graphql
from django.urls import reverse
from django.utils.functional import SimpleLazyObject
@@ -93,9 +94,29 @@ class Mutation(
pass
+GraphQLDocDirective = graphql.GraphQLDirective(
+ name="doc",
+ description="Groups fields and operations into named groups.",
+ args={
+ "category": graphql.GraphQLArgument(
+ type_=graphql.GraphQLNonNull(graphql.GraphQLString),
+ description="Name of the grouping category",
+ )
+ },
+ locations=[
+ graphql.DirectiveLocation.ENUM,
+ graphql.DirectiveLocation.FIELD,
+ graphql.DirectiveLocation.FIELD_DEFINITION,
+ graphql.DirectiveLocation.INPUT_OBJECT,
+ graphql.DirectiveLocation.OBJECT,
+ ],
+)
+
+
schema = build_federated_schema(
Query,
mutation=Mutation,
types=unit_enums + list(WEBHOOK_TYPES_MAP.values()),
subscription=Subscription,
+ directives=graphql.specified_directives + [GraphQLDocDirective],
)
diff --git a/saleor/graphql/app/mutations/app_create.py b/saleor/graphql/app/mutations/app_create.py
index 77d187e6fb..28b5740f46 100644
--- a/saleor/graphql/app/mutations/app_create.py
+++ b/saleor/graphql/app/mutations/app_create.py
@@ -2,9 +2,10 @@ import graphene
from ....app import models
from ....permission.enums import AppPermission, get_permissions
+from ...core.doc_category import DOC_CATEGORY_APPS
from ...core.enums import PermissionEnum
from ...core.mutations import ModelMutation
-from ...core.types import AppError, NonNullList
+from ...core.types import AppError, BaseInputObjectType, NonNullList
from ...decorators import staff_member_required
from ...plugins.dataloaders import get_plugin_manager_promise
from ...utils import get_user_or_app_from_context
@@ -12,13 +13,16 @@ from ..types import App
from ..utils import ensure_can_manage_permissions
-class AppInput(graphene.InputObjectType):
+class AppInput(BaseInputObjectType):
name = graphene.String(description="Name of the app.")
permissions = NonNullList(
PermissionEnum,
description="List of permission code names to assign to this app.",
)
+ class Meta:
+ doc_category = DOC_CATEGORY_APPS
+
class AppCreate(ModelMutation):
auth_token = graphene.types.String(
diff --git a/saleor/graphql/app/mutations/app_fetch_manifest.py b/saleor/graphql/app/mutations/app_fetch_manifest.py
index 36b5942c81..e028375029 100644
--- a/saleor/graphql/app/mutations/app_fetch_manifest.py
+++ b/saleor/graphql/app/mutations/app_fetch_manifest.py
@@ -7,6 +7,7 @@ from ....app.installation_utils import REQUEST_TIMEOUT
from ....app.manifest_validations import clean_manifest_data, clean_manifest_url
from ....permission.enums import AppPermission
from ...core import types as grapqhl_types
+from ...core.doc_category import DOC_CATEGORY_APPS
from ...core.enums import PermissionEnum
from ...core.mutations import BaseMutation
from ...core.types import AppError
@@ -21,6 +22,7 @@ class AppFetchManifest(BaseMutation):
class Meta:
description = "Fetch and validate manifest."
+ doc_category = DOC_CATEGORY_APPS
permissions = (AppPermission.MANAGE_APPS,)
error_type_class = AppError
error_type_field = "app_errors"
diff --git a/saleor/graphql/app/mutations/app_install.py b/saleor/graphql/app/mutations/app_install.py
index 8b2b797072..fc7b91ca03 100644
--- a/saleor/graphql/app/mutations/app_install.py
+++ b/saleor/graphql/app/mutations/app_install.py
@@ -4,16 +4,17 @@ from ....app import models
from ....app.manifest_validations import clean_manifest_url
from ....app.tasks import install_app_task
from ....permission.enums import AppPermission, get_permissions
+from ...core.doc_category import DOC_CATEGORY_APPS
from ...core.enums import PermissionEnum
from ...core.mutations import ModelMutation
-from ...core.types import AppError, NonNullList
+from ...core.types import AppError, BaseInputObjectType, NonNullList
from ...decorators import staff_member_required
from ...utils import get_user_or_app_from_context
from ..types import AppInstallation
from ..utils import ensure_can_manage_permissions
-class AppInstallInput(graphene.InputObjectType):
+class AppInstallInput(BaseInputObjectType):
app_name = graphene.String(description="Name of the app to install.")
manifest_url = graphene.String(description="Url to app's manifest in JSON format.")
activate_after_installation = graphene.Boolean(
@@ -26,6 +27,9 @@ class AppInstallInput(graphene.InputObjectType):
description="List of permission code names to assign to this app.",
)
+ class Meta:
+ doc_category = DOC_CATEGORY_APPS
+
class AppInstall(ModelMutation):
class Arguments:
diff --git a/saleor/graphql/app/mutations/app_token_create.py b/saleor/graphql/app/mutations/app_token_create.py
index 0105be702f..5e23348559 100644
--- a/saleor/graphql/app/mutations/app_token_create.py
+++ b/saleor/graphql/app/mutations/app_token_create.py
@@ -6,16 +6,20 @@ from ....app import models
from ....app.error_codes import AppErrorCode
from ....permission.enums import AppPermission
from ...account.utils import can_manage_app
+from ...core.doc_category import DOC_CATEGORY_APPS
from ...core.mutations import ModelMutation
-from ...core.types import AppError
+from ...core.types import AppError, BaseInputObjectType
from ...utils import get_user_or_app_from_context, requestor_is_superuser
from ..types import AppToken
-class AppTokenInput(graphene.InputObjectType):
+class AppTokenInput(BaseInputObjectType):
name = graphene.String(description="Name of the token.", required=False)
app = graphene.ID(description="ID of app.", required=True)
+ class Meta:
+ doc_category = DOC_CATEGORY_APPS
+
class AppTokenCreate(ModelMutation):
auth_token = graphene.types.String(
diff --git a/saleor/graphql/app/mutations/app_token_verify.py b/saleor/graphql/app/mutations/app_token_verify.py
index c6397dc5d1..13ede47cec 100644
--- a/saleor/graphql/app/mutations/app_token_verify.py
+++ b/saleor/graphql/app/mutations/app_token_verify.py
@@ -2,6 +2,7 @@ import graphene
from django.contrib.auth.hashers import check_password
from ....app import models
+from ...core.doc_category import DOC_CATEGORY_APPS
from ...core.mutations import BaseMutation
from ...core.types import AppError
@@ -18,6 +19,7 @@ class AppTokenVerify(BaseMutation):
class Meta:
description = "Verify provided app token."
+ doc_category = DOC_CATEGORY_APPS
error_type_class = AppError
error_type_field = "app_errors"
diff --git a/saleor/graphql/app/schema.py b/saleor/graphql/app/schema.py
index a55ef8beaf..7c3ea67e9e 100644
--- a/saleor/graphql/app/schema.py
+++ b/saleor/graphql/app/schema.py
@@ -6,6 +6,7 @@ from ...permission.enums import AppPermission
from ..core import ResolveInfo
from ..core.connection import create_connection_slice, filter_connection_queryset
from ..core.descriptions import ADDED_IN_31, PREVIEW_FEATURE
+from ..core.doc_category import DOC_CATEGORY_APPS
from ..core.fields import FilterConnectionField, PermissionsField
from ..core.types import FilterInputObjectType, NonNullList
from ..core.utils import from_global_id_or_error
@@ -43,11 +44,13 @@ from .types import (
class AppFilterInput(FilterInputObjectType):
class Meta:
+ doc_category = DOC_CATEGORY_APPS
filterset_class = AppFilter
class AppExtensionFilterInput(FilterInputObjectType):
class Meta:
+ doc_category = DOC_CATEGORY_APPS
filterset_class = AppExtensionFilter
@@ -59,6 +62,7 @@ class AppQueries(graphene.ObjectType):
permissions=[
AppPermission.MANAGE_APPS,
],
+ doc_category=DOC_CATEGORY_APPS,
)
apps = FilterConnectionField(
AppCountableConnection,
@@ -69,6 +73,7 @@ class AppQueries(graphene.ObjectType):
AuthorizationFilters.AUTHENTICATED_STAFF_USER,
AppPermission.MANAGE_APPS,
],
+ doc_category=DOC_CATEGORY_APPS,
)
app = PermissionsField(
App,
@@ -86,6 +91,7 @@ class AppQueries(graphene.ObjectType):
AuthorizationFilters.AUTHENTICATED_APP,
],
auto_permission_message=False,
+ doc_category=DOC_CATEGORY_APPS,
)
app_extensions = FilterConnectionField(
AppExtensionCountableConnection,
@@ -97,6 +103,7 @@ class AppQueries(graphene.ObjectType):
AuthorizationFilters.AUTHENTICATED_STAFF_USER,
AuthorizationFilters.AUTHENTICATED_APP,
],
+ doc_category=DOC_CATEGORY_APPS,
)
app_extension = PermissionsField(
AppExtension,
@@ -108,6 +115,7 @@ class AppQueries(graphene.ObjectType):
AuthorizationFilters.AUTHENTICATED_STAFF_USER,
AuthorizationFilters.AUTHENTICATED_APP,
],
+ doc_category=DOC_CATEGORY_APPS,
)
@staticmethod
diff --git a/saleor/graphql/app/sorters.py b/saleor/graphql/app/sorters.py
index 086f116ac7..703c48cd7a 100644
--- a/saleor/graphql/app/sorters.py
+++ b/saleor/graphql/app/sorters.py
@@ -1,12 +1,14 @@
-import graphene
+from ..core.doc_category import DOC_CATEGORY_APPS
+from ..core.types import BaseEnum, SortInputObjectType
-from ..core.types import SortInputObjectType
-
-class AppSortField(graphene.Enum):
+class AppSortField(BaseEnum):
NAME = ["name", "pk"]
CREATION_DATE = ["created_at", "name", "pk"]
+ class Meta:
+ doc_category = DOC_CATEGORY_APPS
+
@property
def description(self):
if self.name in AppSortField.__enum__._member_names_:
@@ -17,5 +19,6 @@ class AppSortField(graphene.Enum):
class AppSortingInput(SortInputObjectType):
class Meta:
+ doc_category = DOC_CATEGORY_APPS
sort_enum = AppSortField
type_name = "apps"
diff --git a/saleor/graphql/app/types.py b/saleor/graphql/app/types.py
index 4c27d03427..5a167bfb77 100644
--- a/saleor/graphql/app/types.py
+++ b/saleor/graphql/app/types.py
@@ -20,8 +20,9 @@ from ..core.descriptions import (
DEPRECATED_IN_3X_FIELD,
PREVIEW_FEATURE,
)
+from ..core.doc_category import DOC_CATEGORY_APPS
from ..core.federation import federated_entity, resolve_federation_references
-from ..core.types import Job, ModelObjectType, NonNullList, Permission
+from ..core.types import BaseObjectType, Job, ModelObjectType, NonNullList, Permission
from ..core.utils import from_global_id_or_error
from ..meta.types import ObjectWithMetadata
from ..utils import format_permissions_for_display, get_user_or_app_from_context
@@ -67,7 +68,7 @@ def has_access_to_app_public_meta(root, info: ResolveInfo, app) -> bool:
return requester.has_perm(AppPermission.MANAGE_APPS)
-class AppManifestExtension(graphene.ObjectType):
+class AppManifestExtension(BaseObjectType):
permissions = NonNullList(
Permission,
description="List of the app extension's permissions.",
@@ -87,6 +88,9 @@ class AppManifestExtension(graphene.ObjectType):
description="Type of way how app extension will be opened.", required=True
)
+ class Meta:
+ doc_category = DOC_CATEGORY_APPS
+
@staticmethod
def resolve_target(root, _info: ResolveInfo):
return root.get("target") or AppExtensionTarget.POPUP
@@ -160,10 +164,11 @@ class AppExtension(AppManifestExtension, ModelObjectType[models.AppExtension]):
class AppExtensionCountableConnection(CountableConnection):
class Meta:
+ doc_category = DOC_CATEGORY_APPS
node = AppExtension
-class AppManifestWebhook(graphene.ObjectType):
+class AppManifestWebhook(BaseObjectType):
name = graphene.String(description="The name of the webhook.", required=True)
async_events = NonNullList(
WebhookEventTypeAsyncEnum,
@@ -180,6 +185,9 @@ class AppManifestWebhook(graphene.ObjectType):
description="The url to receive the payload.", required=True
)
+ class Meta:
+ doc_category = DOC_CATEGORY_APPS
+
@staticmethod
def resolve_async_events(root, _info: ResolveInfo):
return [WebhookEventTypeAsyncEnum[name] for name in root.get("asyncEvents", [])]
@@ -193,7 +201,7 @@ class AppManifestWebhook(graphene.ObjectType):
return root["targetUrl"]
-class AppManifestRequiredSaleorVersion(graphene.ObjectType):
+class AppManifestRequiredSaleorVersion(BaseObjectType):
constraint = graphene.String(
required=True,
description=(
@@ -209,8 +217,11 @@ class AppManifestRequiredSaleorVersion(graphene.ObjectType):
),
)
+ class Meta:
+ doc_category = DOC_CATEGORY_APPS
+
-class Manifest(graphene.ObjectType):
+class Manifest(BaseObjectType):
identifier = graphene.String(required=True)
version = graphene.String(required=True)
name = graphene.String(required=True)
@@ -256,6 +267,7 @@ class Manifest(graphene.ObjectType):
class Meta:
description = "The manifest definition."
+ doc_category = DOC_CATEGORY_APPS
@staticmethod
def resolve_extensions(root, _info: ResolveInfo):
@@ -264,13 +276,14 @@ class Manifest(graphene.ObjectType):
return root.extensions
-class AppToken(graphene.ObjectType):
+class AppToken(BaseObjectType):
id = graphene.GlobalID(required=True)
name = graphene.String(description="Name of the authenticated token.")
auth_token = graphene.String(description="Last 4 characters of the token.")
class Meta:
description = "Represents token data."
+ doc_category = DOC_CATEGORY_APPS
interfaces = [graphene.relay.Node]
permissions = (AppPermission.MANAGE_APPS,)
@@ -416,6 +429,7 @@ class App(ModelObjectType[models.App]):
class AppCountableConnection(CountableConnection):
class Meta:
+ doc_category = DOC_CATEGORY_APPS
node = App
diff --git a/saleor/graphql/attribute/filters.py b/saleor/graphql/attribute/filters.py
index b61808e7f7..945ed82326 100644
--- a/saleor/graphql/attribute/filters.py
+++ b/saleor/graphql/attribute/filters.py
@@ -9,6 +9,7 @@ from ...product import models
from ...product.models import ALL_PRODUCTS_PERMISSIONS
from ..channel.filters import get_channel_slug_from_filter_data
from ..core.descriptions import ADDED_IN_311, PREVIEW_FEATURE
+from ..core.doc_category import DOC_CATEGORY_ATTRIBUTES
from ..core.enums import MeasurementUnitsEnum
from ..core.filters import (
EnumFilter,
@@ -20,6 +21,7 @@ from ..core.filters import (
filter_slug_list,
)
from ..core.types import (
+ BaseInputObjectType,
ChannelFilterInputObjectType,
FilterInputObjectType,
NonNullList,
@@ -132,15 +134,17 @@ class AttributeFilter(MetadataFilterBase):
class AttributeFilterInput(ChannelFilterInputObjectType):
class Meta:
+ doc_category = DOC_CATEGORY_ATTRIBUTES
filterset_class = AttributeFilter
class AttributeValueFilterInput(FilterInputObjectType):
class Meta:
+ doc_category = DOC_CATEGORY_ATTRIBUTES
filterset_class = AttributeValueFilter
-class AttributeInputTypeEnumFilterInput(graphene.InputObjectType):
+class AttributeInputTypeEnumFilterInput(BaseInputObjectType):
eq = AttributeInputTypeEnum(description=FilterInputDescriptions.EQ, required=False)
one_of = NonNullList(
AttributeInputTypeEnum,
@@ -148,8 +152,11 @@ class AttributeInputTypeEnumFilterInput(graphene.InputObjectType):
required=False,
)
+ class Meta:
+ doc_category = DOC_CATEGORY_ATTRIBUTES
+
-class AttributeEntityTypeEnumFilterInput(graphene.InputObjectType):
+class AttributeEntityTypeEnumFilterInput(BaseInputObjectType):
eq = AttributeEntityTypeEnum(description=FilterInputDescriptions.EQ, required=False)
one_of = NonNullList(
AttributeEntityTypeEnum,
@@ -157,8 +164,11 @@ class AttributeEntityTypeEnumFilterInput(graphene.InputObjectType):
required=False,
)
+ class Meta:
+ doc_category = DOC_CATEGORY_ATTRIBUTES
+
-class AttributeTypeEnumFilterInput(graphene.InputObjectType):
+class AttributeTypeEnumFilterInput(BaseInputObjectType):
eq = AttributeTypeEnum(description=FilterInputDescriptions.EQ, required=False)
one_of = NonNullList(
AttributeTypeEnum,
@@ -166,8 +176,11 @@ class AttributeTypeEnumFilterInput(graphene.InputObjectType):
required=False,
)
+ class Meta:
+ doc_category = DOC_CATEGORY_ATTRIBUTES
+
-class MeasurementUnitsEnumFilterInput(graphene.InputObjectType):
+class MeasurementUnitsEnumFilterInput(BaseInputObjectType):
eq = MeasurementUnitsEnum(description=FilterInputDescriptions.EQ, required=False)
one_of = NonNullList(
MeasurementUnitsEnum,
@@ -175,6 +188,9 @@ class MeasurementUnitsEnumFilterInput(graphene.InputObjectType):
required=False,
)
+ class Meta:
+ doc_category = DOC_CATEGORY_ATTRIBUTES
+
def filter_attribute_name(qs, _, value):
return filter_by_string_field(qs, "name", value)
@@ -260,3 +276,4 @@ class AttributeWhereInput(WhereInputObjectType):
class Meta:
filterset_class = AttributeWhere
description = "Where filtering options." + ADDED_IN_311 + PREVIEW_FEATURE
+ doc_category = DOC_CATEGORY_ATTRIBUTES
diff --git a/saleor/graphql/attribute/mutations/attribute_create.py b/saleor/graphql/attribute/mutations/attribute_create.py
index 64f0626bb8..4921da7aa8 100644
--- a/saleor/graphql/attribute/mutations/attribute_create.py
+++ b/saleor/graphql/attribute/mutations/attribute_create.py
@@ -10,10 +10,11 @@ from ....core.exceptions import PermissionDenied
from ....permission.enums import PageTypePermissions, ProductTypePermissions
from ...core import ResolveInfo
from ...core.descriptions import ADDED_IN_310, DEPRECATED_IN_3X_INPUT
+from ...core.doc_category import DOC_CATEGORY_ATTRIBUTES
from ...core.enums import MeasurementUnitsEnum
from ...core.fields import JSONString
from ...core.mutations import ModelMutation
-from ...core.types import AttributeError, NonNullList
+from ...core.types import AttributeError, BaseInputObjectType, NonNullList
from ...plugins.dataloaders import get_plugin_manager_promise
from ..descriptions import AttributeDescriptions, AttributeValueDescriptions
from ..enums import AttributeEntityTypeEnum, AttributeInputTypeEnum, AttributeTypeEnum
@@ -21,7 +22,7 @@ from ..types import Attribute
from .mixins import AttributeMixin
-class AttributeValueInput(graphene.InputObjectType):
+class AttributeValueInput(BaseInputObjectType):
value = graphene.String(description=AttributeValueDescriptions.VALUE)
rich_text = JSONString(
description=AttributeValueDescriptions.RICH_TEXT
@@ -45,12 +46,18 @@ class AttributeValueInput(graphene.InputObjectType):
required=False,
)
+ class Meta:
+ doc_category = DOC_CATEGORY_ATTRIBUTES
+
class AttributeValueCreateInput(AttributeValueInput):
name = graphene.String(required=True, description=AttributeValueDescriptions.NAME)
+ class Meta:
+ doc_category = DOC_CATEGORY_ATTRIBUTES
+
-class AttributeCreateInput(graphene.InputObjectType):
+class AttributeCreateInput(BaseInputObjectType):
input_type = AttributeInputTypeEnum(description=AttributeDescriptions.INPUT_TYPE)
entity_type = AttributeEntityTypeEnum(description=AttributeDescriptions.ENTITY_TYPE)
name = graphene.String(required=True, description=AttributeDescriptions.NAME)
@@ -87,6 +94,9 @@ class AttributeCreateInput(graphene.InputObjectType):
description="External ID of this attribute." + ADDED_IN_310, required=False
)
+ class Meta:
+ doc_category = DOC_CATEGORY_ATTRIBUTES
+
class AttributeCreate(AttributeMixin, ModelMutation):
# Needed by AttributeMixin,
diff --git a/saleor/graphql/attribute/mutations/attribute_reorder_values.py b/saleor/graphql/attribute/mutations/attribute_reorder_values.py
index 1a29019645..35a8b499fe 100644
--- a/saleor/graphql/attribute/mutations/attribute_reorder_values.py
+++ b/saleor/graphql/attribute/mutations/attribute_reorder_values.py
@@ -6,6 +6,7 @@ from ....attribute.error_codes import AttributeErrorCode
from ....core.tracing import traced_atomic_transaction
from ....permission.enums import ProductTypePermissions
from ...core import ResolveInfo
+from ...core.doc_category import DOC_CATEGORY_ATTRIBUTES
from ...core.inputs import ReorderInput
from ...core.mutations import BaseMutation
from ...core.types import AttributeError, NonNullList
@@ -21,6 +22,7 @@ class AttributeReorderValues(BaseMutation):
class Meta:
description = "Reorder the values of an attribute."
+ doc_category = DOC_CATEGORY_ATTRIBUTES
permissions = (ProductTypePermissions.MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES,)
error_type_class = AttributeError
error_type_field = "attribute_errors"
diff --git a/saleor/graphql/attribute/mutations/attribute_update.py b/saleor/graphql/attribute/mutations/attribute_update.py
index 4a411b4aa5..b41d565ef7 100644
--- a/saleor/graphql/attribute/mutations/attribute_update.py
+++ b/saleor/graphql/attribute/mutations/attribute_update.py
@@ -6,9 +6,10 @@ from ....attribute.error_codes import AttributeErrorCode
from ....permission.enums import ProductTypePermissions
from ...core import ResolveInfo
from ...core.descriptions import ADDED_IN_310, DEPRECATED_IN_3X_INPUT
+from ...core.doc_category import DOC_CATEGORY_ATTRIBUTES
from ...core.enums import MeasurementUnitsEnum
from ...core.mutations import ModelWithExtRefMutation
-from ...core.types import AttributeError, NonNullList
+from ...core.types import AttributeError, BaseInputObjectType, NonNullList
from ...plugins.dataloaders import get_plugin_manager_promise
from ..descriptions import AttributeDescriptions, AttributeValueDescriptions
from ..types import Attribute
@@ -19,8 +20,11 @@ from .mixins import AttributeMixin
class AttributeValueUpdateInput(AttributeValueInput):
name = graphene.String(required=False, description=AttributeValueDescriptions.NAME)
+ class Meta:
+ doc_category = DOC_CATEGORY_ATTRIBUTES
+
-class AttributeUpdateInput(graphene.InputObjectType):
+class AttributeUpdateInput(BaseInputObjectType):
name = graphene.String(description=AttributeDescriptions.NAME)
slug = graphene.String(description=AttributeDescriptions.SLUG)
unit = MeasurementUnitsEnum(description=AttributeDescriptions.UNIT, required=False)
@@ -61,6 +65,9 @@ class AttributeUpdateInput(graphene.InputObjectType):
description="External ID of this product." + ADDED_IN_310, required=False
)
+ class Meta:
+ doc_category = DOC_CATEGORY_ATTRIBUTES
+
class AttributeUpdate(AttributeMixin, ModelWithExtRefMutation):
# Needed by AttributeMixin,
diff --git a/saleor/graphql/attribute/schema.py b/saleor/graphql/attribute/schema.py
index 2fe14c00d4..d545a983d5 100644
--- a/saleor/graphql/attribute/schema.py
+++ b/saleor/graphql/attribute/schema.py
@@ -4,7 +4,8 @@ from ...attribute import models
from ..core import ResolveInfo
from ..core.connection import create_connection_slice, filter_connection_queryset
from ..core.descriptions import ADDED_IN_310, ADDED_IN_311, PREVIEW_FEATURE
-from ..core.fields import FilterConnectionField
+from ..core.doc_category import DOC_CATEGORY_ATTRIBUTES
+from ..core.fields import BaseField, FilterConnectionField
from ..core.utils.resolvers import resolve_by_global_id_slug_or_ext_ref
from ..translations.mutations import AttributeTranslate, AttributeValueTranslate
from .bulk_mutations import AttributeBulkDelete, AttributeValueBulkDelete
@@ -40,8 +41,9 @@ class AttributeQueries(graphene.ObjectType):
channel=graphene.String(
description="Slug of a channel for which the data should be returned."
),
+ doc_category=DOC_CATEGORY_ATTRIBUTES,
)
- attribute = graphene.Field(
+ attribute = BaseField(
Attribute,
id=graphene.Argument(graphene.ID, description="ID of the attribute."),
slug=graphene.Argument(graphene.String, description="Slug of the attribute."),
@@ -49,6 +51,7 @@ class AttributeQueries(graphene.ObjectType):
graphene.String, description=f"External ID of the attribute. {ADDED_IN_310}"
),
description="Look up an attribute by ID, slug or external reference.",
+ doc_category=DOC_CATEGORY_ATTRIBUTES,
)
def resolve_attributes(self, info: ResolveInfo, *, search=None, **kwargs):
diff --git a/saleor/graphql/attribute/sorters.py b/saleor/graphql/attribute/sorters.py
index 834e2ba07f..d0f32c8fa0 100644
--- a/saleor/graphql/attribute/sorters.py
+++ b/saleor/graphql/attribute/sorters.py
@@ -1,9 +1,8 @@
-import graphene
+from ..core.doc_category import DOC_CATEGORY_ATTRIBUTES
+from ..core.types import BaseEnum, SortInputObjectType
-from ..core.types import SortInputObjectType
-
-class AttributeSortField(graphene.Enum):
+class AttributeSortField(BaseEnum):
NAME = ["name", "slug"]
SLUG = ["slug"]
VALUE_REQUIRED = ["value_required", "name", "slug"]
@@ -14,6 +13,9 @@ class AttributeSortField(graphene.Enum):
STOREFRONT_SEARCH_POSITION = ["storefront_search_position", "name", "pk"]
AVAILABLE_IN_GRID = ["available_in_grid", "name", "pk"]
+ class Meta:
+ doc_category = DOC_CATEGORY_ATTRIBUTES
+
@property
def description(self):
# pylint: disable=no-member
@@ -50,14 +52,18 @@ class AttributeSortField(graphene.Enum):
class AttributeSortingInput(SortInputObjectType):
class Meta:
+ doc_category = DOC_CATEGORY_ATTRIBUTES
sort_enum = AttributeSortField
type_name = "attributes"
-class AttributeChoicesSortField(graphene.Enum):
+class AttributeChoicesSortField(BaseEnum):
NAME = ["name", "slug"]
SLUG = ["slug"]
+ class Meta:
+ doc_category = DOC_CATEGORY_ATTRIBUTES
+
@property
def description(self):
descriptions = {
@@ -71,5 +77,6 @@ class AttributeChoicesSortField(graphene.Enum):
class AttributeChoicesSortingInput(SortInputObjectType):
class Meta:
+ doc_category = DOC_CATEGORY_ATTRIBUTES
sort_enum = AttributeChoicesSortField
type_name = "attribute choices"
diff --git a/saleor/graphql/attribute/types.py b/saleor/graphql/attribute/types.py
index 0bf45c0f5e..4030c9217d 100644
--- a/saleor/graphql/attribute/types.py
+++ b/saleor/graphql/attribute/types.py
@@ -22,10 +22,13 @@ from ..core.descriptions import (
ADDED_IN_310,
DEPRECATED_IN_3X_FIELD,
)
+from ..core.doc_category import DOC_CATEGORY_ATTRIBUTES
from ..core.enums import MeasurementUnitsEnum
from ..core.fields import ConnectionField, FilterConnectionField, JSONString
from ..core.scalars import Date
from ..core.types import (
+ BaseInputObjectType,
+ BaseObjectType,
DateRangeInput,
DateTimeRangeInput,
File,
@@ -146,6 +149,7 @@ class AttributeValue(ModelObjectType[models.AttributeValue]):
class AttributeValueCountableConnection(CountableConnection):
class Meta:
+ doc_category = DOC_CATEGORY_ATTRIBUTES
node = AttributeValue
@@ -324,10 +328,11 @@ class Attribute(ModelObjectType[models.Attribute]):
class AttributeCountableConnection(CountableConnection):
class Meta:
+ doc_category = DOC_CATEGORY_ATTRIBUTES
node = Attribute
-class AssignedVariantAttribute(graphene.ObjectType):
+class AssignedVariantAttribute(BaseObjectType):
attribute = graphene.Field(
Attribute, description="Attribute assigned to variant.", required=True
)
@@ -346,9 +351,10 @@ class AssignedVariantAttribute(graphene.ObjectType):
"Represents assigned attribute to variant with variant selection attached."
+ ADDED_IN_31
)
+ doc_category = DOC_CATEGORY_ATTRIBUTES
-class SelectedAttribute(graphene.ObjectType):
+class SelectedAttribute(BaseObjectType):
attribute = graphene.Field(
Attribute,
default_value=None,
@@ -360,10 +366,11 @@ class SelectedAttribute(graphene.ObjectType):
)
class Meta:
+ doc_category = DOC_CATEGORY_ATTRIBUTES
description = "Represents a custom attribute."
-class AttributeInput(graphene.InputObjectType):
+class AttributeInput(BaseInputObjectType):
slug = graphene.String(required=True, description=AttributeDescriptions.SLUG)
values = NonNullList(
graphene.String, required=False, description=AttributeValueDescriptions.SLUG
@@ -387,8 +394,11 @@ class AttributeInput(graphene.InputObjectType):
required=False, description=AttributeDescriptions.BOOLEAN
)
+ class Meta:
+ doc_category = DOC_CATEGORY_ATTRIBUTES
+
-class AttributeValueSelectableTypeInput(graphene.InputObjectType):
+class AttributeValueSelectableTypeInput(BaseInputObjectType):
id = graphene.ID(required=False, description="ID of an attribute value.")
value = graphene.String(
required=False,
@@ -403,9 +413,10 @@ class AttributeValueSelectableTypeInput(graphene.InputObjectType):
"Represents attribute value. If no ID provided, value will be resolved. "
+ ADDED_IN_39
)
+ doc_category = DOC_CATEGORY_ATTRIBUTES
-class AttributeValueInput(graphene.InputObjectType):
+class AttributeValueInput(BaseInputObjectType):
id = graphene.ID(description="ID of the selected attribute.")
values = NonNullList(
graphene.String,
@@ -452,3 +463,6 @@ class AttributeValueInput(graphene.InputObjectType):
date_time = graphene.DateTime(
required=False, description=AttributeValueDescriptions.DATE_TIME
)
+
+ class Meta:
+ doc_category = DOC_CATEGORY_ATTRIBUTES
diff --git a/saleor/graphql/channel/mutations/channel_activate.py b/saleor/graphql/channel/mutations/channel_activate.py
index 19f1ac2112..544a418049 100644
--- a/saleor/graphql/channel/mutations/channel_activate.py
+++ b/saleor/graphql/channel/mutations/channel_activate.py
@@ -4,6 +4,7 @@ from django.core.exceptions import ValidationError
from ....channel.error_codes import ChannelErrorCode
from ....permission.enums import ChannelPermissions
from ...core import ResolveInfo
+from ...core.doc_category import DOC_CATEGORY_CHANNELS
from ...core.mutations import BaseMutation
from ...core.types import ChannelError
from ...plugins.dataloaders import get_plugin_manager_promise
@@ -18,6 +19,7 @@ class ChannelActivate(BaseMutation):
class Meta:
description = "Activate a channel."
+ doc_category = DOC_CATEGORY_CHANNELS
permissions = (ChannelPermissions.MANAGE_CHANNELS,)
error_type_class = ChannelError
error_type_field = "channel_errors"
diff --git a/saleor/graphql/channel/mutations/channel_deactivate.py b/saleor/graphql/channel/mutations/channel_deactivate.py
index c24afd5b9e..1445aa80f7 100644
--- a/saleor/graphql/channel/mutations/channel_deactivate.py
+++ b/saleor/graphql/channel/mutations/channel_deactivate.py
@@ -4,6 +4,7 @@ from django.core.exceptions import ValidationError
from ....channel.error_codes import ChannelErrorCode
from ....permission.enums import ChannelPermissions
from ...core import ResolveInfo
+from ...core.doc_category import DOC_CATEGORY_CHANNELS
from ...core.mutations import BaseMutation
from ...core.types import ChannelError
from ...plugins.dataloaders import get_plugin_manager_promise
@@ -18,6 +19,7 @@ class ChannelDeactivate(BaseMutation):
class Meta:
description = "Deactivate a channel."
+ doc_category = DOC_CATEGORY_CHANNELS
permissions = (ChannelPermissions.MANAGE_CHANNELS,)
error_type_class = ChannelError
error_type_field = "channel_errors"
diff --git a/saleor/graphql/channel/mutations/channel_reorder_warehouses.py b/saleor/graphql/channel/mutations/channel_reorder_warehouses.py
index adad290364..07a017f056 100644
--- a/saleor/graphql/channel/mutations/channel_reorder_warehouses.py
+++ b/saleor/graphql/channel/mutations/channel_reorder_warehouses.py
@@ -9,6 +9,7 @@ from ....core.tracing import traced_atomic_transaction
from ....permission.enums import ChannelPermissions
from ...core import ResolveInfo
from ...core.descriptions import ADDED_IN_37, PREVIEW_FEATURE
+from ...core.doc_category import DOC_CATEGORY_CHANNELS
from ...core.inputs import ReorderInput
from ...core.mutations import BaseMutation
from ...core.types import ChannelError, NonNullList
@@ -39,6 +40,7 @@ class ChannelReorderWarehouses(BaseMutation):
description = (
"Reorder the warehouses of a channel." + ADDED_IN_37 + PREVIEW_FEATURE
)
+ doc_category = DOC_CATEGORY_CHANNELS
permissions = (ChannelPermissions.MANAGE_CHANNELS,)
error_type_class = ChannelError
diff --git a/saleor/graphql/channel/schema.py b/saleor/graphql/channel/schema.py
index 8311123c05..756142f565 100644
--- a/saleor/graphql/channel/schema.py
+++ b/saleor/graphql/channel/schema.py
@@ -3,7 +3,8 @@ import graphene
from ...permission.auth_filters import AuthorizationFilters
from ..core import ResolveInfo
from ..core.descriptions import ADDED_IN_36, PREVIEW_FEATURE
-from ..core.fields import PermissionsField
+from ..core.doc_category import DOC_CATEGORY_CHANNELS
+from ..core.fields import BaseField, PermissionsField
from ..core.types import NonNullList
from .mutations import (
ChannelActivate,
@@ -18,7 +19,7 @@ from .types import Channel
class ChannelQueries(graphene.ObjectType):
- channel = graphene.Field(
+ channel = BaseField(
Channel,
id=graphene.Argument(
graphene.ID, description="ID of the channel.", required=False
@@ -29,6 +30,7 @@ class ChannelQueries(graphene.ObjectType):
required=False,
),
description="Look up a channel by ID or slug.",
+ doc_category=DOC_CATEGORY_CHANNELS,
)
channels = PermissionsField(
NonNullList(Channel),
@@ -37,6 +39,7 @@ class ChannelQueries(graphene.ObjectType):
AuthorizationFilters.AUTHENTICATED_APP,
AuthorizationFilters.AUTHENTICATED_STAFF_USER,
],
+ doc_category=DOC_CATEGORY_CHANNELS,
)
@staticmethod
diff --git a/saleor/graphql/checkout/mutations/checkout_add_promo_code.py b/saleor/graphql/checkout/mutations/checkout_add_promo_code.py
index 6178a477a3..8156a2dc04 100644
--- a/saleor/graphql/checkout/mutations/checkout_add_promo_code.py
+++ b/saleor/graphql/checkout/mutations/checkout_add_promo_code.py
@@ -10,6 +10,7 @@ from ....checkout.fetch import (
from ....checkout.utils import add_promo_code_to_checkout, invalidate_checkout_prices
from ...core import ResolveInfo
from ...core.descriptions import ADDED_IN_34, DEPRECATED_IN_3X_INPUT
+from ...core.doc_category import DOC_CATEGORY_CHECKOUT
from ...core.mutations import BaseMutation
from ...core.scalars import UUID
from ...core.types import CheckoutError
@@ -45,6 +46,7 @@ class CheckoutAddPromoCode(BaseMutation):
class Meta:
description = "Adds a gift card or a voucher to a checkout."
+ doc_category = DOC_CATEGORY_CHECKOUT
error_type_class = CheckoutError
error_type_field = "checkout_errors"
diff --git a/saleor/graphql/checkout/mutations/checkout_billing_address_update.py b/saleor/graphql/checkout/mutations/checkout_billing_address_update.py
index 9b155b49dd..17f80c5957 100644
--- a/saleor/graphql/checkout/mutations/checkout_billing_address_update.py
+++ b/saleor/graphql/checkout/mutations/checkout_billing_address_update.py
@@ -15,6 +15,7 @@ from ...core.descriptions import (
DEPRECATED_IN_3X_INPUT,
PREVIEW_FEATURE,
)
+from ...core.doc_category import DOC_CATEGORY_CHECKOUT
from ...core.scalars import UUID
from ...core.types import CheckoutError
from ...discount.dataloaders import load_discounts
@@ -57,6 +58,7 @@ class CheckoutBillingAddressUpdate(CheckoutShippingAddressUpdate):
class Meta:
description = "Update billing address in the existing checkout."
+ doc_category = DOC_CATEGORY_CHECKOUT
error_type_class = CheckoutError
error_type_field = "checkout_errors"
diff --git a/saleor/graphql/checkout/mutations/checkout_complete.py b/saleor/graphql/checkout/mutations/checkout_complete.py
index 1b08114035..178b313213 100644
--- a/saleor/graphql/checkout/mutations/checkout_complete.py
+++ b/saleor/graphql/checkout/mutations/checkout_complete.py
@@ -24,6 +24,7 @@ from ...account.i18n import I18nMixin
from ...app.dataloaders import get_app_promise
from ...core import ResolveInfo
from ...core.descriptions import ADDED_IN_34, ADDED_IN_38, DEPRECATED_IN_3X_INPUT
+from ...core.doc_category import DOC_CATEGORY_CHECKOUT
from ...core.fields import JSONString
from ...core.mutations import BaseMutation
from ...core.scalars import UUID
@@ -108,6 +109,7 @@ class CheckoutComplete(BaseMutation, I18nMixin):
"confirmationNeeded flag will be set to True and no order created "
"until payment is confirmed with second call of this mutation."
)
+ doc_category = DOC_CATEGORY_CHECKOUT
error_type_class = CheckoutError
error_type_field = "checkout_errors"
diff --git a/saleor/graphql/checkout/mutations/checkout_create.py b/saleor/graphql/checkout/mutations/checkout_create.py
index ecdec0a0fd..7351bafc01 100644
--- a/saleor/graphql/checkout/mutations/checkout_create.py
+++ b/saleor/graphql/checkout/mutations/checkout_create.py
@@ -22,10 +22,11 @@ from ...core.descriptions import (
DEPRECATED_IN_3X_FIELD,
PREVIEW_FEATURE,
)
+from ...core.doc_category import DOC_CATEGORY_CHECKOUT
from ...core.enums import LanguageCodeEnum
from ...core.mutations import ModelMutation
from ...core.scalars import PositiveDecimal
-from ...core.types import CheckoutError, NonNullList
+from ...core.types import BaseInputObjectType, CheckoutError, NonNullList
from ...core.validators import validate_variants_available_in_channel
from ...plugins.dataloaders import get_plugin_manager_promise
from ...product.types import ProductVariant
@@ -47,7 +48,7 @@ if TYPE_CHECKING:
from ...meta.mutations import MetadataInput
-class CheckoutAddressValidationRules(graphene.InputObjectType):
+class CheckoutAddressValidationRules(BaseInputObjectType):
check_required_fields = graphene.Boolean(
description=(
"Determines if an error should be raised when the provided address doesn't "
@@ -74,8 +75,11 @@ class CheckoutAddressValidationRules(graphene.InputObjectType):
default_value=True,
)
+ class Meta:
+ doc_category = DOC_CATEGORY_CHECKOUT
+
-class CheckoutValidationRules(graphene.InputObjectType):
+class CheckoutValidationRules(BaseInputObjectType):
shipping_address = CheckoutAddressValidationRules(
description=(
"The validation rules that can be applied to provided shipping address"
@@ -89,8 +93,11 @@ class CheckoutValidationRules(graphene.InputObjectType):
)
)
+ class Meta:
+ doc_category = DOC_CATEGORY_CHECKOUT
+
-class CheckoutLineInput(graphene.InputObjectType):
+class CheckoutLineInput(BaseInputObjectType):
quantity = graphene.Int(required=True, description="The number of items purchased.")
variant_id = graphene.ID(required=True, description="ID of the product variant.")
price = PositiveDecimal(
@@ -117,8 +124,11 @@ class CheckoutLineInput(graphene.InputObjectType):
required=False,
)
+ class Meta:
+ doc_category = DOC_CATEGORY_CHECKOUT
+
-class CheckoutCreateInput(graphene.InputObjectType):
+class CheckoutCreateInput(BaseInputObjectType):
channel = graphene.String(
description="Slug of a channel in which to create a checkout."
)
@@ -151,6 +161,9 @@ class CheckoutCreateInput(graphene.InputObjectType):
),
)
+ class Meta:
+ doc_category = DOC_CATEGORY_CHECKOUT
+
class CheckoutCreate(ModelMutation, I18nMixin):
created = graphene.Field(
@@ -170,6 +183,7 @@ class CheckoutCreate(ModelMutation, I18nMixin):
class Meta:
description = "Create a new checkout."
+ doc_category = DOC_CATEGORY_CHECKOUT
model = models.Checkout
object_type = Checkout
return_field_name = "checkout"
diff --git a/saleor/graphql/checkout/mutations/checkout_customer_attach.py b/saleor/graphql/checkout/mutations/checkout_customer_attach.py
index abe193c079..7bf858cd5b 100644
--- a/saleor/graphql/checkout/mutations/checkout_customer_attach.py
+++ b/saleor/graphql/checkout/mutations/checkout_customer_attach.py
@@ -8,6 +8,7 @@ from ....permission.enums import AccountPermissions
from ...account.types import User
from ...core import ResolveInfo
from ...core.descriptions import ADDED_IN_34, DEPRECATED_IN_3X_INPUT
+from ...core.doc_category import DOC_CATEGORY_CHECKOUT
from ...core.mutations import BaseMutation
from ...core.scalars import UUID
from ...core.types import CheckoutError
@@ -46,6 +47,7 @@ class CheckoutCustomerAttach(BaseMutation):
class Meta:
description = "Sets the customer as the owner of the checkout."
+ doc_category = DOC_CATEGORY_CHECKOUT
error_type_class = CheckoutError
error_type_field = "checkout_errors"
permissions = (
diff --git a/saleor/graphql/checkout/mutations/checkout_customer_detach.py b/saleor/graphql/checkout/mutations/checkout_customer_detach.py
index bb36557738..17e1491c64 100644
--- a/saleor/graphql/checkout/mutations/checkout_customer_detach.py
+++ b/saleor/graphql/checkout/mutations/checkout_customer_detach.py
@@ -5,6 +5,7 @@ from ....permission.auth_filters import AuthorizationFilters
from ....permission.enums import AccountPermissions
from ...core import ResolveInfo
from ...core.descriptions import ADDED_IN_34, DEPRECATED_IN_3X_INPUT
+from ...core.doc_category import DOC_CATEGORY_CHECKOUT
from ...core.mutations import BaseMutation
from ...core.scalars import UUID
from ...core.types import CheckoutError
@@ -35,6 +36,7 @@ class CheckoutCustomerDetach(BaseMutation):
class Meta:
description = "Removes the user assigned as the owner of the checkout."
+ doc_category = DOC_CATEGORY_CHECKOUT
error_type_class = CheckoutError
error_type_field = "checkout_errors"
permissions = (
diff --git a/saleor/graphql/checkout/mutations/checkout_delivery_method_update.py b/saleor/graphql/checkout/mutations/checkout_delivery_method_update.py
index a003cf3b88..39c986281b 100644
--- a/saleor/graphql/checkout/mutations/checkout_delivery_method_update.py
+++ b/saleor/graphql/checkout/mutations/checkout_delivery_method_update.py
@@ -30,6 +30,7 @@ from ...core.descriptions import (
DEPRECATED_IN_3X_INPUT,
PREVIEW_FEATURE,
)
+from ...core.doc_category import DOC_CATEGORY_CHECKOUT
from ...core.mutations import BaseMutation
from ...core.scalars import UUID
from ...core.types import CheckoutError
@@ -65,6 +66,7 @@ class CheckoutDeliveryMethodUpdate(BaseMutation):
"Updates the delivery method (shipping method or pick up point) "
"of the checkout." + ADDED_IN_31 + PREVIEW_FEATURE
)
+ doc_category = DOC_CATEGORY_CHECKOUT
error_type_class = CheckoutError
@classmethod
diff --git a/saleor/graphql/checkout/mutations/checkout_email_update.py b/saleor/graphql/checkout/mutations/checkout_email_update.py
index 4b1ae818f6..713c655f6f 100644
--- a/saleor/graphql/checkout/mutations/checkout_email_update.py
+++ b/saleor/graphql/checkout/mutations/checkout_email_update.py
@@ -4,6 +4,7 @@ from django.core.exceptions import ValidationError
from ....checkout.error_codes import CheckoutErrorCode
from ...core import ResolveInfo
from ...core.descriptions import ADDED_IN_34, DEPRECATED_IN_3X_INPUT
+from ...core.doc_category import DOC_CATEGORY_CHECKOUT
from ...core.mutations import BaseMutation
from ...core.scalars import UUID
from ...core.types import CheckoutError
@@ -34,6 +35,7 @@ class CheckoutEmailUpdate(BaseMutation):
class Meta:
description = "Updates email address in the existing checkout object."
+ doc_category = DOC_CATEGORY_CHECKOUT
error_type_class = CheckoutError
error_type_field = "checkout_errors"
diff --git a/saleor/graphql/checkout/mutations/checkout_language_code_update.py b/saleor/graphql/checkout/mutations/checkout_language_code_update.py
index 8a386b6c51..8007bdf550 100644
--- a/saleor/graphql/checkout/mutations/checkout_language_code_update.py
+++ b/saleor/graphql/checkout/mutations/checkout_language_code_update.py
@@ -2,6 +2,7 @@ import graphene
from ...core import ResolveInfo
from ...core.descriptions import ADDED_IN_34, DEPRECATED_IN_3X_INPUT
+from ...core.doc_category import DOC_CATEGORY_CHECKOUT
from ...core.enums import LanguageCodeEnum
from ...core.mutations import BaseMutation
from ...core.scalars import UUID
@@ -35,6 +36,7 @@ class CheckoutLanguageCodeUpdate(BaseMutation):
class Meta:
description = "Update language code in the existing checkout."
+ doc_category = DOC_CATEGORY_CHECKOUT
error_type_class = CheckoutError
error_type_field = "checkout_errors"
diff --git a/saleor/graphql/checkout/mutations/checkout_line_delete.py b/saleor/graphql/checkout/mutations/checkout_line_delete.py
index afb732c972..f9545731df 100644
--- a/saleor/graphql/checkout/mutations/checkout_line_delete.py
+++ b/saleor/graphql/checkout/mutations/checkout_line_delete.py
@@ -4,6 +4,7 @@ from ....checkout.fetch import fetch_checkout_info, fetch_checkout_lines
from ....checkout.utils import invalidate_checkout_prices
from ...core import ResolveInfo
from ...core.descriptions import ADDED_IN_34, DEPRECATED_IN_3X_INPUT
+from ...core.doc_category import DOC_CATEGORY_CHECKOUT
from ...core.mutations import BaseMutation
from ...core.scalars import UUID
from ...core.types import CheckoutError
@@ -35,6 +36,7 @@ class CheckoutLineDelete(BaseMutation):
class Meta:
description = "Deletes a CheckoutLine."
+ doc_category = DOC_CATEGORY_CHECKOUT
error_type_class = CheckoutError
error_type_field = "checkout_errors"
diff --git a/saleor/graphql/checkout/mutations/checkout_lines_add.py b/saleor/graphql/checkout/mutations/checkout_lines_add.py
index 32e06a3326..8a672e23bf 100644
--- a/saleor/graphql/checkout/mutations/checkout_lines_add.py
+++ b/saleor/graphql/checkout/mutations/checkout_lines_add.py
@@ -13,6 +13,7 @@ from ....warehouse.reservations import get_reservation_length, is_reservation_en
from ...app.dataloaders import get_app_promise
from ...core import ResolveInfo
from ...core.descriptions import ADDED_IN_34, DEPRECATED_IN_3X_INPUT
+from ...core.doc_category import DOC_CATEGORY_CHECKOUT
from ...core.mutations import BaseMutation
from ...core.scalars import UUID
from ...core.types import CheckoutError, NonNullList
@@ -67,6 +68,7 @@ class CheckoutLinesAdd(BaseMutation):
"Adds a checkout line to the existing checkout."
"If line was already in checkout, its quantity will be increased."
)
+ doc_category = DOC_CATEGORY_CHECKOUT
error_type_class = CheckoutError
error_type_field = "checkout_errors"
diff --git a/saleor/graphql/checkout/mutations/checkout_lines_delete.py b/saleor/graphql/checkout/mutations/checkout_lines_delete.py
index 72a96224bd..64b2e2c9cd 100644
--- a/saleor/graphql/checkout/mutations/checkout_lines_delete.py
+++ b/saleor/graphql/checkout/mutations/checkout_lines_delete.py
@@ -5,6 +5,7 @@ from ....checkout.fetch import fetch_checkout_info, fetch_checkout_lines
from ....checkout.utils import invalidate_checkout_prices
from ...core import ResolveInfo
from ...core.descriptions import ADDED_IN_34, DEPRECATED_IN_3X_INPUT
+from ...core.doc_category import DOC_CATEGORY_CHECKOUT
from ...core.mutations import BaseMutation
from ...core.scalars import UUID
from ...core.types import CheckoutError, NonNullList
@@ -35,6 +36,7 @@ class CheckoutLinesDelete(BaseMutation):
class Meta:
description = "Deletes checkout lines."
+ doc_category = DOC_CATEGORY_CHECKOUT
error_type_class = CheckoutError
@classmethod
diff --git a/saleor/graphql/checkout/mutations/checkout_lines_update.py b/saleor/graphql/checkout/mutations/checkout_lines_update.py
index 139c1dae28..4e4568ee8d 100644
--- a/saleor/graphql/checkout/mutations/checkout_lines_update.py
+++ b/saleor/graphql/checkout/mutations/checkout_lines_update.py
@@ -15,8 +15,9 @@ from ...core.descriptions import (
DEPRECATED_IN_3X_INPUT,
PREVIEW_FEATURE,
)
+from ...core.doc_category import DOC_CATEGORY_CHECKOUT
from ...core.scalars import UUID, PositiveDecimal
-from ...core.types import CheckoutError, NonNullList
+from ...core.types import BaseInputObjectType, CheckoutError, NonNullList
from ...core.validators import validate_one_of_args_is_in_mutation
from ...product.types import ProductVariant
from ...site.dataloaders import get_site_promise
@@ -29,7 +30,7 @@ from .utils import (
)
-class CheckoutLineUpdateInput(graphene.InputObjectType):
+class CheckoutLineUpdateInput(BaseInputObjectType):
variant_id = graphene.ID(
required=False,
description=(
@@ -58,6 +59,9 @@ class CheckoutLineUpdateInput(graphene.InputObjectType):
required=False,
)
+ class Meta:
+ doc_category = DOC_CATEGORY_CHECKOUT
+
class CheckoutLinesUpdate(CheckoutLinesAdd):
checkout = graphene.Field(Checkout, description="An updated checkout.")
@@ -88,6 +92,7 @@ class CheckoutLinesUpdate(CheckoutLinesAdd):
class Meta:
description = "Updates checkout line in the existing checkout."
+ doc_category = DOC_CATEGORY_CHECKOUT
error_type_class = CheckoutError
error_type_field = "checkout_errors"
diff --git a/saleor/graphql/checkout/mutations/checkout_remove_promo_code.py b/saleor/graphql/checkout/mutations/checkout_remove_promo_code.py
index 014314ce42..2eec2f42c9 100644
--- a/saleor/graphql/checkout/mutations/checkout_remove_promo_code.py
+++ b/saleor/graphql/checkout/mutations/checkout_remove_promo_code.py
@@ -14,6 +14,7 @@ from ....checkout.utils import (
)
from ...core import ResolveInfo
from ...core.descriptions import ADDED_IN_34, DEPRECATED_IN_3X_INPUT
+from ...core.doc_category import DOC_CATEGORY_CHECKOUT
from ...core.mutations import BaseMutation
from ...core.scalars import UUID
from ...core.types import CheckoutError
@@ -57,6 +58,7 @@ class CheckoutRemovePromoCode(BaseMutation):
class Meta:
description = "Remove a gift card or a voucher from a checkout."
+ doc_category = DOC_CATEGORY_CHECKOUT
error_type_class = CheckoutError
error_type_field = "checkout_errors"
diff --git a/saleor/graphql/checkout/mutations/checkout_shipping_address_update.py b/saleor/graphql/checkout/mutations/checkout_shipping_address_update.py
index 0b4e9c1c74..d54da3c700 100644
--- a/saleor/graphql/checkout/mutations/checkout_shipping_address_update.py
+++ b/saleor/graphql/checkout/mutations/checkout_shipping_address_update.py
@@ -25,6 +25,7 @@ from ...core.descriptions import (
DEPRECATED_IN_3X_INPUT,
PREVIEW_FEATURE,
)
+from ...core.doc_category import DOC_CATEGORY_CHECKOUT
from ...core.mutations import BaseMutation
from ...core.scalars import UUID
from ...core.types import CheckoutError
@@ -77,6 +78,7 @@ class CheckoutShippingAddressUpdate(BaseMutation, I18nMixin):
class Meta:
description = "Update shipping address in the existing checkout."
+ doc_category = DOC_CATEGORY_CHECKOUT
error_type_class = CheckoutError
error_type_field = "checkout_errors"
diff --git a/saleor/graphql/checkout/mutations/checkout_shipping_method_update.py b/saleor/graphql/checkout/mutations/checkout_shipping_method_update.py
index f2722f45ec..cf021dcab4 100644
--- a/saleor/graphql/checkout/mutations/checkout_shipping_method_update.py
+++ b/saleor/graphql/checkout/mutations/checkout_shipping_method_update.py
@@ -18,6 +18,7 @@ from ....shipping import models as shipping_models
from ....shipping.utils import convert_to_shipping_method_data
from ...core import ResolveInfo
from ...core.descriptions import ADDED_IN_34, DEPRECATED_IN_3X_INPUT
+from ...core.doc_category import DOC_CATEGORY_CHECKOUT
from ...core.mutations import BaseMutation
from ...core.scalars import UUID
from ...core.types import CheckoutError
@@ -51,6 +52,7 @@ class CheckoutShippingMethodUpdate(BaseMutation):
class Meta:
description = "Updates the shipping method of the checkout."
+ doc_category = DOC_CATEGORY_CHECKOUT
error_type_class = CheckoutError
error_type_field = "checkout_errors"
diff --git a/saleor/graphql/checkout/mutations/order_create_from_checkout.py b/saleor/graphql/checkout/mutations/order_create_from_checkout.py
index 1249311893..b73995f5f2 100644
--- a/saleor/graphql/checkout/mutations/order_create_from_checkout.py
+++ b/saleor/graphql/checkout/mutations/order_create_from_checkout.py
@@ -14,6 +14,7 @@ from ....permission.enums import CheckoutPermissions
from ...app.dataloaders import get_app_promise
from ...core import ResolveInfo
from ...core.descriptions import ADDED_IN_32, ADDED_IN_38, PREVIEW_FEATURE
+from ...core.doc_category import DOC_CATEGORY_CHECKOUT
from ...core.mutations import BaseMutation
from ...core.types import Error, NonNullList
from ...discount.dataloaders import load_discounts
@@ -40,6 +41,9 @@ class OrderCreateFromCheckoutError(Error):
required=False,
)
+ class Meta:
+ doc_category = DOC_CATEGORY_CHECKOUT
+
class OrderCreateFromCheckout(BaseMutation):
order = graphene.Field(Order, description="Placed order.")
@@ -79,6 +83,7 @@ class OrderCreateFromCheckout(BaseMutation):
+ ADDED_IN_32
+ PREVIEW_FEATURE
)
+ doc_category = DOC_CATEGORY_CHECKOUT
object_type = Order
permissions = (CheckoutPermissions.HANDLE_CHECKOUTS,)
error_type_class = OrderCreateFromCheckoutError
diff --git a/saleor/graphql/checkout/schema.py b/saleor/graphql/checkout/schema.py
index 0bffe89e3f..837b7dfe3a 100644
--- a/saleor/graphql/checkout/schema.py
+++ b/saleor/graphql/checkout/schema.py
@@ -9,7 +9,8 @@ from ..core.descriptions import (
DEPRECATED_IN_3X_FIELD,
DEPRECATED_IN_3X_INPUT,
)
-from ..core.fields import ConnectionField, FilterConnectionField
+from ..core.doc_category import DOC_CATEGORY_CHECKOUT
+from ..core.fields import BaseField, ConnectionField, FilterConnectionField
from ..core.scalars import UUID
from ..payment.mutations import CheckoutPaymentCreate
from .filters import CheckoutFilterInput
@@ -42,7 +43,7 @@ from .types import (
class CheckoutQueries(graphene.ObjectType):
- checkout = graphene.Field(
+ checkout = BaseField(
Checkout,
description="Look up a checkout by token and slug of channel.",
id=graphene.Argument(
@@ -54,6 +55,7 @@ class CheckoutQueries(graphene.ObjectType):
f"The checkout's token.{DEPRECATED_IN_3X_INPUT} Use `id` instead."
),
),
+ doc_category=DOC_CATEGORY_CHECKOUT,
)
# FIXME we could optimize the below field
checkouts = FilterConnectionField(
@@ -69,6 +71,7 @@ class CheckoutQueries(graphene.ObjectType):
CheckoutPermissions.MANAGE_CHECKOUTS,
],
description="List of checkouts.",
+ doc_category=DOC_CATEGORY_CHECKOUT,
)
checkout_lines = ConnectionField(
CheckoutLineCountableConnection,
@@ -76,6 +79,7 @@ class CheckoutQueries(graphene.ObjectType):
permissions=[
CheckoutPermissions.MANAGE_CHECKOUTS,
],
+ doc_category=DOC_CATEGORY_CHECKOUT,
)
@staticmethod
diff --git a/saleor/graphql/core/connection.py b/saleor/graphql/core/connection.py
index 60bf3ff535..c47fa14ad5 100644
--- a/saleor/graphql/core/connection.py
+++ b/saleor/graphql/core/connection.py
@@ -27,7 +27,7 @@ from ...channel.exceptions import ChannelNotDefined, NoDefaultChannel
from ..channel import ChannelContext, ChannelQsContext
from ..channel.utils import get_default_channel_slug_or_graphql_error
from ..core.enums import OrderDirection
-from ..core.types import NonNullList
+from ..core.types import BaseConnection, NonNullList
from ..utils.sorting import sort_queryset_for_connection
if TYPE_CHECKING:
@@ -608,7 +608,7 @@ def _handle_or_filter_input(filter_input, queryset, args, filterset_class, reque
# return queryset
-class NonNullConnection(Connection):
+class NonNullConnection(BaseConnection):
class Meta:
abstract = True
diff --git a/saleor/graphql/core/doc_category.py b/saleor/graphql/core/doc_category.py
new file mode 100644
index 0000000000..9a74bf0ea8
--- /dev/null
+++ b/saleor/graphql/core/doc_category.py
@@ -0,0 +1,72 @@
+DOC_CATEGORY_APPS = "Apps"
+DOC_CATEGORY_ATTRIBUTES = "Attributes"
+DOC_CATEGORY_AUTH = "Authentication"
+DOC_CATEGORY_CHANNELS = "Channels"
+DOC_CATEGORY_CHECKOUT = "Checkout"
+DOC_CATEGORY_DISCOUNTS = "Discounts"
+DOC_CATEGORY_GIFT_CARDS = "Gift cards"
+DOC_CATEGORY_ORDERS = "Orders"
+DOC_CATEGORY_PAGES = "Pages"
+DOC_CATEGORY_PAYMENTS = "Payments"
+DOC_CATEGORY_PRODUCTS = "Products"
+DOC_CATEGORY_SHIPPING = "Shipping"
+DOC_CATEGORY_TAXES = "Taxes"
+DOC_CATEGORY_USERS = "Users"
+DOC_CATEGORY_WEBHOOKS = "Webhooks"
+
+
+# Map models to category names in doc directive.
+DOC_CATEGORY_MAP = {
+ "account.Address": DOC_CATEGORY_USERS,
+ "account.CustomerEvent": DOC_CATEGORY_USERS,
+ "account.Group": DOC_CATEGORY_USERS,
+ "account.StaffNotificationRecipient": DOC_CATEGORY_USERS,
+ "account.User": DOC_CATEGORY_USERS,
+ "app.App": DOC_CATEGORY_APPS,
+ "app.AppToken": DOC_CATEGORY_APPS,
+ "app.AppExtension": DOC_CATEGORY_APPS,
+ "app.AppInstallation": DOC_CATEGORY_APPS,
+ "attribute.Attribute": DOC_CATEGORY_ATTRIBUTES,
+ "attribute.AttributeValue": DOC_CATEGORY_ATTRIBUTES,
+ "channel.Channel": DOC_CATEGORY_CHANNELS,
+ "checkout.Checkout": DOC_CATEGORY_CHECKOUT,
+ "checkout.CheckoutLine": DOC_CATEGORY_CHECKOUT,
+ "discount.Sale": DOC_CATEGORY_DISCOUNTS,
+ "discount.VoucherChannelListing": DOC_CATEGORY_DISCOUNTS,
+ "discount.Voucher": DOC_CATEGORY_DISCOUNTS,
+ "discount.OrderDiscount": DOC_CATEGORY_DISCOUNTS,
+ "giftcard.GiftCard": DOC_CATEGORY_GIFT_CARDS,
+ "giftcard.GiftCardTag": DOC_CATEGORY_GIFT_CARDS,
+ "giftcard.GiftEvent": DOC_CATEGORY_GIFT_CARDS,
+ "order.Order": DOC_CATEGORY_ORDERS,
+ "order.OrderLine": DOC_CATEGORY_ORDERS,
+ "order.OrderEvent": DOC_CATEGORY_ORDERS,
+ "order.Fulfillment": DOC_CATEGORY_ORDERS,
+ "order.FulfillmentLine": DOC_CATEGORY_ORDERS,
+ "page.Page": DOC_CATEGORY_PAGES,
+ "page.PageType": 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.Collection": DOC_CATEGORY_PRODUCTS,
+ "product.Product": DOC_CATEGORY_PRODUCTS,
+ "product.ProductMedia": DOC_CATEGORY_PRODUCTS,
+ "product.ProductType": DOC_CATEGORY_PRODUCTS,
+ "product.ProductVariant": DOC_CATEGORY_PRODUCTS,
+ "shipping.ShippingMethodChannelListing": DOC_CATEGORY_SHIPPING,
+ "shipping.ShippingMethod": DOC_CATEGORY_SHIPPING,
+ "shipping.ShippingZone": DOC_CATEGORY_SHIPPING,
+ "shipping.ShippingMethodPostalCodeRule": DOC_CATEGORY_SHIPPING,
+ "tax.TaxConfiguration": DOC_CATEGORY_TAXES,
+ "tax.TaxClass": DOC_CATEGORY_TAXES,
+ "tax.TaxClassCountryRate": DOC_CATEGORY_TAXES,
+ "tax.TaxConfigurationPerCountry": DOC_CATEGORY_TAXES,
+ "warehouse.Allocation": DOC_CATEGORY_PRODUCTS,
+ "warehouse.Warehouse": DOC_CATEGORY_PRODUCTS,
+ "warehouse.Stock": DOC_CATEGORY_PRODUCTS,
+ "webhook.WebhookEvent": DOC_CATEGORY_WEBHOOKS,
+ "webhook.Webhook": DOC_CATEGORY_WEBHOOKS,
+ "core.EventDeliveryAttempt": DOC_CATEGORY_WEBHOOKS,
+}
diff --git a/saleor/graphql/core/federation/schema.py b/saleor/graphql/core/federation/schema.py
index 0499ec1d2d..35f5c046d6 100644
--- a/saleor/graphql/core/federation/schema.py
+++ b/saleor/graphql/core/federation/schema.py
@@ -43,13 +43,16 @@ class _Service(graphene.ObjectType):
sdl = graphene.String()
-def build_federated_schema(query, mutation, types, subscription) -> graphene.Schema:
+def build_federated_schema(
+ query, mutation, types, subscription, directives=None
+) -> graphene.Schema:
"""Create GraphQL schema that supports Apollo Federation."""
schema = graphene.Schema(
query=query,
mutation=mutation,
types=list(types) + [_Any, _Entity, _Service],
subscription=subscription,
+ directives=directives,
)
entity_type = schema.get_type("_Entity")
@@ -138,7 +141,10 @@ def resolve_entities(_, info: ResolveInfo, *, representations):
def create_service_sdl_resolver(schema):
# subscriptions are not handled by the federation protocol
schema_sans_subscriptions = graphene.Schema(
- query=schema._query, mutation=schema._mutation, types=schema.types
+ query=schema._query,
+ mutation=schema._mutation,
+ types=schema.types,
+ directives=schema._directives,
)
# Render schema to string
federated_schema_sdl = print_schema(schema_sans_subscriptions)
diff --git a/saleor/graphql/core/fields.py b/saleor/graphql/core/fields.py
index 08209c68fd..194b37b415 100644
--- a/saleor/graphql/core/fields.py
+++ b/saleor/graphql/core/fields.py
@@ -11,7 +11,20 @@ from ..decorators import one_of_permissions_required
from .connection import FILTERS_NAME, FILTERSET_CLASS, WHERE_FILTERSET_CLASS, WHERE_NAME
-class PermissionsField(graphene.Field):
+class BaseField(graphene.Field):
+ doc_category: Optional[str]
+
+ def __init__(self, *args, **kwargs):
+ self.doc_category = kwargs.pop("doc_category", None)
+ super(BaseField, self).__init__(*args, **kwargs)
+
+ def get_resolver(self, parent_resolver):
+ resolver = self.resolver or parent_resolver
+ setattr(resolver, "doc_category", self.doc_category)
+ return resolver
+
+
+class PermissionsField(BaseField):
description: Optional[str]
def __init__(self, *args, **kwargs):
@@ -32,6 +45,7 @@ class PermissionsField(graphene.Field):
resolver = self.resolver or parent_resolver
if self.permissions:
resolver = one_of_permissions_required(self.permissions)(resolver)
+ resolver = super(PermissionsField, self).get_resolver(resolver)
return resolver
diff --git a/saleor/graphql/core/mutations.py b/saleor/graphql/core/mutations.py
index 5d73aaefce..6d7058551a 100644
--- a/saleor/graphql/core/mutations.py
+++ b/saleor/graphql/core/mutations.py
@@ -42,6 +42,7 @@ from ...permission.utils import (
one_of_permissions_or_auth_filter_required,
)
from ..core import ResolveInfo
+from ..core.doc_category import DOC_CATEGORY_MAP
from ..core.utils import ext_ref_to_global_id_or_error
from ..core.validators import validate_one_of_args_is_in_mutation
from ..meta.permissions import PRIVATE_META_PERMISSION_MAP, PUBLIC_META_PERMISSION_MAP
@@ -127,6 +128,7 @@ def attach_error_params(error, params: Optional[dict], error_class_fields: set):
class ModelMutationOptions(MutationOptions):
+ doc_category = None
exclude = None
model = None
object_type = None
@@ -157,6 +159,7 @@ class BaseMutation(graphene.Mutation):
cls,
auto_permission_message=True,
description=None,
+ doc_category=None,
permissions: Optional[Collection[BasePermissionEnum]] = None,
_meta=None,
error_type_class=None,
@@ -178,10 +181,10 @@ class BaseMutation(graphene.Mutation):
cls._validate_permissions(permissions)
_meta.auto_permission_message = auto_permission_message
- _meta.permissions = permissions
_meta.error_type_class = error_type_class
_meta.error_type_field = error_type_field
_meta.errors_mapping = errors_mapping
+ _meta.permissions = permissions
_meta.support_meta_field = support_meta_field
_meta.support_private_meta_field = support_private_meta_field
@@ -189,6 +192,8 @@ class BaseMutation(graphene.Mutation):
permissions_msg = message_one_of_permissions_required(permissions)
description = f"{description} {permissions_msg}"
+ cls.doc_category = doc_category
+
super().__init_subclass_with_meta__(
description=description, _meta=_meta, **options
)
@@ -633,6 +638,10 @@ class ModelMutation(BaseMutation):
if not _meta:
_meta = ModelMutationOptions(cls)
+ doc_category_key = f"{model._meta.app_label}.{model.__name__}"
+ if "doc_category" not in options and doc_category_key in DOC_CATEGORY_MAP:
+ options["doc_category"] = DOC_CATEGORY_MAP[doc_category_key]
+
if exclude is None:
exclude = []
@@ -853,9 +862,14 @@ class BaseBulkMutation(BaseMutation):
raise ImproperlyConfigured("model is required for bulk mutation")
if not _meta:
_meta = ModelMutationOptions(cls)
+
_meta.model = model
_meta.object_type = object_type
+ doc_category_key = f"{model._meta.app_label}.{model.__name__}"
+ if "doc_category" not in kwargs and doc_category_key in DOC_CATEGORY_MAP:
+ kwargs["doc_category"] = DOC_CATEGORY_MAP[doc_category_key]
+
super().__init_subclass_with_meta__(_meta=_meta, **kwargs)
@classmethod
diff --git a/saleor/graphql/core/schema.py b/saleor/graphql/core/schema.py
index 5c8d343ae6..3e6f856b4a 100644
--- a/saleor/graphql/core/schema.py
+++ b/saleor/graphql/core/schema.py
@@ -1,5 +1,7 @@
import graphene
+from ..core.doc_category import DOC_CATEGORY_TAXES
+from ..core.fields import BaseField
from ..plugins.dataloaders import get_plugin_manager_promise
from . import ResolveInfo
from .mutations import FileUpload
@@ -7,8 +9,10 @@ from .types import NonNullList, TaxType
class CoreQueries(graphene.ObjectType):
- tax_types = NonNullList(
- TaxType, description="List of all tax rates available from tax gateway."
+ tax_types = BaseField(
+ NonNullList(TaxType),
+ description="List of all tax rates available from tax gateway.",
+ doc_category=DOC_CATEGORY_TAXES,
)
def resolve_tax_types(self, info: ResolveInfo):
diff --git a/saleor/graphql/core/types/__init__.py b/saleor/graphql/core/types/__init__.py
index a4609e8962..3cd18de532 100644
--- a/saleor/graphql/core/types/__init__.py
+++ b/saleor/graphql/core/types/__init__.py
@@ -1,3 +1,4 @@
+from .base import BaseConnection, BaseEnum, BaseInputObjectType, BaseObjectType
from .common import (
TYPES_WITH_DOUBLE_ID_AVAILABLE,
AccountError,
@@ -78,6 +79,10 @@ __all__ = [
"AccountError",
"AppError",
"AttributeError",
+ "BaseConnection",
+ "BaseEnum",
+ "BaseInputObjectType",
+ "BaseObjectType",
"BulkProductError",
"BulkStockError",
"ChannelError",
diff --git a/saleor/graphql/core/types/base.py b/saleor/graphql/core/types/base.py
new file mode 100644
index 0000000000..3659b16eb7
--- /dev/null
+++ b/saleor/graphql/core/types/base.py
@@ -0,0 +1,61 @@
+from graphene.relay.connection import Connection
+from graphene.types.enum import Enum
+from graphene.types.inputobjecttype import InputObjectType
+from graphene.types.objecttype import ObjectType
+
+
+class BaseObjectType(ObjectType):
+ @classmethod
+ def __init_subclass_with_meta__(
+ cls,
+ interfaces=(),
+ possible_types=(),
+ default_resolver=None,
+ _meta=None,
+ doc_category=None,
+ **options,
+ ):
+ cls.doc_category = doc_category
+ super(BaseObjectType, cls).__init_subclass_with_meta__(
+ interfaces=interfaces,
+ possible_types=possible_types,
+ default_resolver=default_resolver,
+ _meta=_meta,
+ **options,
+ )
+
+
+class BaseInputObjectType(InputObjectType):
+ @classmethod
+ def __init_subclass_with_meta__(
+ cls, container=None, _meta=None, doc_category=None, **options
+ ):
+ cls.doc_category = doc_category
+ super(BaseInputObjectType, cls).__init_subclass_with_meta__(
+ container=container, _meta=_meta, **options
+ )
+
+
+class BaseEnum(Enum):
+ @classmethod
+ def __init_subclass_with_meta__(
+ cls, enum=None, _meta=None, doc_category=None, **options
+ ):
+ cls.doc_category = doc_category
+ super(BaseEnum, cls).__init_subclass_with_meta__(
+ enum=enum, _meta=_meta, **options
+ )
+
+
+class BaseConnection(Connection):
+ class Meta:
+ abstract = True
+
+ @classmethod
+ def __init_subclass_with_meta__(
+ cls, node=None, name=None, doc_category=None, **options
+ ):
+ cls.doc_category = doc_category
+ super(BaseConnection, cls).__init_subclass_with_meta__(
+ node=node, name=name, **options
+ )
diff --git a/saleor/graphql/core/types/common.py b/saleor/graphql/core/types/common.py
index 146a81f291..989c4ee1e3 100644
--- a/saleor/graphql/core/types/common.py
+++ b/saleor/graphql/core/types/common.py
@@ -6,6 +6,7 @@ from django.core.files.storage import default_storage
from ....core.utils import build_absolute_uri
from ...account.enums import AddressTypeEnum
+from ...core.doc_category import DOC_CATEGORY_USERS
from ..descriptions import (
ADDED_IN_36,
ADDED_IN_312,
@@ -57,6 +58,7 @@ from ..enums import (
)
from ..scalars import Date, PositiveDecimal
from ..tracing import traced_resolver
+from .base import BaseObjectType
from .money import VAT
from .upload import Upload
@@ -96,7 +98,7 @@ class LanguageDisplay(graphene.ObjectType):
language = graphene.String(description="Full name of the language.", required=True)
-class Permission(graphene.ObjectType):
+class Permission(BaseObjectType):
code = PermissionEnum(description="Internal code for permission.", required=True)
name = graphene.String(
description="Describe action(s) allowed to do by permission.", required=True
@@ -106,7 +108,7 @@ class Permission(graphene.ObjectType):
description = "Represents a permission object in a friendly form."
-class Error(graphene.ObjectType):
+class Error(BaseObjectType):
field = graphene.String(
description=(
"Name of a field that caused the error. A value of `null` indicates that "
@@ -122,10 +124,14 @@ class Error(graphene.ObjectType):
class AccountError(Error):
code = AccountErrorCode(description="The error code.", required=True)
- address_type = AddressTypeEnum(
+ address_type = AddressTypeEnum( # type: ignore[has-type]
description="A type of address that causes the error.", required=False
)
+ class Meta:
+ description = "Represents errors in account mutations."
+ doc_category = DOC_CATEGORY_USERS
+
class AppError(Error):
code = AppErrorCode(description="The error code.", required=True)
@@ -184,7 +190,7 @@ class CheckoutError(Error):
description="List of line Ids which cause the error.",
required=False,
)
- address_type = AddressTypeEnum(
+ address_type = AddressTypeEnum( # type: ignore[has-type]
description="A type of address that causes the error.", required=False
)
@@ -247,7 +253,7 @@ class OrderError(Error):
description="List of product variants that are associated with the error",
required=False,
)
- address_type = AddressTypeEnum(
+ address_type = AddressTypeEnum( # type: ignore[has-type]
description="A type of address that causes the error.", required=False
)
diff --git a/saleor/graphql/core/types/filter_input.py b/saleor/graphql/core/types/filter_input.py
index 722c68af3f..3e01f9ac02 100644
--- a/saleor/graphql/core/types/filter_input.py
+++ b/saleor/graphql/core/types/filter_input.py
@@ -3,7 +3,7 @@ import itertools
import graphene
from django.db import models
from django_filters.filterset import FILTER_FOR_DBFIELD_DEFAULTS, BaseFilterSet
-from graphene import Argument, InputField, InputObjectType, String
+from graphene import Argument, InputField, String
from graphene.types.inputobjecttype import InputObjectTypeOptions
from graphene.types.utils import yank_fields_from_attrs
@@ -11,6 +11,7 @@ from ..descriptions import ADDED_IN_311, DEPRECATED_IN_3X_INPUT, PREVIEW_FEATURE
from ..filters import GlobalIDFilter, GlobalIDMultipleChoiceFilter
from ..scalars import Date
from . import NonNullList
+from .base import BaseInputObjectType
from .common import DateRangeInput, DateTimeRangeInput, IntRangeInput
from .converter import convert_form_field
@@ -38,7 +39,7 @@ def get_filterset_class(filterset_class=None):
)
-class FilterInputObjectType(InputObjectType):
+class FilterInputObjectType(BaseInputObjectType):
"""Class for storing and serving django-filters as graphQL input.
FilterSet class which inherits from django-filters.FilterSet should be
diff --git a/saleor/graphql/core/types/model.py b/saleor/graphql/core/types/model.py
index 58ff86dbff..aa42014edc 100644
--- a/saleor/graphql/core/types/model.py
+++ b/saleor/graphql/core/types/model.py
@@ -3,10 +3,12 @@ from typing import Generic, Optional, Type, TypeVar
from uuid import UUID
from django.db.models import Model, Q
-from graphene.types.objecttype import ObjectType, ObjectTypeOptions
+from graphene.types.objecttype import ObjectTypeOptions
from ..descriptions import ADDED_IN_33, PREVIEW_FEATURE
+from ..doc_category import DOC_CATEGORY_MAP
from . import TYPES_WITH_DOUBLE_ID_AVAILABLE
+from .base import BaseObjectType
class ModelObjectOptions(ObjectTypeOptions):
@@ -17,7 +19,7 @@ class ModelObjectOptions(ObjectTypeOptions):
MT = TypeVar("MT", bound=Model)
-class ModelObjectType(Generic[MT], ObjectType):
+class ModelObjectType(Generic[MT], BaseObjectType):
@classmethod
def __init_subclass_with_meta__(
cls,
@@ -25,6 +27,7 @@ class ModelObjectType(Generic[MT], ObjectType):
possible_types=(),
default_resolver=None,
_meta=None,
+ doc_category=None,
**options,
):
if not _meta:
@@ -42,9 +45,14 @@ class ModelObjectType(Generic[MT], ObjectType):
f"received '{type(options['model'])}' type."
)
- _meta.model = options.pop("model")
+ model = options.pop("model")
+ _meta.model = model
_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:
+ options["doc_category"] = DOC_CATEGORY_MAP[doc_category_key]
+
super(ModelObjectType, cls).__init_subclass_with_meta__(
interfaces=interfaces,
possible_types=possible_types,
diff --git a/saleor/graphql/core/types/sort_input.py b/saleor/graphql/core/types/sort_input.py
index 2696e24879..415b77bf3d 100644
--- a/saleor/graphql/core/types/sort_input.py
+++ b/saleor/graphql/core/types/sort_input.py
@@ -1,15 +1,16 @@
import graphene
-from graphene.types.objecttype import ObjectTypeOptions
+from graphene.types.inputobjecttype import InputObjectTypeOptions
from ..descriptions import DEPRECATED_IN_3X_INPUT
from ..enums import OrderDirection
+from .base import BaseInputObjectType
-class SortInputMeta(ObjectTypeOptions):
+class SortInputMeta(InputObjectTypeOptions):
sort_enum = None
-class SortInputObjectType(graphene.InputObjectType):
+class SortInputObjectType(BaseInputObjectType):
direction = graphene.Argument(
OrderDirection,
required=True,
diff --git a/saleor/graphql/discount/mutations/sale_add_catalogues.py b/saleor/graphql/discount/mutations/sale_add_catalogues.py
index e6a0914ebc..4f9a1ac682 100644
--- a/saleor/graphql/discount/mutations/sale_add_catalogues.py
+++ b/saleor/graphql/discount/mutations/sale_add_catalogues.py
@@ -6,6 +6,7 @@ from ....discount.utils import fetch_catalogue_info
from ....permission.enums import DiscountPermissions
from ...channel import ChannelContext
from ...core import ResolveInfo
+from ...core.doc_category import DOC_CATEGORY_PRODUCTS
from ...core.types import DiscountError
from ...plugins.dataloaders import get_plugin_manager_promise
from ..types import Sale
@@ -16,6 +17,7 @@ from .utils import convert_catalogue_info_to_global_ids
class SaleAddCatalogues(SaleBaseCatalogueMutation):
class Meta:
description = "Adds products, categories, collections to a voucher."
+ doc_category = DOC_CATEGORY_PRODUCTS
permissions = (DiscountPermissions.MANAGE_DISCOUNTS,)
error_type_class = DiscountError
error_type_field = "discount_errors"
diff --git a/saleor/graphql/discount/mutations/sale_channel_listing_update.py b/saleor/graphql/discount/mutations/sale_channel_listing_update.py
index 46e8c02325..533dbbac5c 100644
--- a/saleor/graphql/discount/mutations/sale_channel_listing_update.py
+++ b/saleor/graphql/discount/mutations/sale_channel_listing_update.py
@@ -13,8 +13,9 @@ from ....product.tasks import update_products_discounted_prices_of_discount_task
from ...channel import ChannelContext
from ...channel.mutations import BaseChannelListingMutation
from ...core import ResolveInfo
+from ...core.doc_category import DOC_CATEGORY_PRODUCTS
from ...core.scalars import PositiveDecimal
-from ...core.types import DiscountError, NonNullList
+from ...core.types import BaseInputObjectType, DiscountError, NonNullList
from ...core.validators import validate_price_precision
from ...discount.types import Sale
from ..dataloaders import SaleChannelListingBySaleIdLoader
@@ -23,14 +24,17 @@ if TYPE_CHECKING:
from ....discount.models import Sale as SaleModel
-class SaleChannelListingAddInput(graphene.InputObjectType):
+class SaleChannelListingAddInput(BaseInputObjectType):
channel_id = graphene.ID(required=True, description="ID of a channel.")
discount_value = PositiveDecimal(
required=True, description="The value of the discount."
)
+ class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
+
-class SaleChannelListingInput(graphene.InputObjectType):
+class SaleChannelListingInput(BaseInputObjectType):
add_channels = NonNullList(
SaleChannelListingAddInput,
description="List of channels to which the sale should be assigned.",
@@ -42,6 +46,9 @@ class SaleChannelListingInput(graphene.InputObjectType):
required=False,
)
+ class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
+
class SaleChannelListingUpdate(BaseChannelListingMutation):
sale = graphene.Field(Sale, description="An updated sale instance.")
@@ -55,6 +62,7 @@ class SaleChannelListingUpdate(BaseChannelListingMutation):
class Meta:
description = "Manage sale's availability in channels."
+ doc_category = DOC_CATEGORY_PRODUCTS
permissions = (DiscountPermissions.MANAGE_DISCOUNTS,)
error_type_class = DiscountError
error_type_field = "discount_errors"
diff --git a/saleor/graphql/discount/mutations/sale_create.py b/saleor/graphql/discount/mutations/sale_create.py
index 257d74214f..d38ce55511 100644
--- a/saleor/graphql/discount/mutations/sale_create.py
+++ b/saleor/graphql/discount/mutations/sale_create.py
@@ -13,9 +13,10 @@ from ....product.tasks import update_products_discounted_prices_of_discount_task
from ...channel import ChannelContext
from ...core import ResolveInfo
from ...core.descriptions import ADDED_IN_31
+from ...core.doc_category import DOC_CATEGORY_PRODUCTS
from ...core.mutations import ModelMutation
from ...core.scalars import PositiveDecimal
-from ...core.types import DiscountError, NonNullList
+from ...core.types import BaseInputObjectType, DiscountError, NonNullList
from ...core.validators import validate_end_is_after_start
from ...plugins.dataloaders import get_plugin_manager_promise
from ..enums import DiscountValueTypeEnum
@@ -34,7 +35,7 @@ class SaleUpdateDiscountedPriceMixin:
)
-class SaleInput(graphene.InputObjectType):
+class SaleInput(BaseInputObjectType):
name = graphene.String(description="Voucher name.")
type = DiscountValueTypeEnum(description="Fixed or percentage.")
value = PositiveDecimal(description="Value of the voucher.")
@@ -63,6 +64,9 @@ class SaleInput(graphene.InputObjectType):
description="End date of the voucher in ISO 8601 format."
)
+ class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
+
class SaleCreate(SaleUpdateDiscountedPriceMixin, ModelMutation):
class Arguments:
diff --git a/saleor/graphql/discount/mutations/sale_remove_catalogues.py b/saleor/graphql/discount/mutations/sale_remove_catalogues.py
index 3a8f806d4e..aa65d65ef3 100644
--- a/saleor/graphql/discount/mutations/sale_remove_catalogues.py
+++ b/saleor/graphql/discount/mutations/sale_remove_catalogues.py
@@ -6,6 +6,7 @@ from ....discount.utils import fetch_catalogue_info
from ....graphql.channel import ChannelContext
from ....permission.enums import DiscountPermissions
from ...core import ResolveInfo
+from ...core.doc_category import DOC_CATEGORY_PRODUCTS
from ...core.types import DiscountError
from ...plugins.dataloaders import get_plugin_manager_promise
from ..types import Sale
@@ -16,6 +17,7 @@ from .utils import convert_catalogue_info_to_global_ids
class SaleRemoveCatalogues(SaleBaseCatalogueMutation):
class Meta:
description = "Removes products, categories, collections from a sale."
+ doc_category = DOC_CATEGORY_PRODUCTS
permissions = (DiscountPermissions.MANAGE_DISCOUNTS,)
error_type_class = DiscountError
error_type_field = "discount_errors"
diff --git a/saleor/graphql/discount/mutations/voucher_add_catalogues.py b/saleor/graphql/discount/mutations/voucher_add_catalogues.py
index 7eec37403b..bbfc3af9be 100644
--- a/saleor/graphql/discount/mutations/voucher_add_catalogues.py
+++ b/saleor/graphql/discount/mutations/voucher_add_catalogues.py
@@ -4,13 +4,14 @@ from ....permission.enums import DiscountPermissions
from ...channel import ChannelContext
from ...core import ResolveInfo
from ...core.descriptions import ADDED_IN_31
-from ...core.types import DiscountError, NonNullList
+from ...core.doc_category import DOC_CATEGORY_PRODUCTS
+from ...core.types import BaseInputObjectType, DiscountError, NonNullList
from ...plugins.dataloaders import get_plugin_manager_promise
from ..types import Voucher
from .sale_base_discount_catalogue import BaseDiscountCatalogueMutation
-class CatalogueInput(graphene.InputObjectType):
+class CatalogueInput(BaseInputObjectType):
products = NonNullList(
graphene.ID, description="Products related to the discount.", name="products"
)
@@ -30,6 +31,9 @@ class CatalogueInput(graphene.InputObjectType):
name="variants",
)
+ class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
+
class VoucherBaseCatalogueMutation(BaseDiscountCatalogueMutation):
voucher = graphene.Field(
@@ -57,6 +61,7 @@ class VoucherBaseCatalogueMutation(BaseDiscountCatalogueMutation):
class VoucherAddCatalogues(VoucherBaseCatalogueMutation):
class Meta:
description = "Adds products, categories, collections to a voucher."
+ doc_category = DOC_CATEGORY_PRODUCTS
permissions = (DiscountPermissions.MANAGE_DISCOUNTS,)
error_type_class = DiscountError
error_type_field = "discount_errors"
diff --git a/saleor/graphql/discount/mutations/voucher_channel_listing_update.py b/saleor/graphql/discount/mutations/voucher_channel_listing_update.py
index 76f0839f64..8b01f80c5b 100644
--- a/saleor/graphql/discount/mutations/voucher_channel_listing_update.py
+++ b/saleor/graphql/discount/mutations/voucher_channel_listing_update.py
@@ -11,22 +11,26 @@ from ....permission.enums import DiscountPermissions
from ...channel import ChannelContext
from ...channel.mutations import BaseChannelListingMutation
from ...core import ResolveInfo
+from ...core.doc_category import DOC_CATEGORY_PRODUCTS
from ...core.scalars import PositiveDecimal
-from ...core.types import DiscountError, NonNullList
+from ...core.types import BaseInputObjectType, DiscountError, NonNullList
from ...core.validators import validate_price_precision
from ...plugins.dataloaders import get_plugin_manager_promise
from ..types import Voucher
-class VoucherChannelListingAddInput(graphene.InputObjectType):
+class VoucherChannelListingAddInput(BaseInputObjectType):
channel_id = graphene.ID(required=True, description="ID of a channel.")
discount_value = PositiveDecimal(description="Value of the voucher.")
min_amount_spent = PositiveDecimal(
description="Min purchase amount required to apply the voucher."
)
+ class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
+
-class VoucherChannelListingInput(graphene.InputObjectType):
+class VoucherChannelListingInput(BaseInputObjectType):
add_channels = NonNullList(
VoucherChannelListingAddInput,
description="List of channels to which the voucher should be assigned.",
@@ -38,6 +42,9 @@ class VoucherChannelListingInput(graphene.InputObjectType):
required=False,
)
+ class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
+
class VoucherChannelListingUpdate(BaseChannelListingMutation):
voucher = graphene.Field(Voucher, description="An updated voucher instance.")
@@ -51,6 +58,7 @@ class VoucherChannelListingUpdate(BaseChannelListingMutation):
class Meta:
description = "Manage voucher's availability in channels."
+ doc_category = DOC_CATEGORY_PRODUCTS
permissions = (DiscountPermissions.MANAGE_DISCOUNTS,)
error_type_class = DiscountError
error_type_field = "discount_errors"
diff --git a/saleor/graphql/discount/mutations/voucher_remove_catalogues.py b/saleor/graphql/discount/mutations/voucher_remove_catalogues.py
index e635e7932a..c86bac9796 100644
--- a/saleor/graphql/discount/mutations/voucher_remove_catalogues.py
+++ b/saleor/graphql/discount/mutations/voucher_remove_catalogues.py
@@ -1,5 +1,6 @@
from ....permission.enums import DiscountPermissions
from ...core import ResolveInfo
+from ...core.doc_category import DOC_CATEGORY_PRODUCTS
from ...core.types import DiscountError
from ...plugins.dataloaders import get_plugin_manager_promise
from ..types import Voucher
@@ -9,6 +10,7 @@ from .voucher_add_catalogues import VoucherBaseCatalogueMutation
class VoucherRemoveCatalogues(VoucherBaseCatalogueMutation):
class Meta:
description = "Removes products, categories, collections from a voucher."
+ doc_category = DOC_CATEGORY_PRODUCTS
permissions = (DiscountPermissions.MANAGE_DISCOUNTS,)
error_type_class = DiscountError
error_type_field = "discount_errors"
diff --git a/saleor/graphql/discount/schema.py b/saleor/graphql/discount/schema.py
index e19e954896..f339204ab8 100644
--- a/saleor/graphql/discount/schema.py
+++ b/saleor/graphql/discount/schema.py
@@ -4,6 +4,7 @@ from ...permission.enums import DiscountPermissions
from ..core import ResolveInfo
from ..core.connection import create_connection_slice, filter_connection_queryset
from ..core.descriptions import DEPRECATED_IN_3X_INPUT
+from ..core.doc_category import DOC_CATEGORY_DISCOUNTS
from ..core.fields import FilterConnectionField, PermissionsField
from ..core.types import FilterInputObjectType
from ..core.utils import from_global_id_or_error
@@ -48,6 +49,7 @@ class DiscountQueries(graphene.ObjectType):
permissions=[
DiscountPermissions.MANAGE_DISCOUNTS,
],
+ doc_category=DOC_CATEGORY_DISCOUNTS,
)
sales = FilterConnectionField(
SaleCountableConnection,
@@ -66,6 +68,7 @@ class DiscountQueries(graphene.ObjectType):
permissions=[
DiscountPermissions.MANAGE_DISCOUNTS,
],
+ doc_category=DOC_CATEGORY_DISCOUNTS,
)
voucher = PermissionsField(
Voucher,
@@ -79,6 +82,7 @@ class DiscountQueries(graphene.ObjectType):
permissions=[
DiscountPermissions.MANAGE_DISCOUNTS,
],
+ doc_category=DOC_CATEGORY_DISCOUNTS,
)
vouchers = FilterConnectionField(
VoucherCountableConnection,
@@ -97,6 +101,7 @@ class DiscountQueries(graphene.ObjectType):
permissions=[
DiscountPermissions.MANAGE_DISCOUNTS,
],
+ doc_category=DOC_CATEGORY_DISCOUNTS,
)
@staticmethod
diff --git a/saleor/graphql/giftcard/bulk_mutations.py b/saleor/graphql/giftcard/bulk_mutations.py
index 56fd4ed76c..cafb660d17 100644
--- a/saleor/graphql/giftcard/bulk_mutations.py
+++ b/saleor/graphql/giftcard/bulk_mutations.py
@@ -14,16 +14,17 @@ from ...permission.enums import GiftcardPermissions
from ..app.dataloaders import get_app_promise
from ..core import ResolveInfo
from ..core.descriptions import ADDED_IN_31, PREVIEW_FEATURE
+from ..core.doc_category import DOC_CATEGORY_GIFT_CARDS
from ..core.mutations import BaseBulkMutation, BaseMutation, ModelBulkDeleteMutation
from ..core.scalars import Date
-from ..core.types import GiftCardError, NonNullList, PriceInput
+from ..core.types import BaseInputObjectType, GiftCardError, NonNullList, PriceInput
from ..core.validators import validate_price_precision
from ..plugins.dataloaders import get_plugin_manager_promise
from .mutations import GiftCardCreate
from .types import GiftCard
-class GiftCardBulkCreateInput(graphene.InputObjectType):
+class GiftCardBulkCreateInput(BaseInputObjectType):
count = graphene.Int(required=True, description="The number of cards to issue.")
balance = graphene.Field(
PriceInput, description="Balance of the gift card.", required=True
@@ -37,6 +38,9 @@ class GiftCardBulkCreateInput(graphene.InputObjectType):
required=True, description="Determine if gift card is active."
)
+ class Meta:
+ doc_category = DOC_CATEGORY_GIFT_CARDS
+
class GiftCardBulkCreate(BaseMutation):
count = graphene.Int(
@@ -58,6 +62,7 @@ class GiftCardBulkCreate(BaseMutation):
class Meta:
description = "Create gift cards." + ADDED_IN_31 + PREVIEW_FEATURE
+ doc_category = DOC_CATEGORY_GIFT_CARDS
model = models.GiftCard
permissions = (GiftcardPermissions.MANAGE_GIFT_CARD,)
error_type_class = GiftCardError
diff --git a/saleor/graphql/giftcard/mutations.py b/saleor/graphql/giftcard/mutations.py
index f6fcc35969..911035d351 100644
--- a/saleor/graphql/giftcard/mutations.py
+++ b/saleor/graphql/giftcard/mutations.py
@@ -21,9 +21,10 @@ from ...permission.enums import GiftcardPermissions
from ..app.dataloaders import get_app_promise
from ..core import ResolveInfo
from ..core.descriptions import ADDED_IN_31, DEPRECATED_IN_3X_INPUT, PREVIEW_FEATURE
+from ..core.doc_category import DOC_CATEGORY_GIFT_CARDS
from ..core.mutations import BaseMutation, ModelDeleteMutation, ModelMutation
from ..core.scalars import Date, PositiveDecimal
-from ..core.types import GiftCardError, NonNullList, PriceInput
+from ..core.types import BaseInputObjectType, GiftCardError, NonNullList, PriceInput
from ..core.validators import validate_price_precision, validate_required_string_field
from ..plugins.dataloaders import get_plugin_manager_promise
from ..utils.validators import check_for_duplicates
@@ -43,7 +44,7 @@ def clean_gift_card(gift_card: models.GiftCard) -> models.GiftCard:
return gift_card
-class GiftCardInput(graphene.InputObjectType):
+class GiftCardInput(BaseInputObjectType):
add_tags = NonNullList(
graphene.String,
description="The gift card tags to add." + ADDED_IN_31 + PREVIEW_FEATURE,
@@ -65,6 +66,9 @@ class GiftCardInput(graphene.InputObjectType):
)
)
+ class Meta:
+ doc_category = DOC_CATEGORY_GIFT_CARDS
+
class GiftCardCreateInput(GiftCardInput):
balance = graphene.Field(
@@ -100,6 +104,9 @@ class GiftCardCreateInput(GiftCardInput):
)
)
+ class Meta:
+ doc_category = DOC_CATEGORY_GIFT_CARDS
+
class GiftCardUpdateInput(GiftCardInput):
remove_tags = NonNullList(
@@ -111,6 +118,9 @@ class GiftCardUpdateInput(GiftCardInput):
required=False,
)
+ class Meta:
+ doc_category = DOC_CATEGORY_GIFT_CARDS
+
class GiftCardCreate(ModelMutation):
class Arguments:
@@ -404,6 +414,7 @@ class GiftCardDeactivate(BaseMutation):
class Meta:
description = "Deactivate a gift card."
+ doc_category = DOC_CATEGORY_GIFT_CARDS
permissions = (GiftcardPermissions.MANAGE_GIFT_CARD,)
error_type_class = GiftCardError
error_type_field = "gift_card_errors"
@@ -438,6 +449,7 @@ class GiftCardActivate(BaseMutation):
class Meta:
description = "Activate a gift card."
+ doc_category = DOC_CATEGORY_GIFT_CARDS
permissions = (GiftcardPermissions.MANAGE_GIFT_CARD,)
error_type_class = GiftCardError
error_type_field = "gift_card_errors"
@@ -465,7 +477,7 @@ class GiftCardActivate(BaseMutation):
return GiftCardActivate(gift_card=gift_card)
-class GiftCardResendInput(graphene.InputObjectType):
+class GiftCardResendInput(BaseInputObjectType):
id = graphene.ID(required=True, description="ID of a gift card to resend.")
email = graphene.String(
required=False, description="Email to which gift card should be send."
@@ -475,6 +487,9 @@ class GiftCardResendInput(graphene.InputObjectType):
required=True,
)
+ class Meta:
+ doc_category = DOC_CATEGORY_GIFT_CARDS
+
class GiftCardResend(BaseMutation):
gift_card = graphene.Field(GiftCard, description="Gift card which has been sent.")
@@ -486,6 +501,7 @@ class GiftCardResend(BaseMutation):
class Meta:
description = "Resend a gift card." + ADDED_IN_31 + PREVIEW_FEATURE
+ doc_category = DOC_CATEGORY_GIFT_CARDS
permissions = (GiftcardPermissions.MANAGE_GIFT_CARD,)
error_type_class = GiftCardError
@@ -545,9 +561,12 @@ class GiftCardResend(BaseMutation):
return GiftCardResend(gift_card=gift_card)
-class GiftCardAddNoteInput(graphene.InputObjectType):
+class GiftCardAddNoteInput(BaseInputObjectType):
message = graphene.String(description="Note message.", required=True)
+ class Meta:
+ doc_category = DOC_CATEGORY_GIFT_CARDS
+
class GiftCardAddNote(BaseMutation):
gift_card = graphene.Field(GiftCard, description="Gift card with the note added.")
@@ -564,6 +583,7 @@ class GiftCardAddNote(BaseMutation):
class Meta:
description = "Adds note to the gift card." + ADDED_IN_31 + PREVIEW_FEATURE
+ doc_category = DOC_CATEGORY_GIFT_CARDS
permissions = (GiftcardPermissions.MANAGE_GIFT_CARD,)
error_type_class = GiftCardError
diff --git a/saleor/graphql/giftcard/schema.py b/saleor/graphql/giftcard/schema.py
index 59c8471b1c..c4ad8f4afa 100644
--- a/saleor/graphql/giftcard/schema.py
+++ b/saleor/graphql/giftcard/schema.py
@@ -6,6 +6,7 @@ from ...permission.enums import GiftcardPermissions
from ..core import ResolveInfo
from ..core.connection import create_connection_slice, filter_connection_queryset
from ..core.descriptions import ADDED_IN_31, PREVIEW_FEATURE
+from ..core.doc_category import DOC_CATEGORY_GIFT_CARDS
from ..core.fields import FilterConnectionField, PermissionsField
from ..core.types import NonNullList
from ..core.utils import from_global_id_or_error
@@ -40,6 +41,7 @@ class GiftCardQueries(graphene.ObjectType):
permissions=[
GiftcardPermissions.MANAGE_GIFT_CARD,
],
+ doc_category=DOC_CATEGORY_GIFT_CARDS,
)
gift_cards = FilterConnectionField(
GiftCardCountableConnection,
@@ -55,6 +57,7 @@ class GiftCardQueries(graphene.ObjectType):
permissions=[
GiftcardPermissions.MANAGE_GIFT_CARD,
],
+ doc_category=DOC_CATEGORY_GIFT_CARDS,
)
gift_card_currencies = PermissionsField(
NonNullList(graphene.String),
@@ -63,6 +66,7 @@ class GiftCardQueries(graphene.ObjectType):
permissions=[
GiftcardPermissions.MANAGE_GIFT_CARD,
],
+ doc_category=DOC_CATEGORY_GIFT_CARDS,
)
gift_card_tags = FilterConnectionField(
GiftCardTagCountableConnection,
@@ -73,6 +77,7 @@ class GiftCardQueries(graphene.ObjectType):
permissions=[
GiftcardPermissions.MANAGE_GIFT_CARD,
],
+ doc_category=DOC_CATEGORY_GIFT_CARDS,
)
@staticmethod
diff --git a/saleor/graphql/order/mutations/draft_order_complete.py b/saleor/graphql/order/mutations/draft_order_complete.py
index 10a5171b01..441e68a536 100644
--- a/saleor/graphql/order/mutations/draft_order_complete.py
+++ b/saleor/graphql/order/mutations/draft_order_complete.py
@@ -21,6 +21,7 @@ from ....warehouse.management import allocate_preorders, allocate_stocks
from ....warehouse.reservations import is_reservation_enabled
from ...app.dataloaders import get_app_promise
from ...core import ResolveInfo
+from ...core.doc_category import DOC_CATEGORY_ORDERS
from ...core.mutations import BaseMutation
from ...core.types import OrderError
from ...plugins.dataloaders import get_plugin_manager_promise
@@ -42,6 +43,7 @@ class DraftOrderComplete(BaseMutation):
class Meta:
description = "Completes creating an order."
+ doc_category = DOC_CATEGORY_ORDERS
permissions = (OrderPermissions.MANAGE_ORDERS,)
error_type_class = OrderError
error_type_field = "order_errors"
diff --git a/saleor/graphql/order/mutations/draft_order_create.py b/saleor/graphql/order/mutations/draft_order_create.py
index 2ada04ad86..22adfd08c7 100644
--- a/saleor/graphql/order/mutations/draft_order_create.py
+++ b/saleor/graphql/order/mutations/draft_order_create.py
@@ -3,7 +3,6 @@ from typing import Dict, List
import graphene
from django.core.exceptions import ValidationError
-from graphene.types import InputObjectType
from ....account.models import User
from ....checkout import AddressType
@@ -28,9 +27,10 @@ from ...app.dataloaders import get_app_promise
from ...channel.types import Channel
from ...core import ResolveInfo
from ...core.descriptions import ADDED_IN_36, ADDED_IN_310, PREVIEW_FEATURE
+from ...core.doc_category import DOC_CATEGORY_ORDERS
from ...core.mutations import ModelMutation
from ...core.scalars import PositiveDecimal
-from ...core.types import NonNullList, OrderError
+from ...core.types import BaseInputObjectType, NonNullList, OrderError
from ...plugins.dataloaders import get_plugin_manager_promise
from ...product.types import ProductVariant
from ...shipping.utils import get_shipping_model_by_object_id
@@ -43,11 +43,14 @@ from ..utils import (
)
-class OrderLineInput(graphene.InputObjectType):
+class OrderLineInput(BaseInputObjectType):
quantity = graphene.Int(
description="Number of variant items ordered.", required=True
)
+ class Meta:
+ doc_category = DOC_CATEGORY_ORDERS
+
class OrderLineCreateInput(OrderLineInput):
variant_id = graphene.ID(
@@ -62,8 +65,11 @@ class OrderLineCreateInput(OrderLineInput):
),
)
+ class Meta:
+ doc_category = DOC_CATEGORY_ORDERS
+
-class DraftOrderInput(InputObjectType):
+class DraftOrderInput(BaseInputObjectType):
billing_address = AddressInput(description="Billing address of the customer.")
user = graphene.ID(
description="Customer associated with the draft order.", name="user"
@@ -92,6 +98,9 @@ class DraftOrderInput(InputObjectType):
description="External ID of this order." + ADDED_IN_310, required=False
)
+ class Meta:
+ doc_category = DOC_CATEGORY_ORDERS
+
class DraftOrderCreateInput(DraftOrderInput):
lines = NonNullList(
@@ -101,6 +110,9 @@ class DraftOrderCreateInput(DraftOrderInput):
),
)
+ class Meta:
+ doc_category = DOC_CATEGORY_ORDERS
+
class DraftOrderCreate(ModelMutation, I18nMixin):
class Arguments:
diff --git a/saleor/graphql/order/mutations/fulfillment_approve.py b/saleor/graphql/order/mutations/fulfillment_approve.py
index 81748bd0bb..b6c288f4c0 100644
--- a/saleor/graphql/order/mutations/fulfillment_approve.py
+++ b/saleor/graphql/order/mutations/fulfillment_approve.py
@@ -12,6 +12,7 @@ from ....permission.enums import OrderPermissions
from ...app.dataloaders import get_app_promise
from ...core import ResolveInfo
from ...core.descriptions import ADDED_IN_31
+from ...core.doc_category import DOC_CATEGORY_ORDERS
from ...core.mutations import BaseMutation
from ...core.types import OrderError
from ...plugins.dataloaders import get_plugin_manager_promise
@@ -36,6 +37,7 @@ class FulfillmentApprove(BaseMutation):
class Meta:
description = "Approve existing fulfillment." + ADDED_IN_31
+ doc_category = DOC_CATEGORY_ORDERS
permissions = (OrderPermissions.MANAGE_ORDERS,)
error_type_class = OrderError
error_type_field = "order_errors"
diff --git a/saleor/graphql/order/mutations/fulfillment_cancel.py b/saleor/graphql/order/mutations/fulfillment_cancel.py
index 554efbca14..84a8e24273 100644
--- a/saleor/graphql/order/mutations/fulfillment_cancel.py
+++ b/saleor/graphql/order/mutations/fulfillment_cancel.py
@@ -11,20 +11,24 @@ from ....order.error_codes import OrderErrorCode
from ....permission.enums import OrderPermissions
from ...app.dataloaders import get_app_promise
from ...core import ResolveInfo
+from ...core.doc_category import DOC_CATEGORY_ORDERS
from ...core.mutations import BaseMutation
-from ...core.types import OrderError
+from ...core.types import BaseInputObjectType, OrderError
from ...plugins.dataloaders import get_plugin_manager_promise
from ...warehouse.types import Warehouse
from ..types import Fulfillment, Order
-class FulfillmentCancelInput(graphene.InputObjectType):
+class FulfillmentCancelInput(BaseInputObjectType):
warehouse_id = graphene.ID(
description="ID of a warehouse where items will be restocked. Optional "
"when fulfillment is in WAITING_FOR_APPROVAL state.",
required=False,
)
+ class Meta:
+ doc_category = DOC_CATEGORY_ORDERS
+
class FulfillmentCancel(BaseMutation):
fulfillment = graphene.Field(Fulfillment, description="A canceled fulfillment.")
@@ -38,6 +42,7 @@ class FulfillmentCancel(BaseMutation):
class Meta:
description = "Cancels existing fulfillment and optionally restocks items."
+ doc_category = DOC_CATEGORY_ORDERS
permissions = (OrderPermissions.MANAGE_ORDERS,)
error_type_class = OrderError
error_type_field = "order_errors"
diff --git a/saleor/graphql/order/mutations/fulfillment_refund_products.py b/saleor/graphql/order/mutations/fulfillment_refund_products.py
index dd7ce36a7c..163e9050e6 100644
--- a/saleor/graphql/order/mutations/fulfillment_refund_products.py
+++ b/saleor/graphql/order/mutations/fulfillment_refund_products.py
@@ -9,8 +9,9 @@ from ....payment import PaymentError
from ....permission.enums import OrderPermissions
from ...app.dataloaders import get_app_promise
from ...core import ResolveInfo
+from ...core.doc_category import DOC_CATEGORY_ORDERS
from ...core.scalars import PositiveDecimal
-from ...core.types import NonNullList, OrderError
+from ...core.types import BaseInputObjectType, NonNullList, OrderError
from ...plugins.dataloaders import get_plugin_manager_promise
from ..types import Fulfillment, Order
from .fulfillment_refund_and_return_product_base import (
@@ -18,7 +19,7 @@ from .fulfillment_refund_and_return_product_base import (
)
-class OrderRefundLineInput(graphene.InputObjectType):
+class OrderRefundLineInput(BaseInputObjectType):
order_line_id = graphene.ID(
description="The ID of the order line to refund.",
name="orderLineId",
@@ -29,8 +30,11 @@ class OrderRefundLineInput(graphene.InputObjectType):
required=True,
)
+ class Meta:
+ doc_category = DOC_CATEGORY_ORDERS
+
-class OrderRefundFulfillmentLineInput(graphene.InputObjectType):
+class OrderRefundFulfillmentLineInput(BaseInputObjectType):
fulfillment_line_id = graphene.ID(
description="The ID of the fulfillment line to refund.",
name="fulfillmentLineId",
@@ -41,8 +45,11 @@ class OrderRefundFulfillmentLineInput(graphene.InputObjectType):
required=True,
)
+ class Meta:
+ doc_category = DOC_CATEGORY_ORDERS
+
-class OrderRefundProductsInput(graphene.InputObjectType):
+class OrderRefundProductsInput(BaseInputObjectType):
order_lines = NonNullList(
OrderRefundLineInput,
description="List of unfulfilled lines to refund.",
@@ -63,6 +70,9 @@ class OrderRefundProductsInput(graphene.InputObjectType):
default_value=False,
)
+ class Meta:
+ doc_category = DOC_CATEGORY_ORDERS
+
class FulfillmentRefundProducts(FulfillmentRefundAndReturnProductBase):
fulfillment = graphene.Field(Fulfillment, description="A refunded fulfillment.")
@@ -79,6 +89,7 @@ class FulfillmentRefundProducts(FulfillmentRefundAndReturnProductBase):
class Meta:
description = "Refund products."
+ doc_category = DOC_CATEGORY_ORDERS
permissions = (OrderPermissions.MANAGE_ORDERS,)
error_type_class = OrderError
error_type_field = "order_errors"
diff --git a/saleor/graphql/order/mutations/fulfillment_return_products.py b/saleor/graphql/order/mutations/fulfillment_return_products.py
index c55428d453..a4804fac5e 100644
--- a/saleor/graphql/order/mutations/fulfillment_return_products.py
+++ b/saleor/graphql/order/mutations/fulfillment_return_products.py
@@ -9,8 +9,9 @@ from ....payment import PaymentError
from ....permission.enums import OrderPermissions
from ...app.dataloaders import get_app_promise
from ...core import ResolveInfo
+from ...core.doc_category import DOC_CATEGORY_ORDERS
from ...core.scalars import PositiveDecimal
-from ...core.types import NonNullList, OrderError
+from ...core.types import BaseInputObjectType, NonNullList, OrderError
from ...plugins.dataloaders import get_plugin_manager_promise
from ..types import Fulfillment, Order
from .fulfillment_refund_and_return_product_base import (
@@ -18,7 +19,7 @@ from .fulfillment_refund_and_return_product_base import (
)
-class OrderReturnLineInput(graphene.InputObjectType):
+class OrderReturnLineInput(BaseInputObjectType):
order_line_id = graphene.ID(
description="The ID of the order line to return.",
name="orderLineId",
@@ -33,8 +34,11 @@ class OrderReturnLineInput(graphene.InputObjectType):
default_value=False,
)
+ class Meta:
+ doc_category = DOC_CATEGORY_ORDERS
+
-class OrderReturnFulfillmentLineInput(graphene.InputObjectType):
+class OrderReturnFulfillmentLineInput(BaseInputObjectType):
fulfillment_line_id = graphene.ID(
description="The ID of the fulfillment line to return.",
name="fulfillmentLineId",
@@ -49,8 +53,11 @@ class OrderReturnFulfillmentLineInput(graphene.InputObjectType):
default_value=False,
)
+ class Meta:
+ doc_category = DOC_CATEGORY_ORDERS
+
-class OrderReturnProductsInput(graphene.InputObjectType):
+class OrderReturnProductsInput(BaseInputObjectType):
order_lines = NonNullList(
OrderReturnLineInput,
description="List of unfulfilled lines to return.",
@@ -75,6 +82,9 @@ class OrderReturnProductsInput(graphene.InputObjectType):
default_value=False,
)
+ class Meta:
+ doc_category = DOC_CATEGORY_ORDERS
+
class FulfillmentReturnProducts(FulfillmentRefundAndReturnProductBase):
return_fulfillment = graphene.Field(
@@ -91,6 +101,7 @@ class FulfillmentReturnProducts(FulfillmentRefundAndReturnProductBase):
class Meta:
description = "Return products."
+ doc_category = DOC_CATEGORY_ORDERS
permissions = (OrderPermissions.MANAGE_ORDERS,)
error_type_class = OrderError
error_type_field = "order_errors"
diff --git a/saleor/graphql/order/mutations/fulfillment_update_tracking.py b/saleor/graphql/order/mutations/fulfillment_update_tracking.py
index 11e737eb97..54082e11bc 100644
--- a/saleor/graphql/order/mutations/fulfillment_update_tracking.py
+++ b/saleor/graphql/order/mutations/fulfillment_update_tracking.py
@@ -8,6 +8,7 @@ from ....order.notifications import send_fulfillment_update
from ....permission.enums import OrderPermissions
from ...app.dataloaders import get_app_promise
from ...core import ResolveInfo
+from ...core.doc_category import DOC_CATEGORY_ORDERS
from ...core.mutations import BaseMutation
from ...core.types import OrderError
from ...plugins.dataloaders import get_plugin_manager_promise
@@ -31,6 +32,7 @@ class FulfillmentUpdateTracking(BaseMutation):
class Meta:
description = "Updates a fulfillment for an order."
+ doc_category = DOC_CATEGORY_ORDERS
permissions = (OrderPermissions.MANAGE_ORDERS,)
error_type_class = OrderError
error_type_field = "order_errors"
diff --git a/saleor/graphql/order/mutations/order_add_note.py b/saleor/graphql/order/mutations/order_add_note.py
index c392239461..55f2e8275a 100644
--- a/saleor/graphql/order/mutations/order_add_note.py
+++ b/saleor/graphql/order/mutations/order_add_note.py
@@ -7,19 +7,23 @@ from ....order.error_codes import OrderErrorCode
from ....permission.enums import OrderPermissions
from ...app.dataloaders import get_app_promise
from ...core import ResolveInfo
+from ...core.doc_category import DOC_CATEGORY_ORDERS
from ...core.mutations import BaseMutation
-from ...core.types import OrderError
+from ...core.types import BaseInputObjectType, OrderError
from ...core.validators import validate_required_string_field
from ...plugins.dataloaders import get_plugin_manager_promise
from ..types import Order, OrderEvent
from .utils import get_webhook_handler_by_order_status
-class OrderAddNoteInput(graphene.InputObjectType):
+class OrderAddNoteInput(BaseInputObjectType):
message = graphene.String(
description="Note message.", name="message", required=True
)
+ class Meta:
+ doc_category = DOC_CATEGORY_ORDERS
+
class OrderAddNote(BaseMutation):
order = graphene.Field(Order, description="Order with the note added.")
@@ -37,6 +41,7 @@ class OrderAddNote(BaseMutation):
class Meta:
description = "Adds note to the order."
+ doc_category = DOC_CATEGORY_ORDERS
permissions = (OrderPermissions.MANAGE_ORDERS,)
error_type_class = OrderError
error_type_field = "order_errors"
diff --git a/saleor/graphql/order/mutations/order_cancel.py b/saleor/graphql/order/mutations/order_cancel.py
index b853f60dc8..53989ca606 100644
--- a/saleor/graphql/order/mutations/order_cancel.py
+++ b/saleor/graphql/order/mutations/order_cancel.py
@@ -11,6 +11,7 @@ from ....order.error_codes import OrderErrorCode
from ....permission.enums import OrderPermissions
from ...app.dataloaders import get_app_promise
from ...core import ResolveInfo
+from ...core.doc_category import DOC_CATEGORY_ORDERS
from ...core.mutations import BaseMutation
from ...core.types import OrderError
from ...plugins.dataloaders import get_plugin_manager_promise
@@ -38,6 +39,7 @@ class OrderCancel(BaseMutation):
class Meta:
description = "Cancel an order."
+ doc_category = DOC_CATEGORY_ORDERS
permissions = (OrderPermissions.MANAGE_ORDERS,)
error_type_class = OrderError
error_type_field = "order_errors"
diff --git a/saleor/graphql/order/mutations/order_capture.py b/saleor/graphql/order/mutations/order_capture.py
index 263b044fed..64c497b46a 100644
--- a/saleor/graphql/order/mutations/order_capture.py
+++ b/saleor/graphql/order/mutations/order_capture.py
@@ -12,6 +12,7 @@ from ....payment.gateway import request_charge_action
from ....permission.enums import OrderPermissions
from ...app.dataloaders import get_app_promise
from ...core import ResolveInfo
+from ...core.doc_category import DOC_CATEGORY_ORDERS
from ...core.mutations import BaseMutation
from ...core.scalars import PositiveDecimal
from ...core.types import OrderError
@@ -48,6 +49,7 @@ class OrderCapture(BaseMutation):
class Meta:
description = "Capture an order."
+ doc_category = DOC_CATEGORY_ORDERS
permissions = (OrderPermissions.MANAGE_ORDERS,)
error_type_class = OrderError
error_type_field = "order_errors"
diff --git a/saleor/graphql/order/mutations/order_discount_add.py b/saleor/graphql/order/mutations/order_discount_add.py
index 76b6e66dee..3d7ff13f0c 100644
--- a/saleor/graphql/order/mutations/order_discount_add.py
+++ b/saleor/graphql/order/mutations/order_discount_add.py
@@ -9,6 +9,7 @@ from ....order.utils import create_order_discount_for_order, get_order_discounts
from ....permission.enums import OrderPermissions
from ...app.dataloaders import get_app_promise
from ...core import ResolveInfo
+from ...core.doc_category import DOC_CATEGORY_ORDERS
from ...core.types import OrderError
from ...plugins.dataloaders import get_plugin_manager_promise
from ..types import Order
@@ -27,6 +28,7 @@ class OrderDiscountAdd(OrderDiscountCommon):
class Meta:
description = "Adds discount to the order."
+ doc_category = DOC_CATEGORY_ORDERS
permissions = (OrderPermissions.MANAGE_ORDERS,)
error_type_class = OrderError
error_type_field = "order_errors"
diff --git a/saleor/graphql/order/mutations/order_discount_common.py b/saleor/graphql/order/mutations/order_discount_common.py
index 570c049131..bb525b8574 100644
--- a/saleor/graphql/order/mutations/order_discount_common.py
+++ b/saleor/graphql/order/mutations/order_discount_common.py
@@ -5,12 +5,14 @@ from prices import Money
from ....order import models
from ....order.error_codes import OrderErrorCode
from ...core import ResolveInfo
+from ...core.doc_category import DOC_CATEGORY_ORDERS
from ...core.mutations import BaseMutation
from ...core.scalars import PositiveDecimal
+from ...core.types import BaseInputObjectType
from ...discount.enums import DiscountValueTypeEnum
-class OrderDiscountCommonInput(graphene.InputObjectType):
+class OrderDiscountCommonInput(BaseInputObjectType):
value_type = graphene.Field(
DiscountValueTypeEnum,
required=True,
@@ -24,6 +26,9 @@ class OrderDiscountCommonInput(graphene.InputObjectType):
required=False, description="Explanation for the applied discount."
)
+ class Meta:
+ doc_category = DOC_CATEGORY_ORDERS
+
class OrderDiscountCommon(BaseMutation):
class Meta:
diff --git a/saleor/graphql/order/mutations/order_discount_delete.py b/saleor/graphql/order/mutations/order_discount_delete.py
index 4d0b0d71c2..9851dea273 100644
--- a/saleor/graphql/order/mutations/order_discount_delete.py
+++ b/saleor/graphql/order/mutations/order_discount_delete.py
@@ -9,6 +9,7 @@ from ....order.utils import invalidate_order_prices, remove_order_discount_from_
from ....permission.enums import OrderPermissions
from ...app.dataloaders import get_app_promise
from ...core import ResolveInfo
+from ...core.doc_category import DOC_CATEGORY_ORDERS
from ...core.types import OrderError
from ...discount.types import OrderDiscount
from ..types import Order
@@ -25,6 +26,7 @@ class OrderDiscountDelete(OrderDiscountCommon):
class Meta:
description = "Remove discount from the order."
+ doc_category = DOC_CATEGORY_ORDERS
permissions = (OrderPermissions.MANAGE_ORDERS,)
error_type_class = OrderError
error_type_field = "order_errors"
diff --git a/saleor/graphql/order/mutations/order_discount_update.py b/saleor/graphql/order/mutations/order_discount_update.py
index fabebb7642..f85a2a5a90 100644
--- a/saleor/graphql/order/mutations/order_discount_update.py
+++ b/saleor/graphql/order/mutations/order_discount_update.py
@@ -10,6 +10,7 @@ from ....order.error_codes import OrderErrorCode
from ....permission.enums import OrderPermissions
from ...app.dataloaders import get_app_promise
from ...core import ResolveInfo
+from ...core.doc_category import DOC_CATEGORY_ORDERS
from ...core.types import OrderError
from ...discount.types import OrderDiscount
from ...plugins.dataloaders import get_plugin_manager_promise
@@ -31,6 +32,7 @@ class OrderDiscountUpdate(OrderDiscountCommon):
class Meta:
description = "Update discount for the order."
+ doc_category = DOC_CATEGORY_ORDERS
permissions = (OrderPermissions.MANAGE_ORDERS,)
error_type_class = OrderError
error_type_field = "order_errors"
diff --git a/saleor/graphql/order/mutations/order_fulfill.py b/saleor/graphql/order/mutations/order_fulfill.py
index e346bffded..2a02ca1107 100644
--- a/saleor/graphql/order/mutations/order_fulfill.py
+++ b/saleor/graphql/order/mutations/order_fulfill.py
@@ -14,8 +14,9 @@ from ....permission.enums import OrderPermissions
from ...app.dataloaders import get_app_promise
from ...core import ResolveInfo
from ...core.descriptions import ADDED_IN_36
+from ...core.doc_category import DOC_CATEGORY_ORDERS
from ...core.mutations import BaseMutation
-from ...core.types import NonNullList, OrderError
+from ...core.types import BaseInputObjectType, NonNullList, OrderError
from ...core.utils import get_duplicated_values
from ...plugins.dataloaders import get_plugin_manager_promise
from ...site.dataloaders import get_site_promise
@@ -24,7 +25,7 @@ from ..types import Fulfillment, Order, OrderLine
from ..utils import prepare_insufficient_stock_order_validation_errors
-class OrderFulfillStockInput(graphene.InputObjectType):
+class OrderFulfillStockInput(BaseInputObjectType):
quantity = graphene.Int(
description="The number of line items to be fulfilled from given warehouse.",
required=True,
@@ -34,8 +35,11 @@ class OrderFulfillStockInput(graphene.InputObjectType):
required=True,
)
+ class Meta:
+ doc_category = DOC_CATEGORY_ORDERS
+
-class OrderFulfillLineInput(graphene.InputObjectType):
+class OrderFulfillLineInput(BaseInputObjectType):
order_line_id = graphene.ID(
description="The ID of the order line.", name="orderLineId"
)
@@ -45,8 +49,11 @@ class OrderFulfillLineInput(graphene.InputObjectType):
description="List of stock items to create.",
)
+ class Meta:
+ doc_category = DOC_CATEGORY_ORDERS
+
-class OrderFulfillInput(graphene.InputObjectType):
+class OrderFulfillInput(BaseInputObjectType):
lines = NonNullList(
OrderFulfillLineInput,
required=True,
@@ -65,14 +72,20 @@ class OrderFulfillInput(graphene.InputObjectType):
required=False,
)
+ class Meta:
+ doc_category = DOC_CATEGORY_ORDERS
+
-class FulfillmentUpdateTrackingInput(graphene.InputObjectType):
+class FulfillmentUpdateTrackingInput(BaseInputObjectType):
tracking_number = graphene.String(description="Fulfillment tracking number.")
notify_customer = graphene.Boolean(
default_value=False,
description="If true, send an email notification to the customer.",
)
+ class Meta:
+ doc_category = DOC_CATEGORY_ORDERS
+
class OrderFulfill(BaseMutation):
fulfillments = NonNullList(Fulfillment, description="List of created fulfillments.")
@@ -88,6 +101,7 @@ class OrderFulfill(BaseMutation):
class Meta:
description = "Creates new fulfillments for an order."
+ doc_category = DOC_CATEGORY_ORDERS
permissions = (OrderPermissions.MANAGE_ORDERS,)
error_type_class = OrderError
error_type_field = "order_errors"
diff --git a/saleor/graphql/order/mutations/order_line_delete.py b/saleor/graphql/order/mutations/order_line_delete.py
index ad5e6abdf9..ce4690fc03 100644
--- a/saleor/graphql/order/mutations/order_line_delete.py
+++ b/saleor/graphql/order/mutations/order_line_delete.py
@@ -13,6 +13,7 @@ from ....order.utils import (
from ....permission.enums import OrderPermissions
from ...app.dataloaders import get_app_promise
from ...core import ResolveInfo
+from ...core.doc_category import DOC_CATEGORY_ORDERS
from ...core.mutations import BaseMutation
from ...core.types import OrderError
from ...plugins.dataloaders import get_plugin_manager_promise
@@ -31,6 +32,7 @@ class OrderLineDelete(EditableOrderValidationMixin, BaseMutation):
class Meta:
description = "Deletes an order line from an order."
+ doc_category = DOC_CATEGORY_ORDERS
permissions = (OrderPermissions.MANAGE_ORDERS,)
error_type_class = OrderError
error_type_field = "order_errors"
diff --git a/saleor/graphql/order/mutations/order_line_discount_remove.py b/saleor/graphql/order/mutations/order_line_discount_remove.py
index 88c154363f..b1979698fd 100644
--- a/saleor/graphql/order/mutations/order_line_discount_remove.py
+++ b/saleor/graphql/order/mutations/order_line_discount_remove.py
@@ -6,6 +6,7 @@ from ....order.utils import invalidate_order_prices, remove_discount_from_order_
from ....permission.enums import OrderPermissions
from ...app.dataloaders import get_app_promise
from ...core import ResolveInfo
+from ...core.doc_category import DOC_CATEGORY_ORDERS
from ...core.types import OrderError
from ..types import Order, OrderLine
from .order_discount_common import OrderDiscountCommon
@@ -26,6 +27,7 @@ class OrderLineDiscountRemove(OrderDiscountCommon):
class Meta:
description = "Remove discount applied to the order line."
+ doc_category = DOC_CATEGORY_ORDERS
permissions = (OrderPermissions.MANAGE_ORDERS,)
error_type_class = OrderError
error_type_field = "order_errors"
diff --git a/saleor/graphql/order/mutations/order_line_discount_update.py b/saleor/graphql/order/mutations/order_line_discount_update.py
index 11f1988dd8..5732f05f76 100644
--- a/saleor/graphql/order/mutations/order_line_discount_update.py
+++ b/saleor/graphql/order/mutations/order_line_discount_update.py
@@ -8,6 +8,7 @@ from ....order.utils import invalidate_order_prices, update_discount_for_order_l
from ....permission.enums import OrderPermissions
from ...app.dataloaders import get_app_promise
from ...core import ResolveInfo
+from ...core.doc_category import DOC_CATEGORY_ORDERS
from ...core.types import OrderError
from ..types import Order, OrderLine
from .order_discount_common import OrderDiscountCommon, OrderDiscountCommonInput
@@ -32,6 +33,7 @@ class OrderLineDiscountUpdate(OrderDiscountCommon):
class Meta:
description = "Update discount for the order line."
+ doc_category = DOC_CATEGORY_ORDERS
permissions = (OrderPermissions.MANAGE_ORDERS,)
error_type_class = OrderError
error_type_field = "order_errors"
diff --git a/saleor/graphql/order/mutations/order_lines_create.py b/saleor/graphql/order/mutations/order_lines_create.py
index 5dae22b01d..069f4804f3 100644
--- a/saleor/graphql/order/mutations/order_lines_create.py
+++ b/saleor/graphql/order/mutations/order_lines_create.py
@@ -18,6 +18,7 @@ from ....order.utils import (
from ....permission.enums import OrderPermissions
from ...app.dataloaders import get_app_promise
from ...core import ResolveInfo
+from ...core.doc_category import DOC_CATEGORY_ORDERS
from ...core.mutations import BaseMutation
from ...core.types import NonNullList, OrderError
from ...discount.dataloaders import load_discounts
@@ -49,6 +50,7 @@ class OrderLinesCreate(EditableOrderValidationMixin, BaseMutation):
class Meta:
description = "Create order lines for an order."
+ doc_category = DOC_CATEGORY_ORDERS
permissions = (OrderPermissions.MANAGE_ORDERS,)
error_type_class = OrderError
error_type_field = "order_errors"
diff --git a/saleor/graphql/order/mutations/order_mark_as_paid.py b/saleor/graphql/order/mutations/order_mark_as_paid.py
index 0c5d545f18..3ddcb1daa9 100644
--- a/saleor/graphql/order/mutations/order_mark_as_paid.py
+++ b/saleor/graphql/order/mutations/order_mark_as_paid.py
@@ -11,6 +11,7 @@ from ....order.search import update_order_search_vector
from ....permission.enums import OrderPermissions
from ...app.dataloaders import get_app_promise
from ...core import ResolveInfo
+from ...core.doc_category import DOC_CATEGORY_ORDERS
from ...core.mutations import BaseMutation
from ...core.types import OrderError
from ...plugins.dataloaders import get_plugin_manager_promise
@@ -29,6 +30,7 @@ class OrderMarkAsPaid(BaseMutation):
class Meta:
description = "Mark order as manually paid."
+ doc_category = DOC_CATEGORY_ORDERS
permissions = (OrderPermissions.MANAGE_ORDERS,)
error_type_class = OrderError
error_type_field = "order_errors"
diff --git a/saleor/graphql/order/mutations/order_refund.py b/saleor/graphql/order/mutations/order_refund.py
index cc72c6455e..15a3eb1884 100644
--- a/saleor/graphql/order/mutations/order_refund.py
+++ b/saleor/graphql/order/mutations/order_refund.py
@@ -13,6 +13,7 @@ from ....payment.gateway import request_refund_action
from ....permission.enums import OrderPermissions
from ...app.dataloaders import get_app_promise
from ...core import ResolveInfo
+from ...core.doc_category import DOC_CATEGORY_ORDERS
from ...core.mutations import BaseMutation
from ...core.scalars import PositiveDecimal
from ...core.types import OrderError
@@ -61,6 +62,7 @@ class OrderRefund(BaseMutation):
class Meta:
description = "Refund an order."
+ doc_category = DOC_CATEGORY_ORDERS
permissions = (OrderPermissions.MANAGE_ORDERS,)
error_type_class = OrderError
error_type_field = "order_errors"
diff --git a/saleor/graphql/order/mutations/order_update_shipping.py b/saleor/graphql/order/mutations/order_update_shipping.py
index 469978d20b..5a85520bbe 100644
--- a/saleor/graphql/order/mutations/order_update_shipping.py
+++ b/saleor/graphql/order/mutations/order_update_shipping.py
@@ -9,21 +9,25 @@ from ....permission.enums import OrderPermissions
from ....shipping import models as shipping_models
from ....shipping.utils import convert_to_shipping_method_data
from ...core import ResolveInfo
+from ...core.doc_category import DOC_CATEGORY_ORDERS
from ...core.mutations import BaseMutation
-from ...core.types import OrderError
+from ...core.types import BaseInputObjectType, OrderError
from ...plugins.dataloaders import get_plugin_manager_promise
from ...shipping.types import ShippingMethod
from ..types import Order
from .utils import EditableOrderValidationMixin, clean_order_update_shipping
-class OrderUpdateShippingInput(graphene.InputObjectType):
+class OrderUpdateShippingInput(BaseInputObjectType):
shipping_method = graphene.ID(
description="ID of the selected shipping method,"
" pass null to remove currently assigned shipping method.",
name="shippingMethod",
)
+ class Meta:
+ doc_category = DOC_CATEGORY_ORDERS
+
class OrderUpdateShipping(EditableOrderValidationMixin, BaseMutation):
order = graphene.Field(Order, description="Order with updated shipping method.")
@@ -45,6 +49,7 @@ class OrderUpdateShipping(EditableOrderValidationMixin, BaseMutation):
" Requires shipping method ID to update, when null is passed "
"then currently assigned shipping method is removed."
)
+ doc_category = DOC_CATEGORY_ORDERS
permissions = (OrderPermissions.MANAGE_ORDERS,)
error_type_class = OrderError
error_type_field = "order_errors"
diff --git a/saleor/graphql/order/mutations/order_void.py b/saleor/graphql/order/mutations/order_void.py
index 55abb6e8cd..7c7c8a393f 100644
--- a/saleor/graphql/order/mutations/order_void.py
+++ b/saleor/graphql/order/mutations/order_void.py
@@ -11,6 +11,7 @@ from ....payment.gateway import request_void_action
from ....permission.enums import OrderPermissions
from ...app.dataloaders import get_app_promise
from ...core import ResolveInfo
+from ...core.doc_category import DOC_CATEGORY_ORDERS
from ...core.mutations import BaseMutation
from ...core.types import OrderError
from ...plugins.dataloaders import get_plugin_manager_promise
@@ -43,6 +44,7 @@ class OrderVoid(BaseMutation):
class Meta:
description = "Void an order."
+ doc_category = DOC_CATEGORY_ORDERS
permissions = (OrderPermissions.MANAGE_ORDERS,)
error_type_class = OrderError
error_type_field = "order_errors"
diff --git a/saleor/graphql/order/schema.py b/saleor/graphql/order/schema.py
index 2f8ec97579..825f7f0f9a 100644
--- a/saleor/graphql/order/schema.py
+++ b/saleor/graphql/order/schema.py
@@ -8,8 +8,14 @@ from ...permission.enums import OrderPermissions
from ..core import ResolveInfo
from ..core.connection import create_connection_slice, filter_connection_queryset
from ..core.descriptions import ADDED_IN_310, DEPRECATED_IN_3X_FIELD
+from ..core.doc_category import DOC_CATEGORY_ORDERS
from ..core.enums import ReportingPeriod
-from ..core.fields import ConnectionField, FilterConnectionField, PermissionsField
+from ..core.fields import (
+ BaseField,
+ ConnectionField,
+ FilterConnectionField,
+ PermissionsField,
+)
from ..core.scalars import UUID
from ..core.types import FilterInputObjectType, TaxedMoney
from ..core.utils import ext_ref_to_global_id_or_error, from_global_id_or_error
@@ -66,11 +72,13 @@ def sort_field_from_kwargs(kwargs: dict) -> Optional[List[str]]:
class OrderFilterInput(FilterInputObjectType):
class Meta:
+ doc_category = DOC_CATEGORY_ORDERS
filterset_class = OrderFilter
class OrderDraftFilterInput(FilterInputObjectType):
class Meta:
+ doc_category = DOC_CATEGORY_ORDERS
filterset_class = DraftOrderFilter
@@ -85,13 +93,14 @@ class OrderQueries(graphene.ObjectType):
OrderPermissions.MANAGE_ORDERS,
],
)
- order = graphene.Field(
+ order = BaseField(
Order,
description="Look up an order by ID or external reference.",
id=graphene.Argument(graphene.ID, description="ID of an order."),
external_reference=graphene.Argument(
graphene.String, description=f"External ID of an order. {ADDED_IN_310}"
),
+ doc_category=DOC_CATEGORY_ORDERS,
)
orders = FilterConnectionField(
OrderCountableConnection,
@@ -104,6 +113,7 @@ class OrderQueries(graphene.ObjectType):
permissions=[
OrderPermissions.MANAGE_ORDERS,
],
+ doc_category=DOC_CATEGORY_ORDERS,
)
draft_orders = FilterConnectionField(
OrderCountableConnection,
@@ -113,6 +123,7 @@ class OrderQueries(graphene.ObjectType):
permissions=[
OrderPermissions.MANAGE_ORDERS,
],
+ doc_category=DOC_CATEGORY_ORDERS,
)
orders_total = PermissionsField(
TaxedMoney,
@@ -125,12 +136,14 @@ class OrderQueries(graphene.ObjectType):
permissions=[
OrderPermissions.MANAGE_ORDERS,
],
+ doc_category=DOC_CATEGORY_ORDERS,
)
- order_by_token = graphene.Field(
+ order_by_token = BaseField(
Order,
description="Look up an order by token.",
deprecation_reason=DEPRECATED_IN_3X_FIELD,
token=graphene.Argument(UUID, description="The order's token.", required=True),
+ doc_category=DOC_CATEGORY_ORDERS,
)
@staticmethod
diff --git a/saleor/graphql/page/mutations/attributes.py b/saleor/graphql/page/mutations/attributes.py
index a8188700b5..7deb94c077 100644
--- a/saleor/graphql/page/mutations/attributes.py
+++ b/saleor/graphql/page/mutations/attributes.py
@@ -15,6 +15,7 @@ from ...attribute.mutations import (
)
from ...attribute.types import Attribute
from ...core import ResolveInfo
+from ...core.doc_category import DOC_CATEGORY_PAGES
from ...core.inputs import ReorderInput
from ...core.mutations import BaseMutation
from ...core.types import NonNullList, PageError
@@ -38,6 +39,7 @@ class PageAttributeAssign(BaseMutation):
)
class Meta:
+ doc_category = DOC_CATEGORY_PAGES
description = "Assign attributes to a given page type."
error_type_class = PageError
error_type_field = "page_errors"
@@ -131,6 +133,7 @@ class PageAttributeUnassign(BaseMutation):
class Meta:
description = "Unassign attributes from a given page type."
+ doc_category = DOC_CATEGORY_PAGES
permissions = (PageTypePermissions.MANAGE_PAGE_TYPES_AND_ATTRIBUTES,)
error_type_class = PageError
error_type_field = "page_errors"
@@ -168,6 +171,7 @@ class PageTypeReorderAttributes(BaseReorderAttributesMutation):
class Meta:
description = "Reorder the attributes of a page type."
+ doc_category = DOC_CATEGORY_PAGES
permissions = (PageTypePermissions.MANAGE_PAGE_TYPES_AND_ATTRIBUTES,)
error_type_class = PageError
error_type_field = "page_errors"
@@ -213,6 +217,7 @@ class PageReorderAttributeValues(BaseReorderAttributeValuesMutation):
class Meta:
description = "Reorder page attribute values."
+ doc_category = DOC_CATEGORY_PAGES
permissions = (PagePermissions.MANAGE_PAGES,)
error_type_class = PageError
error_type_field = "page_errors"
diff --git a/saleor/graphql/page/mutations/pages.py b/saleor/graphql/page/mutations/pages.py
index 777ed5232a..584c6756e9 100644
--- a/saleor/graphql/page/mutations/pages.py
+++ b/saleor/graphql/page/mutations/pages.py
@@ -16,9 +16,10 @@ from ...attribute.types import AttributeValueInput
from ...attribute.utils import AttributeAssignmentMixin
from ...core import ResolveInfo
from ...core.descriptions import ADDED_IN_33, DEPRECATED_IN_3X_INPUT, RICH_CONTENT
+from ...core.doc_category import DOC_CATEGORY_PAGES
from ...core.fields import JSONString
from ...core.mutations import ModelDeleteMutation, ModelMutation
-from ...core.types import NonNullList, PageError, SeoInput
+from ...core.types import BaseInputObjectType, NonNullList, PageError, SeoInput
from ...core.validators import clean_seo_fields, validate_slug_and_generate_if_needed
from ...plugins.dataloaders import get_plugin_manager_promise
from ...utils.validators import check_for_duplicates
@@ -28,7 +29,7 @@ if TYPE_CHECKING:
from ....attribute.models import Attribute
-class PageInput(graphene.InputObjectType):
+class PageInput(BaseInputObjectType):
slug = graphene.String(description="Page internal name.")
title = graphene.String(description="Page title.")
content = JSONString(description="Page content." + RICH_CONTENT)
@@ -47,12 +48,18 @@ class PageInput(graphene.InputObjectType):
)
seo = SeoInput(description="Search engine optimization fields.")
+ class Meta:
+ doc_category = DOC_CATEGORY_PAGES
+
class PageCreateInput(PageInput):
page_type = graphene.ID(
description="ID of the page type that page belongs to.", required=True
)
+ class Meta:
+ doc_category = DOC_CATEGORY_PAGES
+
class PageCreate(ModelMutation):
class Arguments:
@@ -199,7 +206,7 @@ class PageDelete(ModelDeleteMutation):
).delete()
-class PageTypeCreateInput(graphene.InputObjectType):
+class PageTypeCreateInput(BaseInputObjectType):
name = graphene.String(description="Name of the page type.")
slug = graphene.String(description="Page type slug.")
add_attributes = NonNullList(
@@ -207,6 +214,9 @@ class PageTypeCreateInput(graphene.InputObjectType):
description="List of attribute IDs to be assigned to the page type.",
)
+ class Meta:
+ doc_category = DOC_CATEGORY_PAGES
+
class PageTypeUpdateInput(PageTypeCreateInput):
remove_attributes = NonNullList(
@@ -214,6 +224,9 @@ class PageTypeUpdateInput(PageTypeCreateInput):
description="List of attribute IDs to be assigned to the page type.",
)
+ class Meta:
+ doc_category = DOC_CATEGORY_PAGES
+
class PageTypeMixin:
@classmethod
diff --git a/saleor/graphql/page/schema.py b/saleor/graphql/page/schema.py
index 09574cc2a8..e1ab2b8af9 100644
--- a/saleor/graphql/page/schema.py
+++ b/saleor/graphql/page/schema.py
@@ -2,7 +2,8 @@ import graphene
from ..core import ResolveInfo
from ..core.connection import create_connection_slice, filter_connection_queryset
-from ..core.fields import FilterConnectionField
+from ..core.doc_category import DOC_CATEGORY_PAGES
+from ..core.fields import BaseField, FilterConnectionField
from ..core.utils import from_global_id_or_error
from ..translations.mutations import PageTranslate
from .bulk_mutations import PageBulkDelete, PageBulkPublish, PageTypeBulkDelete
@@ -32,30 +33,34 @@ from .types import Page, PageCountableConnection, PageType, PageTypeCountableCon
class PageQueries(graphene.ObjectType):
- page = graphene.Field(
+ page = BaseField(
Page,
id=graphene.Argument(graphene.ID, description="ID of the page."),
slug=graphene.String(description="The slug of the page."),
description="Look up a page by ID or slug.",
+ doc_category=DOC_CATEGORY_PAGES,
)
pages = FilterConnectionField(
PageCountableConnection,
sort_by=PageSortingInput(description="Sort pages."),
filter=PageFilterInput(description="Filtering options for pages."),
description="List of the shop's pages.",
+ doc_category=DOC_CATEGORY_PAGES,
)
- page_type = graphene.Field(
+ page_type = BaseField(
PageType,
id=graphene.Argument(
graphene.ID, description="ID of the page type.", required=True
),
description="Look up a page type by ID.",
+ doc_category=DOC_CATEGORY_PAGES,
)
page_types = FilterConnectionField(
PageTypeCountableConnection,
sort_by=PageTypeSortingInput(description="Sort page types."),
filter=PageTypeFilterInput(description="Filtering options for page types."),
description="List of the page types.",
+ doc_category=DOC_CATEGORY_PAGES,
)
@staticmethod
diff --git a/saleor/graphql/payment/mutations.py b/saleor/graphql/payment/mutations.py
index 7ae10e7a87..cd4ee35e13 100644
--- a/saleor/graphql/payment/mutations.py
+++ b/saleor/graphql/payment/mutations.py
@@ -46,9 +46,11 @@ from ..core.descriptions import (
DEPRECATED_IN_3X_INPUT,
PREVIEW_FEATURE,
)
+from ..core.doc_category import DOC_CATEGORY_PAYMENTS
from ..core.fields import JSONString
from ..core.mutations import BaseMutation
from ..core.scalars import UUID, PositiveDecimal
+from ..core.types import BaseInputObjectType
from ..core.types import common as common_types
from ..discount.dataloaders import load_discounts
from ..meta.mutations import MetadataInput
@@ -70,7 +72,7 @@ def add_to_order_total_authorized_and_total_charged(
)
-class PaymentInput(graphene.InputObjectType):
+class PaymentInput(BaseInputObjectType):
gateway = graphene.Field(
graphene.String,
description="A gateway to use with that payment.",
@@ -110,6 +112,9 @@ class PaymentInput(graphene.InputObjectType):
required=False,
)
+ class Meta:
+ doc_category = DOC_CATEGORY_PAYMENTS
+
class CheckoutPaymentCreate(BaseMutation, I18nMixin):
checkout = graphene.Field(Checkout, description="Related checkout object.")
@@ -136,6 +141,7 @@ class CheckoutPaymentCreate(BaseMutation, I18nMixin):
class Meta:
description = "Create a new payment for given checkout."
+ doc_category = DOC_CATEGORY_PAYMENTS
error_type_class = common_types.PaymentError
error_type_field = "payment_errors"
@@ -362,6 +368,7 @@ class PaymentCapture(BaseMutation):
class Meta:
description = "Captures the authorized payment amount."
+ doc_category = DOC_CATEGORY_PAYMENTS
permissions = (OrderPermissions.MANAGE_ORDERS,)
error_type_class = common_types.PaymentError
error_type_field = "payment_errors"
@@ -395,6 +402,7 @@ class PaymentCapture(BaseMutation):
class PaymentRefund(PaymentCapture):
class Meta:
description = "Refunds the captured payment amount."
+ doc_category = DOC_CATEGORY_PAYMENTS
permissions = (OrderPermissions.MANAGE_ORDERS,)
error_type_class = common_types.PaymentError
error_type_field = "payment_errors"
@@ -433,6 +441,7 @@ class PaymentVoid(BaseMutation):
class Meta:
description = "Voids the authorized payment."
+ doc_category = DOC_CATEGORY_PAYMENTS
permissions = (OrderPermissions.MANAGE_ORDERS,)
error_type_class = common_types.PaymentError
error_type_field = "payment_errors"
@@ -478,6 +487,7 @@ class PaymentInitialize(BaseMutation):
class Meta:
description = "Initializes payment process when it is required by gateway."
+ doc_category = DOC_CATEGORY_PAYMENTS
error_type_class = common_types.PaymentError
error_type_field = "payment_errors"
@@ -545,7 +555,7 @@ class CardInput(graphene.InputObjectType):
)
-class PaymentCheckBalanceInput(graphene.InputObjectType):
+class PaymentCheckBalanceInput(BaseInputObjectType):
gateway_id = graphene.types.String(
description="An ID of a payment gateway to check.", required=True
)
@@ -556,6 +566,9 @@ class PaymentCheckBalanceInput(graphene.InputObjectType):
)
card = CardInput(description="Information about card.", required=True)
+ class Meta:
+ doc_category = DOC_CATEGORY_PAYMENTS
+
class PaymentCheckBalance(BaseMutation):
data = JSONString(description="Response from the gateway.")
@@ -567,6 +580,7 @@ class PaymentCheckBalance(BaseMutation):
class Meta:
description = "Check payment balance."
+ doc_category = DOC_CATEGORY_PAYMENTS
error_type_class = common_types.PaymentError
error_type_field = "payment_errors"
@@ -618,7 +632,7 @@ class PaymentCheckBalance(BaseMutation):
)
-class TransactionUpdateInput(graphene.InputObjectType):
+class TransactionUpdateInput(BaseInputObjectType):
status = graphene.String(
description="Status of the transaction.",
)
@@ -646,6 +660,9 @@ class TransactionUpdateInput(graphene.InputObjectType):
required=False,
)
+ class Meta:
+ doc_category = DOC_CATEGORY_PAYMENTS
+
class TransactionCreateInput(TransactionUpdateInput):
status = graphene.String(description="Status of the transaction.", required=True)
@@ -653,8 +670,11 @@ class TransactionCreateInput(TransactionUpdateInput):
description="Payment type used for this transaction.", required=True
)
+ class Meta:
+ doc_category = DOC_CATEGORY_PAYMENTS
+
-class TransactionEventInput(graphene.InputObjectType):
+class TransactionEventInput(BaseInputObjectType):
status = graphene.Field(
TransactionStatusEnum,
required=True,
@@ -663,6 +683,9 @@ class TransactionEventInput(graphene.InputObjectType):
reference = graphene.String(description="Reference of the transaction.")
name = graphene.String(description="Name of the transaction.")
+ class Meta:
+ doc_category = DOC_CATEGORY_PAYMENTS
+
class TransactionCreate(BaseMutation):
transaction = graphene.Field(TransactionItem)
@@ -688,6 +711,7 @@ class TransactionCreate(BaseMutation):
+ ADDED_IN_34
+ PREVIEW_FEATURE
)
+ doc_category = DOC_CATEGORY_PAYMENTS
error_type_class = common_types.TransactionCreateError
permissions = (PaymentPermissions.HANDLE_PAYMENTS,)
@@ -899,6 +923,7 @@ class TransactionUpdate(TransactionCreate):
+ ADDED_IN_34
+ PREVIEW_FEATURE
)
+ doc_category = DOC_CATEGORY_PAYMENTS
error_type_class = common_types.TransactionUpdateError
permissions = (PaymentPermissions.HANDLE_PAYMENTS,)
object_type = TransactionItem
@@ -1011,6 +1036,7 @@ class TransactionRequestAction(BaseMutation):
description = (
"Request an action for payment transaction." + ADDED_IN_34 + PREVIEW_FEATURE
)
+ doc_category = DOC_CATEGORY_PAYMENTS
error_type_class = common_types.TransactionRequestActionError
permissions = (
PaymentPermissions.HANDLE_PAYMENTS,
diff --git a/saleor/graphql/payment/schema.py b/saleor/graphql/payment/schema.py
index b32a690df4..aa06375f55 100644
--- a/saleor/graphql/payment/schema.py
+++ b/saleor/graphql/payment/schema.py
@@ -4,6 +4,7 @@ from ...permission.enums import OrderPermissions, PaymentPermissions
from ..core import ResolveInfo
from ..core.connection import create_connection_slice, filter_connection_queryset
from ..core.descriptions import ADDED_IN_36, PREVIEW_FEATURE
+from ..core.doc_category import DOC_CATEGORY_PAYMENTS
from ..core.fields import FilterConnectionField, PermissionsField
from ..core.utils import from_global_id_or_error
from .filters import PaymentFilterInput
@@ -31,6 +32,7 @@ class PaymentQueries(graphene.ObjectType):
permissions=[
OrderPermissions.MANAGE_ORDERS,
],
+ doc_category=DOC_CATEGORY_PAYMENTS,
)
payments = FilterConnectionField(
PaymentCountableConnection,
@@ -39,6 +41,7 @@ class PaymentQueries(graphene.ObjectType):
permissions=[
OrderPermissions.MANAGE_ORDERS,
],
+ doc_category=DOC_CATEGORY_PAYMENTS,
)
transaction = PermissionsField(
TransactionItem,
@@ -49,6 +52,7 @@ class PaymentQueries(graphene.ObjectType):
permissions=[
PaymentPermissions.HANDLE_PAYMENTS,
],
+ doc_category=DOC_CATEGORY_PAYMENTS,
)
@staticmethod
diff --git a/saleor/graphql/product/bulk_mutations/product_variant_bulk_create.py b/saleor/graphql/product/bulk_mutations/product_variant_bulk_create.py
index 68104ee420..abe1619d81 100644
--- a/saleor/graphql/product/bulk_mutations/product_variant_bulk_create.py
+++ b/saleor/graphql/product/bulk_mutations/product_variant_bulk_create.py
@@ -5,7 +5,6 @@ import graphene
from babel.core import get_global
from django.core.exceptions import ValidationError
from django.db.models import F
-from graphene.types import InputObjectType
from graphene.utils.str_converters import to_camel_case
from ....attribute import AttributeType
@@ -28,6 +27,7 @@ from ...core.descriptions import (
DEPRECATED_IN_3X_FIELD,
PREVIEW_FEATURE,
)
+from ...core.doc_category import DOC_CATEGORY_PRODUCTS
from ...core.enums import ErrorPolicyEnum
from ...core.fields import JSONString
from ...core.mutations import (
@@ -36,7 +36,13 @@ from ...core.mutations import (
validation_error_to_error_type,
)
from ...core.scalars import Date
-from ...core.types import BulkProductError, NonNullList, ProductVariantBulkError
+from ...core.types import (
+ BaseInputObjectType,
+ BaseObjectType,
+ BulkProductError,
+ NonNullList,
+ ProductVariantBulkError,
+)
from ...core.utils import get_duplicated_values
from ...core.validators import validate_price_precision
from ...plugins.dataloaders import get_plugin_manager_promise
@@ -100,7 +106,7 @@ def get_results(instances_data_with_errors_list, reject_everything=False):
]
-class ProductVariantBulkResult(graphene.ObjectType):
+class ProductVariantBulkResult(BaseObjectType):
product_variant = graphene.Field(
ProductVariant, required=False, description="Product variant data."
)
@@ -110,8 +116,11 @@ class ProductVariantBulkResult(graphene.ObjectType):
description="List of errors occurred on create attempt.",
)
+ class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
+
-class BulkAttributeValueInput(InputObjectType):
+class BulkAttributeValueInput(BaseInputObjectType):
id = graphene.ID(description="ID of the selected attribute.")
values = NonNullList(
graphene.String,
@@ -179,6 +188,9 @@ class BulkAttributeValueInput(InputObjectType):
required=False, description=AttributeValueDescriptions.DATE_TIME + ADDED_IN_312
)
+ class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
+
class ProductVariantBulkCreateInput(ProductVariantInput):
attributes = NonNullList(
@@ -198,6 +210,9 @@ class ProductVariantBulkCreateInput(ProductVariantInput):
)
sku = graphene.String(description="Stock keeping unit.")
+ class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
+
class ProductVariantBulkCreate(BaseMutation):
count = graphene.Int(
@@ -243,6 +258,7 @@ class ProductVariantBulkCreate(BaseMutation):
class Meta:
description = "Creates product variants for a given product."
+ doc_category = DOC_CATEGORY_PRODUCTS
permissions = (ProductPermissions.MANAGE_PRODUCTS,)
error_type_class = BulkProductError
error_type_field = "bulk_product_errors"
diff --git a/saleor/graphql/product/bulk_mutations/product_variant_bulk_update.py b/saleor/graphql/product/bulk_mutations/product_variant_bulk_update.py
index 1a1e068947..068efd515b 100644
--- a/saleor/graphql/product/bulk_mutations/product_variant_bulk_update.py
+++ b/saleor/graphql/product/bulk_mutations/product_variant_bulk_update.py
@@ -15,10 +15,11 @@ from ....product.tasks import update_product_discounted_price_task
from ....warehouse import models as warehouse_models
from ...attribute.utils import AttributeAssignmentMixin
from ...core.descriptions import ADDED_IN_311, ADDED_IN_312, PREVIEW_FEATURE
+from ...core.doc_category import DOC_CATEGORY_PRODUCTS
from ...core.enums import ErrorPolicyEnum
from ...core.mutations import BaseMutation, ModelMutation
from ...core.scalars import PositiveDecimal
-from ...core.types import NonNullList, ProductVariantBulkError
+from ...core.types import BaseInputObjectType, NonNullList, ProductVariantBulkError
from ...core.utils import get_duplicated_values
from ...plugins.dataloaders import get_plugin_manager_promise
from ..mutations.channels import ProductVariantChannelListingAddInput
@@ -34,7 +35,7 @@ from .product_variant_bulk_create import (
)
-class ProductVariantStocksUpdateInput(graphene.InputObjectType):
+class ProductVariantStocksUpdateInput(BaseInputObjectType):
create = NonNullList(
StockInput,
description="List of warehouses to create stocks.",
@@ -51,8 +52,11 @@ class ProductVariantStocksUpdateInput(graphene.InputObjectType):
required=False,
)
+ class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
+
-class ChannelListingUpdateInput(graphene.InputObjectType):
+class ChannelListingUpdateInput(BaseInputObjectType):
channel_listing = graphene.ID(required=True, description="ID of a channel listing.")
price = PositiveDecimal(description="Price of the particular variant in channel.")
cost_price = PositiveDecimal(description="Cost price of the variant in channel.")
@@ -60,8 +64,11 @@ class ChannelListingUpdateInput(graphene.InputObjectType):
description="The threshold for preorder variant in channel."
)
+ class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
+
-class ProductVariantChannelListingUpdateInput(graphene.InputObjectType):
+class ProductVariantChannelListingUpdateInput(BaseInputObjectType):
create = NonNullList(
ProductVariantChannelListingAddInput,
description="List of channels to create variant channel listings.",
@@ -78,6 +85,9 @@ class ProductVariantChannelListingUpdateInput(graphene.InputObjectType):
required=False,
)
+ class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
+
class ProductVariantBulkUpdateInput(ProductVariantBulkCreateInput):
id = graphene.ID(description="ID of the product variant to update.", required=True)
@@ -100,6 +110,7 @@ class ProductVariantBulkUpdateInput(ProductVariantBulkCreateInput):
class Meta:
description = "Input fields to update product variants." + ADDED_IN_311
+ doc_category = DOC_CATEGORY_PRODUCTS
class ProductVariantBulkUpdate(BaseMutation):
@@ -139,6 +150,7 @@ class ProductVariantBulkUpdate(BaseMutation):
description = (
"Update multiple product variants." + ADDED_IN_311 + PREVIEW_FEATURE
)
+ doc_category = DOC_CATEGORY_PRODUCTS
permissions = (ProductPermissions.MANAGE_PRODUCTS,)
error_type_class = ProductVariantBulkError
support_meta_field = True
diff --git a/saleor/graphql/product/bulk_mutations/product_variant_stocks_create.py b/saleor/graphql/product/bulk_mutations/product_variant_stocks_create.py
index 48845343f3..ad3a3d82ce 100644
--- a/saleor/graphql/product/bulk_mutations/product_variant_stocks_create.py
+++ b/saleor/graphql/product/bulk_mutations/product_variant_stocks_create.py
@@ -10,6 +10,7 @@ from ....permission.enums import ProductPermissions
from ....warehouse.error_codes import StockErrorCode
from ...channel import ChannelContext
from ...core import ResolveInfo
+from ...core.doc_category import DOC_CATEGORY_PRODUCTS
from ...core.mutations import BaseMutation
from ...core.types import BulkStockError, NonNullList
from ...plugins.dataloaders import get_plugin_manager_promise
@@ -40,6 +41,7 @@ class ProductVariantStocksCreate(BaseMutation):
class Meta:
description = "Creates stocks for product variant."
+ doc_category = DOC_CATEGORY_PRODUCTS
permissions = (ProductPermissions.MANAGE_PRODUCTS,)
error_type_class = BulkStockError
error_type_field = "bulk_stock_errors"
diff --git a/saleor/graphql/product/bulk_mutations/product_variant_stocks_delete.py b/saleor/graphql/product/bulk_mutations/product_variant_stocks_delete.py
index 5707fbd964..6c9c315838 100644
--- a/saleor/graphql/product/bulk_mutations/product_variant_stocks_delete.py
+++ b/saleor/graphql/product/bulk_mutations/product_variant_stocks_delete.py
@@ -8,6 +8,7 @@ from ....product import models
from ....warehouse import models as warehouse_models
from ...channel import ChannelContext
from ...core import ResolveInfo
+from ...core.doc_category import DOC_CATEGORY_PRODUCTS
from ...core.mutations import BaseMutation
from ...core.types import NonNullList, StockError
from ...core.validators import validate_one_of_args_is_in_mutation
@@ -39,6 +40,7 @@ class ProductVariantStocksDelete(BaseMutation):
class Meta:
description = "Delete stocks from product variant."
+ doc_category = DOC_CATEGORY_PRODUCTS
permissions = (ProductPermissions.MANAGE_PRODUCTS,)
error_type_class = StockError
error_type_field = "stock_errors"
diff --git a/saleor/graphql/product/bulk_mutations/product_variant_stocks_update.py b/saleor/graphql/product/bulk_mutations/product_variant_stocks_update.py
index cb88a8b112..b519d83b3f 100644
--- a/saleor/graphql/product/bulk_mutations/product_variant_stocks_update.py
+++ b/saleor/graphql/product/bulk_mutations/product_variant_stocks_update.py
@@ -11,6 +11,7 @@ from ....product import models
from ....warehouse import models as warehouse_models
from ...channel import ChannelContext
from ...core import ResolveInfo
+from ...core.doc_category import DOC_CATEGORY_PRODUCTS
from ...core.types import BulkStockError, NonNullList
from ...core.validators import validate_one_of_args_is_in_mutation
from ...plugins.dataloaders import get_plugin_manager_promise
@@ -26,6 +27,7 @@ from .product_variant_stocks_create import ProductVariantStocksCreate
class ProductVariantStocksUpdate(ProductVariantStocksCreate):
class Meta:
description = "Update stocks for product variant."
+ doc_category = DOC_CATEGORY_PRODUCTS
permissions = (ProductPermissions.MANAGE_PRODUCTS,)
error_type_class = BulkStockError
error_type_field = "bulk_stock_errors"
diff --git a/saleor/graphql/product/enums.py b/saleor/graphql/product/enums.py
index ee9aa605c8..50cf35d032 100644
--- a/saleor/graphql/product/enums.py
+++ b/saleor/graphql/product/enums.py
@@ -1,38 +1,56 @@
-import graphene
-
from ...product import ProductMediaTypes, ProductTypeKind
+from ..core.doc_category import DOC_CATEGORY_PRODUCTS
from ..core.enums import to_enum
+from ..core.types import BaseEnum
ProductTypeKindEnum = to_enum(ProductTypeKind)
ProductMediaType = to_enum(ProductMediaTypes, type_name="ProductMediaType")
-class ProductAttributeType(graphene.Enum):
+class ProductAttributeType(BaseEnum):
PRODUCT = "PRODUCT"
VARIANT = "VARIANT"
+ class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
+
-class StockAvailability(graphene.Enum):
+class StockAvailability(BaseEnum):
IN_STOCK = "AVAILABLE"
OUT_OF_STOCK = "OUT_OF_STOCK"
+ class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
-class CollectionPublished(graphene.Enum):
+
+class CollectionPublished(BaseEnum):
PUBLISHED = "published"
HIDDEN = "hidden"
+ class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
+
-class ProductTypeConfigurable(graphene.Enum):
+class ProductTypeConfigurable(BaseEnum):
CONFIGURABLE = "configurable"
SIMPLE = "simple"
+ class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
-class ProductTypeEnum(graphene.Enum):
+
+class ProductTypeEnum(BaseEnum):
DIGITAL = "digital"
SHIPPABLE = "shippable"
+ class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
+
-class VariantAttributeScope(graphene.Enum):
+class VariantAttributeScope(BaseEnum):
ALL = "all"
VARIANT_SELECTION = "variant_selection"
NOT_VARIANT_SELECTION = "not_variant_selection"
+
+ class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
diff --git a/saleor/graphql/product/mutations/attributes.py b/saleor/graphql/product/mutations/attributes.py
index d1e0e3643b..98473e3057 100644
--- a/saleor/graphql/product/mutations/attributes.py
+++ b/saleor/graphql/product/mutations/attributes.py
@@ -20,15 +20,16 @@ from ...attribute.types import Attribute
from ...channel import ChannelContext
from ...core import ResolveInfo
from ...core.descriptions import ADDED_IN_31
+from ...core.doc_category import DOC_CATEGORY_PRODUCTS
from ...core.inputs import ReorderInput
from ...core.mutations import BaseMutation
-from ...core.types import NonNullList, ProductError
+from ...core.types import BaseInputObjectType, NonNullList, ProductError
from ...core.utils.reordering import perform_reordering
from ...product.types import Product, ProductType, ProductVariant
from ..enums import ProductAttributeType
-class ProductAttributeAssignInput(graphene.InputObjectType):
+class ProductAttributeAssignInput(BaseInputObjectType):
id = graphene.ID(required=True, description="The ID of the attribute to assign.")
type = ProductAttributeType(
required=True, description="The attribute type to be assigned as."
@@ -42,8 +43,11 @@ class ProductAttributeAssignInput(graphene.InputObjectType):
),
)
+ class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
+
-class ProductAttributeAssignmentUpdateInput(graphene.InputObjectType):
+class ProductAttributeAssignmentUpdateInput(BaseInputObjectType):
id = graphene.ID(required=True, description="The ID of the attribute to assign.")
variant_selection = graphene.Boolean(
required=True,
@@ -54,6 +58,9 @@ class ProductAttributeAssignmentUpdateInput(graphene.InputObjectType):
),
)
+ class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
+
class VariantAssignmentValidationMixin:
@classmethod
@@ -104,6 +111,7 @@ class ProductAttributeAssign(BaseMutation, VariantAssignmentValidationMixin):
class Meta:
description = "Assign attributes to a given product type."
+ doc_category = DOC_CATEGORY_PRODUCTS
error_type_class = ProductError
error_type_field = "product_errors"
permissions = (ProductTypePermissions.MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES,)
@@ -319,6 +327,7 @@ class ProductAttributeUnassign(BaseMutation):
class Meta:
description = "Un-assign attributes from a given product type."
+ doc_category = DOC_CATEGORY_PRODUCTS
error_type_class = ProductError
error_type_field = "product_errors"
permissions = (ProductTypePermissions.MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES,)
@@ -373,7 +382,7 @@ class ProductAttributeAssignmentUpdate(BaseMutation, VariantAssignmentValidation
"Update attributes assigned to product variant for given product type."
+ ADDED_IN_31
)
-
+ doc_category = DOC_CATEGORY_PRODUCTS
error_type_class = ProductError
error_type_field = "product_errors"
permissions = (ProductTypePermissions.MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES,)
@@ -554,6 +563,7 @@ class ProductTypeReorderAttributes(BaseReorderAttributesMutation):
class Meta:
description = "Reorder the attributes of a product type."
+ doc_category = DOC_CATEGORY_PRODUCTS
permissions = (ProductTypePermissions.MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES,)
error_type_class = ProductError
error_type_field = "product_errors"
@@ -619,6 +629,7 @@ class ProductReorderAttributeValues(BaseReorderAttributeValuesMutation):
class Meta:
description = "Reorder product attribute values."
+ doc_category = DOC_CATEGORY_PRODUCTS
permissions = (ProductPermissions.MANAGE_PRODUCTS,)
error_type_class = ProductError
error_type_field = "product_errors"
@@ -675,6 +686,7 @@ class ProductVariantReorderAttributeValues(BaseReorderAttributeValuesMutation):
class Meta:
description = "Reorder product variant attribute values."
+ doc_category = DOC_CATEGORY_PRODUCTS
permissions = (ProductPermissions.MANAGE_PRODUCTS,)
error_type_class = ProductError
error_type_field = "product_errors"
diff --git a/saleor/graphql/product/mutations/channels.py b/saleor/graphql/product/mutations/channels.py
index 99ba3fbd4f..61fef01c78 100644
--- a/saleor/graphql/product/mutations/channels.py
+++ b/saleor/graphql/product/mutations/channels.py
@@ -29,9 +29,11 @@ from ...core.descriptions import (
DEPRECATED_IN_3X_INPUT,
PREVIEW_FEATURE,
)
+from ...core.doc_category import DOC_CATEGORY_PRODUCTS
from ...core.mutations import BaseMutation
from ...core.scalars import Date, PositiveDecimal
from ...core.types import (
+ BaseInputObjectType,
CollectionChannelListingError,
NonNullList,
ProductChannelListingError,
@@ -53,7 +55,7 @@ if TYPE_CHECKING:
ErrorType = DefaultDict[str, List[ValidationError]]
-class PublishableChannelListingInput(graphene.InputObjectType):
+class PublishableChannelListingInput(BaseInputObjectType):
channel_id = graphene.ID(required=True, description="ID of a channel.")
is_published = graphene.Boolean(
description="Determines if object is visible to customers."
@@ -68,6 +70,9 @@ class PublishableChannelListingInput(graphene.InputObjectType):
description="Publication date time. ISO 8601 standard." + ADDED_IN_33
)
+ class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
+
class ProductChannelListingAddInput(PublishableChannelListingInput):
visible_in_listings = graphene.Boolean(
@@ -105,8 +110,11 @@ class ProductChannelListingAddInput(PublishableChannelListingInput):
required=False,
)
+ class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
-class ProductChannelListingUpdateInput(graphene.InputObjectType):
+
+class ProductChannelListingUpdateInput(BaseInputObjectType):
update_channels = NonNullList(
ProductChannelListingAddInput,
description=(
@@ -120,6 +128,9 @@ class ProductChannelListingUpdateInput(graphene.InputObjectType):
required=False,
)
+ class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
+
class ProductChannelListingUpdate(BaseChannelListingMutation):
product = graphene.Field(Product, description="An updated product instance.")
@@ -133,6 +144,7 @@ class ProductChannelListingUpdate(BaseChannelListingMutation):
class Meta:
description = "Manage product's availability in channels."
+ doc_category = DOC_CATEGORY_PRODUCTS
permissions = (ProductPermissions.MANAGE_PRODUCTS,)
error_type_class = ProductChannelListingError
error_type_field = "product_channel_listing_errors"
@@ -372,7 +384,7 @@ class ProductChannelListingUpdate(BaseChannelListingMutation):
)
-class ProductVariantChannelListingAddInput(graphene.InputObjectType):
+class ProductVariantChannelListingAddInput(BaseInputObjectType):
channel_id = graphene.ID(required=True, description="ID of a channel.")
price = PositiveDecimal(
required=True, description="Price of the particular variant in channel."
@@ -386,6 +398,9 @@ class ProductVariantChannelListingAddInput(graphene.InputObjectType):
)
)
+ class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
+
class ProductVariantChannelListingUpdate(BaseMutation):
variant = graphene.Field(
@@ -411,6 +426,7 @@ class ProductVariantChannelListingUpdate(BaseMutation):
class Meta:
description = "Manage product variant prices in channels."
+ doc_category = DOC_CATEGORY_PRODUCTS
permissions = (ProductPermissions.MANAGE_PRODUCTS,)
error_type_class = ProductChannelListingError
error_type_field = "product_channel_listing_errors"
@@ -562,7 +578,7 @@ class ProductVariantChannelListingUpdate(BaseMutation):
)
-class CollectionChannelListingUpdateInput(graphene.InputObjectType):
+class CollectionChannelListingUpdateInput(BaseInputObjectType):
add_channels = NonNullList(
PublishableChannelListingInput,
description="List of channels to which the collection should be assigned.",
@@ -574,6 +590,9 @@ class CollectionChannelListingUpdateInput(graphene.InputObjectType):
required=False,
)
+ class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
+
class CollectionChannelListingUpdate(BaseChannelListingMutation):
collection = graphene.Field(
@@ -591,6 +610,7 @@ class CollectionChannelListingUpdate(BaseChannelListingMutation):
class Meta:
description = "Manage collection's availability in channels."
+ doc_category = DOC_CATEGORY_PRODUCTS
permissions = (ProductPermissions.MANAGE_PRODUCTS,)
error_type_class = CollectionChannelListingError
error_type_field = "collection_channel_listing_errors"
diff --git a/saleor/graphql/product/mutations/collection/collection_add_products.py b/saleor/graphql/product/mutations/collection/collection_add_products.py
index 2124dbec98..dba72e226f 100644
--- a/saleor/graphql/product/mutations/collection/collection_add_products.py
+++ b/saleor/graphql/product/mutations/collection/collection_add_products.py
@@ -9,6 +9,7 @@ from .....product.tasks import update_products_discounted_prices_of_catalogues_t
from .....product.utils import get_products_ids_without_variants
from ....channel import ChannelContext
from ....core import ResolveInfo
+from ....core.doc_category import DOC_CATEGORY_PRODUCTS
from ....core.mutations import BaseMutation
from ....core.types import CollectionError, NonNullList
from ....plugins.dataloaders import get_plugin_manager_promise
@@ -30,6 +31,7 @@ class CollectionAddProducts(BaseMutation):
class Meta:
description = "Adds products to a collection."
+ doc_category = DOC_CATEGORY_PRODUCTS
permissions = (ProductPermissions.MANAGE_PRODUCTS,)
error_type_class = CollectionError
error_type_field = "collection_errors"
diff --git a/saleor/graphql/product/mutations/collection/collection_create.py b/saleor/graphql/product/mutations/collection/collection_create.py
index 893a723550..d6dcc4563c 100644
--- a/saleor/graphql/product/mutations/collection/collection_create.py
+++ b/saleor/graphql/product/mutations/collection/collection_create.py
@@ -11,10 +11,17 @@ from .....product.error_codes import CollectionErrorCode
from ....channel import ChannelContext
from ....core import ResolveInfo
from ....core.descriptions import ADDED_IN_38, DEPRECATED_IN_3X_INPUT, RICH_CONTENT
+from ....core.doc_category import DOC_CATEGORY_PRODUCTS
from ....core.fields import JSONString
from ....core.mutations import ModelMutation
from ....core.scalars import Date
-from ....core.types import CollectionError, NonNullList, SeoInput, Upload
+from ....core.types import (
+ BaseInputObjectType,
+ CollectionError,
+ NonNullList,
+ SeoInput,
+ Upload,
+)
from ....core.validators import clean_seo_fields, validate_slug_and_generate_if_needed
from ....core.validators.file import clean_image_file
from ....meta.mutations import MetadataInput
@@ -22,7 +29,7 @@ from ....plugins.dataloaders import get_plugin_manager_promise
from ...types import Collection
-class CollectionInput(graphene.InputObjectType):
+class CollectionInput(BaseInputObjectType):
is_published = graphene.Boolean(
description="Informs whether a collection is published."
)
@@ -52,6 +59,9 @@ class CollectionInput(graphene.InputObjectType):
required=False,
)
+ class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
+
class CollectionCreateInput(CollectionInput):
products = NonNullList(
@@ -60,6 +70,9 @@ class CollectionCreateInput(CollectionInput):
name="products",
)
+ class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
+
class CollectionCreate(ModelMutation):
class Arguments:
diff --git a/saleor/graphql/product/mutations/collection/collection_remove_products.py b/saleor/graphql/product/mutations/collection/collection_remove_products.py
index 639da2b979..0b64f00aba 100644
--- a/saleor/graphql/product/mutations/collection/collection_remove_products.py
+++ b/saleor/graphql/product/mutations/collection/collection_remove_products.py
@@ -5,6 +5,7 @@ from .....product import models
from .....product.tasks import update_products_discounted_prices_of_catalogues_task
from ....channel import ChannelContext
from ....core import ResolveInfo
+from ....core.doc_category import DOC_CATEGORY_PRODUCTS
from ....core.mutations import BaseMutation
from ....core.types import CollectionError, NonNullList
from ....plugins.dataloaders import get_plugin_manager_promise
@@ -26,6 +27,7 @@ class CollectionRemoveProducts(BaseMutation):
class Meta:
description = "Remove products from a collection."
+ doc_category = DOC_CATEGORY_PRODUCTS
permissions = (ProductPermissions.MANAGE_PRODUCTS,)
error_type_class = CollectionError
error_type_field = "collection_errors"
diff --git a/saleor/graphql/product/mutations/collection/collection_reorder_products.py b/saleor/graphql/product/mutations/collection/collection_reorder_products.py
index c05ca2d592..5972aa13a7 100644
--- a/saleor/graphql/product/mutations/collection/collection_reorder_products.py
+++ b/saleor/graphql/product/mutations/collection/collection_reorder_products.py
@@ -7,13 +7,14 @@ from .....product import models
from .....product.error_codes import CollectionErrorCode, ProductErrorCode
from ....channel import ChannelContext
from ....core import ResolveInfo
+from ....core.doc_category import DOC_CATEGORY_PRODUCTS
from ....core.mutations import BaseMutation
-from ....core.types import CollectionError, NonNullList
+from ....core.types import BaseInputObjectType, CollectionError, NonNullList
from ....core.utils.reordering import perform_reordering
from ...types import Collection, Product
-class MoveProductInput(graphene.InputObjectType):
+class MoveProductInput(BaseInputObjectType):
product_id = graphene.ID(
description="The ID of the product to move.", required=True
)
@@ -26,6 +27,9 @@ class MoveProductInput(graphene.InputObjectType):
)
)
+ class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
+
class CollectionReorderProducts(BaseMutation):
collection = graphene.Field(
@@ -34,6 +38,7 @@ class CollectionReorderProducts(BaseMutation):
class Meta:
description = "Reorder the products of a collection."
+ doc_category = DOC_CATEGORY_PRODUCTS
permissions = (ProductPermissions.MANAGE_PRODUCTS,)
error_type_class = CollectionError
error_type_field = "collection_errors"
diff --git a/saleor/graphql/product/mutations/digital_contents.py b/saleor/graphql/product/mutations/digital_contents.py
index 6b38f3dd77..8cbfba0a7d 100644
--- a/saleor/graphql/product/mutations/digital_contents.py
+++ b/saleor/graphql/product/mutations/digital_contents.py
@@ -9,14 +9,15 @@ from ...channel import ChannelContext
from ...core import ResolveInfo
from ...core.context import disallow_replica_in_context
from ...core.descriptions import ADDED_IN_38
+from ...core.doc_category import DOC_CATEGORY_PRODUCTS
from ...core.mutations import BaseMutation, ModelMutation
-from ...core.types import NonNullList, ProductError, Upload
+from ...core.types import BaseInputObjectType, NonNullList, ProductError, Upload
from ...meta.mutations import MetadataInput
from ...plugins.dataloaders import get_plugin_manager_promise
from ..types import DigitalContent, DigitalContentUrl, ProductVariant
-class DigitalContentInput(graphene.InputObjectType):
+class DigitalContentInput(BaseInputObjectType):
use_default_settings = graphene.Boolean(
description="Use default digital content settings for this product.",
required=True,
@@ -55,12 +56,18 @@ class DigitalContentInput(graphene.InputObjectType):
required=False,
)
+ class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
+
class DigitalContentUploadInput(DigitalContentInput):
content_file = Upload(
required=True, description="Represents an file in a multipart request."
)
+ class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
+
class DigitalContentCreate(BaseMutation):
variant = graphene.Field(ProductVariant)
@@ -81,6 +88,7 @@ class DigitalContentCreate(BaseMutation):
"request. More detailed specs of the upload format can be found here: "
"https://github.com/jaydenseric/graphql-multipart-request-spec"
)
+ doc_category = DOC_CATEGORY_PRODUCTS
error_type_class = ProductError
error_type_field = "product_errors"
permissions = (ProductPermissions.MANAGE_PRODUCTS,)
@@ -158,6 +166,7 @@ class DigitalContentDelete(BaseMutation):
class Meta:
description = "Remove digital content assigned to given variant."
+ doc_category = DOC_CATEGORY_PRODUCTS
error_type_class = ProductError
error_type_field = "product_errors"
permissions = (ProductPermissions.MANAGE_PRODUCTS,)
@@ -202,6 +211,7 @@ class DigitalContentUpdate(BaseMutation):
class Meta:
description = "Update digital content."
+ doc_category = DOC_CATEGORY_PRODUCTS
error_type_class = ProductError
error_type_field = "product_errors"
permissions = (ProductPermissions.MANAGE_PRODUCTS,)
@@ -276,13 +286,16 @@ class DigitalContentUpdate(BaseMutation):
return DigitalContentUpdate(content=digital_content, variant=variant)
-class DigitalContentUrlCreateInput(graphene.InputObjectType):
+class DigitalContentUrlCreateInput(BaseInputObjectType):
content = graphene.ID(
description="Digital content ID which URL will belong to.",
name="content",
required=True,
)
+ class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
+
class DigitalContentUrlCreate(ModelMutation):
class Arguments:
diff --git a/saleor/graphql/product/mutations/product/product_create.py b/saleor/graphql/product/mutations/product/product_create.py
index 4cb9b8daa8..da48d22bf9 100644
--- a/saleor/graphql/product/mutations/product/product_create.py
+++ b/saleor/graphql/product/mutations/product/product_create.py
@@ -20,10 +20,11 @@ from ....core.descriptions import (
DEPRECATED_IN_3X_INPUT,
RICH_CONTENT,
)
+from ....core.doc_category import DOC_CATEGORY_PRODUCTS
from ....core.fields import JSONString
from ....core.mutations import ModelMutation
from ....core.scalars import WeightScalar
-from ....core.types import NonNullList, ProductError, SeoInput
+from ....core.types import BaseInputObjectType, NonNullList, ProductError, SeoInput
from ....core.validators import clean_seo_fields, validate_slug_and_generate_if_needed
from ....meta.mutations import MetadataInput
from ....plugins.dataloaders import get_plugin_manager_promise
@@ -31,7 +32,7 @@ from ...types import Product
from ..utils import clean_tax_code
-class ProductInput(graphene.InputObjectType):
+class ProductInput(BaseInputObjectType):
attributes = NonNullList(AttributeValueInput, description="List of attributes.")
category = graphene.ID(description="ID of the product's category.", name="category")
charge_taxes = graphene.Boolean(
@@ -84,8 +85,11 @@ class ProductInput(graphene.InputObjectType):
description="External ID of this product." + ADDED_IN_310, required=False
)
+ class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
+
-class StockInput(graphene.InputObjectType):
+class StockInput(BaseInputObjectType):
warehouse = graphene.ID(
required=True, description="Warehouse in which stock is located."
)
@@ -93,13 +97,19 @@ class StockInput(graphene.InputObjectType):
required=True, description="Quantity of items available for sell."
)
+ class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
+
-class StockUpdateInput(graphene.InputObjectType):
+class StockUpdateInput(BaseInputObjectType):
stock = graphene.ID(required=True, description="Stock.")
quantity = graphene.Int(
required=True, description="Quantity of items available for sell."
)
+ class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
+
class ProductCreateInput(ProductInput):
product_type = graphene.ID(
@@ -108,6 +118,9 @@ class ProductCreateInput(ProductInput):
required=True,
)
+ class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
+
T_INPUT_MAP = List[Tuple[attribute_models.Attribute, AttrValuesInput]]
diff --git a/saleor/graphql/product/mutations/product/product_media_create.py b/saleor/graphql/product/mutations/product/product_media_create.py
index 398ba38574..56f6c3bd80 100644
--- a/saleor/graphql/product/mutations/product/product_media_create.py
+++ b/saleor/graphql/product/mutations/product/product_media_create.py
@@ -9,8 +9,9 @@ from .....product import ProductMediaTypes, models
from .....product.error_codes import ProductErrorCode
from ....channel import ChannelContext
from ....core import ResolveInfo
+from ....core.doc_category import DOC_CATEGORY_PRODUCTS
from ....core.mutations import BaseMutation
-from ....core.types import ProductError, Upload
+from ....core.types import BaseInputObjectType, ProductError, Upload
from ....core.validators.file import (
clean_image_file,
get_filename_from_url,
@@ -21,7 +22,7 @@ from ....plugins.dataloaders import get_plugin_manager_promise
from ...types import Product, ProductMedia
-class ProductMediaCreateInput(graphene.InputObjectType):
+class ProductMediaCreateInput(BaseInputObjectType):
alt = graphene.String(description="Alt text for a product media.")
image = Upload(
required=False, description="Represents an image file in a multipart request."
@@ -33,6 +34,9 @@ class ProductMediaCreateInput(graphene.InputObjectType):
required=False, description="Represents an URL to an external media."
)
+ class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
+
class ProductMediaCreate(BaseMutation):
product = graphene.Field(Product)
@@ -50,6 +54,7 @@ class ProductMediaCreate(BaseMutation):
"More detailed specs of the upload format can be found here: "
"https://github.com/jaydenseric/graphql-multipart-request-spec"
)
+ doc_category = DOC_CATEGORY_PRODUCTS
permissions = (ProductPermissions.MANAGE_PRODUCTS,)
error_type_class = ProductError
error_type_field = "product_errors"
diff --git a/saleor/graphql/product/mutations/product/product_media_delete.py b/saleor/graphql/product/mutations/product/product_media_delete.py
index edc0427303..aa02766f51 100644
--- a/saleor/graphql/product/mutations/product/product_media_delete.py
+++ b/saleor/graphql/product/mutations/product/product_media_delete.py
@@ -4,6 +4,7 @@ from .....permission.enums import ProductPermissions
from .....product import models
from ....channel import ChannelContext
from ....core import ResolveInfo
+from ....core.doc_category import DOC_CATEGORY_PRODUCTS
from ....core.mutations import BaseMutation
from ....core.types import ProductError
from ....plugins.dataloaders import get_plugin_manager_promise
@@ -19,7 +20,7 @@ class ProductMediaDelete(BaseMutation):
class Meta:
description = "Deletes a product media."
-
+ doc_category = DOC_CATEGORY_PRODUCTS
permissions = (ProductPermissions.MANAGE_PRODUCTS,)
error_type_class = ProductError
error_type_field = "product_errors"
diff --git a/saleor/graphql/product/mutations/product/product_media_reorder.py b/saleor/graphql/product/mutations/product/product_media_reorder.py
index d33201b693..5709d6b1f3 100644
--- a/saleor/graphql/product/mutations/product/product_media_reorder.py
+++ b/saleor/graphql/product/mutations/product/product_media_reorder.py
@@ -6,6 +6,7 @@ from .....product import models
from .....product.error_codes import ProductErrorCode
from ....channel import ChannelContext
from ....core import ResolveInfo
+from ....core.doc_category import DOC_CATEGORY_PRODUCTS
from ....core.mutations import BaseMutation
from ....core.types import NonNullList, ProductError
from ....plugins.dataloaders import get_plugin_manager_promise
@@ -30,6 +31,7 @@ class ProductMediaReorder(BaseMutation):
class Meta:
description = "Changes ordering of the product media."
+ doc_category = DOC_CATEGORY_PRODUCTS
permissions = (ProductPermissions.MANAGE_PRODUCTS,)
error_type_class = ProductError
error_type_field = "product_errors"
diff --git a/saleor/graphql/product/mutations/product/product_media_update.py b/saleor/graphql/product/mutations/product/product_media_update.py
index 0930ef4461..6883cef3bf 100644
--- a/saleor/graphql/product/mutations/product/product_media_update.py
+++ b/saleor/graphql/product/mutations/product/product_media_update.py
@@ -4,15 +4,19 @@ from .....permission.enums import ProductPermissions
from .....product import models
from ....channel import ChannelContext
from ....core import ResolveInfo
+from ....core.doc_category import DOC_CATEGORY_PRODUCTS
from ....core.mutations import BaseMutation
-from ....core.types import ProductError
+from ....core.types import BaseInputObjectType, ProductError
from ....plugins.dataloaders import get_plugin_manager_promise
from ...types import Product, ProductMedia
-class ProductMediaUpdateInput(graphene.InputObjectType):
+class ProductMediaUpdateInput(BaseInputObjectType):
alt = graphene.String(description="Alt text for a product media.")
+ class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
+
class ProductMediaUpdate(BaseMutation):
product = graphene.Field(Product)
@@ -26,6 +30,7 @@ class ProductMediaUpdate(BaseMutation):
class Meta:
description = "Updates a product media."
+ doc_category = DOC_CATEGORY_PRODUCTS
permissions = (ProductPermissions.MANAGE_PRODUCTS,)
error_type_class = ProductError
error_type_field = "product_errors"
diff --git a/saleor/graphql/product/mutations/product_type/product_type_create.py b/saleor/graphql/product/mutations/product_type/product_type_create.py
index d8f9606b94..be33fc7c1c 100644
--- a/saleor/graphql/product/mutations/product_type/product_type_create.py
+++ b/saleor/graphql/product/mutations/product_type/product_type_create.py
@@ -7,9 +7,10 @@ from .....product import ProductTypeKind, models
from .....product.error_codes import ProductErrorCode
from ....core import ResolveInfo
from ....core.descriptions import DEPRECATED_IN_3X_INPUT
+from ....core.doc_category import DOC_CATEGORY_PRODUCTS
from ....core.mutations import ModelMutation
from ....core.scalars import WeightScalar
-from ....core.types import NonNullList, ProductError
+from ....core.types import BaseInputObjectType, NonNullList, ProductError
from ....core.validators import validate_slug_and_generate_if_needed
from ....plugins.dataloaders import get_plugin_manager_promise
from ...enums import ProductTypeKindEnum
@@ -17,7 +18,7 @@ from ...types import ProductType
from ..utils import clean_tax_code
-class ProductTypeInput(graphene.InputObjectType):
+class ProductTypeInput(BaseInputObjectType):
name = graphene.String(description="Name of the product type.")
slug = graphene.String(description="Product type slug.")
kind = ProductTypeKindEnum(description="The product type kind.")
@@ -66,6 +67,9 @@ class ProductTypeInput(graphene.InputObjectType):
required=False,
)
+ class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
+
class ProductTypeCreate(ModelMutation):
class Arguments:
diff --git a/saleor/graphql/product/mutations/product_type/product_type_delete.py b/saleor/graphql/product/mutations/product_type/product_type_delete.py
index a9f417d233..14baee6c0f 100644
--- a/saleor/graphql/product/mutations/product_type/product_type_delete.py
+++ b/saleor/graphql/product/mutations/product_type/product_type_delete.py
@@ -9,6 +9,7 @@ from .....order import models as order_models
from .....permission.enums import ProductTypePermissions
from .....product import models
from ....core import ResolveInfo
+from ....core.doc_category import DOC_CATEGORY_PRODUCTS
from ....core.mutations import ModelDeleteMutation
from ....core.types import ProductError
from ...types import ProductType
@@ -20,6 +21,7 @@ class ProductTypeDelete(ModelDeleteMutation):
class Meta:
description = "Deletes a product type."
+ doc_category = DOC_CATEGORY_PRODUCTS
model = models.ProductType
object_type = ProductType
permissions = (ProductTypePermissions.MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES,)
diff --git a/saleor/graphql/product/mutations/product_variant/product_variant_create.py b/saleor/graphql/product/mutations/product_variant/product_variant_create.py
index a0129a2d8a..7d12414c5c 100644
--- a/saleor/graphql/product/mutations/product_variant/product_variant_create.py
+++ b/saleor/graphql/product/mutations/product_variant/product_variant_create.py
@@ -24,9 +24,10 @@ from ....core.descriptions import (
ADDED_IN_310,
PREVIEW_FEATURE,
)
+from ....core.doc_category import DOC_CATEGORY_PRODUCTS
from ....core.mutations import ModelMutation
from ....core.scalars import WeightScalar
-from ....core.types import NonNullList, ProductError
+from ....core.types import BaseInputObjectType, NonNullList, ProductError
from ....core.utils import get_duplicated_values
from ....meta.mutations import MetadataInput
from ....plugins.dataloaders import get_plugin_manager_promise
@@ -42,14 +43,17 @@ from ..product.product_create import StockInput
T_INPUT_MAP = List[Tuple[attribute_models.Attribute, AttrValuesInput]]
-class PreorderSettingsInput(graphene.InputObjectType):
+class PreorderSettingsInput(BaseInputObjectType):
global_threshold = graphene.Int(
description="The global threshold for preorder variant."
)
end_date = graphene.DateTime(description="The end date for preorder.")
+ class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
+
-class ProductVariantInput(graphene.InputObjectType):
+class ProductVariantInput(BaseInputObjectType):
attributes = NonNullList(
AttributeValueInput,
required=False,
@@ -96,6 +100,9 @@ class ProductVariantInput(graphene.InputObjectType):
required=False,
)
+ class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
+
class ProductVariantCreateInput(ProductVariantInput):
attributes = NonNullList(
@@ -114,6 +121,9 @@ class ProductVariantCreateInput(ProductVariantInput):
required=False,
)
+ class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
+
class ProductVariantCreate(ModelMutation):
class Arguments:
diff --git a/saleor/graphql/product/mutations/product_variant/product_variant_preorder_deactivate.py b/saleor/graphql/product/mutations/product_variant/product_variant_preorder_deactivate.py
index 4cbf0d48ad..1361f5c85f 100644
--- a/saleor/graphql/product/mutations/product_variant/product_variant_preorder_deactivate.py
+++ b/saleor/graphql/product/mutations/product_variant/product_variant_preorder_deactivate.py
@@ -10,6 +10,7 @@ from .....warehouse.management import deactivate_preorder_for_variant
from ....channel import ChannelContext
from ....core import ResolveInfo
from ....core.descriptions import ADDED_IN_31, PREVIEW_FEATURE
+from ....core.doc_category import DOC_CATEGORY_PRODUCTS
from ....core.mutations import BaseMutation
from ....core.types import ProductError
from ....plugins.dataloaders import get_plugin_manager_promise
@@ -34,6 +35,7 @@ class ProductVariantPreorderDeactivate(BaseMutation):
+ ADDED_IN_31
+ PREVIEW_FEATURE
)
+ doc_category = DOC_CATEGORY_PRODUCTS
permissions = (ProductPermissions.MANAGE_PRODUCTS,)
error_type_class = ProductError
diff --git a/saleor/graphql/product/mutations/product_variant/product_variant_reorder.py b/saleor/graphql/product/mutations/product_variant/product_variant_reorder.py
index 32e1c64050..7db46cb67c 100644
--- a/saleor/graphql/product/mutations/product_variant/product_variant_reorder.py
+++ b/saleor/graphql/product/mutations/product_variant/product_variant_reorder.py
@@ -7,6 +7,7 @@ from .....product import models
from .....product.error_codes import ProductErrorCode
from ....channel import ChannelContext
from ....core import ResolveInfo
+from ....core.doc_category import DOC_CATEGORY_PRODUCTS
from ....core.inputs import ReorderInput
from ....core.mutations import BaseMutation
from ....core.types import NonNullList, ProductError
@@ -35,6 +36,7 @@ class ProductVariantReorder(BaseMutation):
"Mutation updates updated_at on product and "
"triggers PRODUCT_UPDATED webhook."
)
+ doc_category = DOC_CATEGORY_PRODUCTS
permissions = (ProductPermissions.MANAGE_PRODUCTS,)
error_type_class = ProductError
error_type_field = "product_errors"
diff --git a/saleor/graphql/product/mutations/product_variant/product_variant_set_default.py b/saleor/graphql/product/mutations/product_variant/product_variant_set_default.py
index d659561ed3..c79ab28918 100644
--- a/saleor/graphql/product/mutations/product_variant/product_variant_set_default.py
+++ b/saleor/graphql/product/mutations/product_variant/product_variant_set_default.py
@@ -6,6 +6,7 @@ from .....product import models
from .....product.error_codes import ProductErrorCode
from ....channel import ChannelContext
from ....core import ResolveInfo
+from ....core.doc_category import DOC_CATEGORY_PRODUCTS
from ....core.mutations import BaseMutation
from ....core.types import ProductError
from ....plugins.dataloaders import get_plugin_manager_promise
@@ -30,6 +31,7 @@ class ProductVariantSetDefault(BaseMutation):
"Set default variant for a product. "
"Mutation triggers PRODUCT_UPDATED webhook."
)
+ doc_category = DOC_CATEGORY_PRODUCTS
permissions = (ProductPermissions.MANAGE_PRODUCTS,)
error_type_class = ProductError
error_type_field = "product_errors"
diff --git a/saleor/graphql/product/mutations/product_variant/variant_media_assign.py b/saleor/graphql/product/mutations/product_variant/variant_media_assign.py
index e9db25b723..ad92d16ff1 100644
--- a/saleor/graphql/product/mutations/product_variant/variant_media_assign.py
+++ b/saleor/graphql/product/mutations/product_variant/variant_media_assign.py
@@ -7,6 +7,7 @@ from .....product import models
from .....product.error_codes import ProductErrorCode
from ....channel import ChannelContext
from ....core import ResolveInfo
+from ....core.doc_category import DOC_CATEGORY_PRODUCTS
from ....core.mutations import BaseMutation
from ....core.types import ProductError
from ....plugins.dataloaders import get_plugin_manager_promise
@@ -25,6 +26,7 @@ class VariantMediaAssign(BaseMutation):
class Meta:
description = "Assign an media to a product variant."
+ doc_category = DOC_CATEGORY_PRODUCTS
permissions = (ProductPermissions.MANAGE_PRODUCTS,)
error_type_class = ProductError
error_type_field = "product_errors"
diff --git a/saleor/graphql/product/mutations/product_variant/variant_media_unassign.py b/saleor/graphql/product/mutations/product_variant/variant_media_unassign.py
index 34b3313837..5b307a2e0d 100644
--- a/saleor/graphql/product/mutations/product_variant/variant_media_unassign.py
+++ b/saleor/graphql/product/mutations/product_variant/variant_media_unassign.py
@@ -6,6 +6,7 @@ from .....product import models
from .....product.error_codes import ProductErrorCode
from ....channel import ChannelContext
from ....core import ResolveInfo
+from ....core.doc_category import DOC_CATEGORY_PRODUCTS
from ....core.mutations import BaseMutation
from ....core.types import ProductError
from ....plugins.dataloaders import get_plugin_manager_promise
@@ -25,6 +26,7 @@ class VariantMediaUnassign(BaseMutation):
class Meta:
description = "Unassign an media from a product variant."
+ doc_category = DOC_CATEGORY_PRODUCTS
permissions = (ProductPermissions.MANAGE_PRODUCTS,)
error_type_class = ProductError
error_type_field = "product_errors"
diff --git a/saleor/graphql/product/schema.py b/saleor/graphql/product/schema.py
index de08f1f445..36cc645242 100644
--- a/saleor/graphql/product/schema.py
+++ b/saleor/graphql/product/schema.py
@@ -11,8 +11,14 @@ from ..channel.utils import get_default_channel_slug_or_graphql_error
from ..core import ResolveInfo
from ..core.connection import create_connection_slice, filter_connection_queryset
from ..core.descriptions import ADDED_IN_310
+from ..core.doc_category import DOC_CATEGORY_PRODUCTS
from ..core.enums import ReportingPeriod
-from ..core.fields import ConnectionField, FilterConnectionField, PermissionsField
+from ..core.fields import (
+ BaseField,
+ ConnectionField,
+ FilterConnectionField,
+ PermissionsField,
+)
from ..core.tracing import traced_resolver
from ..core.types import NonNullList
from ..core.utils import from_global_id_or_error
@@ -151,6 +157,7 @@ class ProductQueries(graphene.ObjectType):
permissions=[
ProductPermissions.MANAGE_PRODUCTS,
],
+ doc_category=DOC_CATEGORY_PRODUCTS,
)
digital_contents = ConnectionField(
DigitalContentCountableConnection,
@@ -158,6 +165,7 @@ class ProductQueries(graphene.ObjectType):
permissions=[
ProductPermissions.MANAGE_PRODUCTS,
],
+ doc_category=DOC_CATEGORY_PRODUCTS,
)
categories = FilterConnectionField(
CategoryCountableConnection,
@@ -168,14 +176,16 @@ class ProductQueries(graphene.ObjectType):
description="Filter categories by the nesting level in the category tree.",
),
description="List of the shop's categories.",
+ doc_category=DOC_CATEGORY_PRODUCTS,
)
- category = graphene.Field(
+ category = BaseField(
Category,
id=graphene.Argument(graphene.ID, description="ID of the category."),
slug=graphene.Argument(graphene.String, description="Slug of the category"),
description="Look up a category by ID or slug.",
+ doc_category=DOC_CATEGORY_PRODUCTS,
)
- collection = graphene.Field(
+ collection = BaseField(
Collection,
id=graphene.Argument(
graphene.ID,
@@ -190,6 +200,7 @@ class ProductQueries(graphene.ObjectType):
"include the unpublished items: "
f"{', '.join([p.name for p in ALL_PRODUCTS_PERMISSIONS])}."
),
+ doc_category=DOC_CATEGORY_PRODUCTS,
)
collections = FilterConnectionField(
CollectionCountableConnection,
@@ -203,8 +214,9 @@ class ProductQueries(graphene.ObjectType):
channel=graphene.String(
description="Slug of a channel for which the data should be returned."
),
+ doc_category=DOC_CATEGORY_PRODUCTS,
)
- product = graphene.Field(
+ product = BaseField(
Product,
id=graphene.Argument(
graphene.ID,
@@ -222,6 +234,7 @@ class ProductQueries(graphene.ObjectType):
"include the unpublished items: "
f"{', '.join([p.name for p in ALL_PRODUCTS_PERMISSIONS])}."
),
+ doc_category=DOC_CATEGORY_PRODUCTS,
)
products = FilterConnectionField(
ProductCountableConnection,
@@ -235,13 +248,15 @@ class ProductQueries(graphene.ObjectType):
"include the unpublished items: "
f"{', '.join([p.name for p in ALL_PRODUCTS_PERMISSIONS])}."
),
+ doc_category=DOC_CATEGORY_PRODUCTS,
)
- product_type = graphene.Field(
+ product_type = BaseField(
ProductType,
id=graphene.Argument(
graphene.ID, description="ID of the product type.", required=True
),
description="Look up a product type by ID.",
+ doc_category=DOC_CATEGORY_PRODUCTS,
)
product_types = FilterConnectionField(
ProductTypeCountableConnection,
@@ -250,8 +265,9 @@ class ProductQueries(graphene.ObjectType):
),
sort_by=ProductTypeSortingInput(description="Sort product types."),
description="List of the shop's product types.",
+ doc_category=DOC_CATEGORY_PRODUCTS,
)
- product_variant = graphene.Field(
+ product_variant = BaseField(
ProductVariant,
id=graphene.Argument(
graphene.ID,
@@ -271,6 +287,7 @@ class ProductQueries(graphene.ObjectType):
"permissions to include the unpublished items: "
f"{', '.join([p.name for p in ALL_PRODUCTS_PERMISSIONS])}."
),
+ doc_category=DOC_CATEGORY_PRODUCTS,
)
product_variants = FilterConnectionField(
ProductVariantCountableConnection,
@@ -289,6 +306,7 @@ class ProductQueries(graphene.ObjectType):
"include the unpublished items: "
f"{', '.join([p.name for p in ALL_PRODUCTS_PERMISSIONS])}."
),
+ doc_category=DOC_CATEGORY_PRODUCTS,
)
report_product_sales = ConnectionField(
ProductVariantCountableConnection,
@@ -303,6 +321,7 @@ class ProductQueries(graphene.ObjectType):
permissions=[
ProductPermissions.MANAGE_PRODUCTS,
],
+ doc_category=DOC_CATEGORY_PRODUCTS,
)
@staticmethod
diff --git a/saleor/graphql/product/sorters.py b/saleor/graphql/product/sorters.py
index 61945f0316..1f344f6aa1 100644
--- a/saleor/graphql/product/sorters.py
+++ b/saleor/graphql/product/sorters.py
@@ -22,14 +22,18 @@ from ...product.models import (
ProductChannelListing,
)
from ..core.descriptions import ADDED_IN_38, CHANNEL_REQUIRED, DEPRECATED_IN_3X_INPUT
-from ..core.types import ChannelSortInputObjectType, SortInputObjectType
+from ..core.doc_category import DOC_CATEGORY_PRODUCTS
+from ..core.types import BaseEnum, ChannelSortInputObjectType, SortInputObjectType
-class CategorySortField(graphene.Enum):
+class CategorySortField(BaseEnum):
NAME = ["name", "slug"]
PRODUCT_COUNT = ["product_count", "name", "slug"]
SUBCATEGORY_COUNT = ["subcategory_count", "name", "slug"]
+ class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
+
@property
def description(self):
# pylint: disable=no-member
@@ -65,17 +69,21 @@ class CategorySortField(graphene.Enum):
class CategorySortingInput(ChannelSortInputObjectType):
class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
sort_enum = CategorySortField
type_name = "categories"
-class CollectionSortField(graphene.Enum):
+class CollectionSortField(BaseEnum):
NAME = ["name", "slug"]
AVAILABILITY = ["is_published", "slug"]
PRODUCT_COUNT = ["product_count", "slug"]
PUBLICATION_DATE = ["published_at", "slug"]
PUBLISHED_AT = ["published_at", "slug"]
+ class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
+
@property
def description(self):
descrption_extras = {
@@ -127,11 +135,12 @@ class CollectionSortField(graphene.Enum):
class CollectionSortingInput(ChannelSortInputObjectType):
class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
sort_enum = CollectionSortField
type_name = "collections"
-class ProductOrderField(graphene.Enum):
+class ProductOrderField(BaseEnum):
NAME = ["name", "slug"]
RANK = ["search_rank", "id"]
PRICE = ["min_variants_price_amount", "name", "slug"]
@@ -147,6 +156,9 @@ class ProductOrderField(graphene.Enum):
RATING = ["rating", "name", "slug"]
CREATED_AT = ["created_at", "name", "slug"]
+ class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
+
@property
def description(self):
# pylint: disable=no-member
@@ -257,12 +269,16 @@ class ProductOrder(ChannelSortInputObjectType):
)
class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
sort_enum = ProductOrderField
-class ProductVariantSortField(graphene.Enum):
+class ProductVariantSortField(BaseEnum):
LAST_MODIFIED_AT = ["updated_at", "name", "pk"]
+ class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
+
@property
def description(self):
# pylint: disable=no-member
@@ -275,15 +291,19 @@ class ProductVariantSortField(graphene.Enum):
class ProductVariantSortingInput(SortInputObjectType):
class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
sort_enum = ProductVariantSortField
type_name = "productVariants"
-class ProductTypeSortField(graphene.Enum):
+class ProductTypeSortField(BaseEnum):
NAME = ["name", "slug"]
DIGITAL = ["is_digital", "name", "slug"]
SHIPPING_REQUIRED = ["is_shipping_required", "name", "slug"]
+ class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
+
@property
def description(self):
# pylint: disable=no-member
@@ -299,13 +319,17 @@ class ProductTypeSortField(graphene.Enum):
class ProductTypeSortingInput(SortInputObjectType):
class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
sort_enum = ProductTypeSortField
type_name = "product types"
-class MediaChoicesSortField(graphene.Enum):
+class MediaChoicesSortField(BaseEnum):
ID = ["id"]
+ class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
+
@property
def description(self):
descriptions = {
@@ -318,5 +342,6 @@ class MediaChoicesSortField(graphene.Enum):
class MediaSortingInput(SortInputObjectType):
class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
sort_enum = MediaChoicesSortField
type_name = "media"
diff --git a/saleor/graphql/schema.graphql b/saleor/graphql/schema.graphql
index bbbb23369f..d368d70181 100644
--- a/saleor/graphql/schema.graphql
+++ b/saleor/graphql/schema.graphql
@@ -4,6 +4,12 @@ schema {
subscription: Subscription
}
+"""Groups fields and operations into named groups."""
+directive @doc(
+ """Name of the grouping category"""
+ category: String!
+) on ENUM | FIELD | FIELD_DEFINITION | INPUT_OBJECT | OBJECT
+
type Query {
"""
Look up a webhook by ID. Requires one of the following permissions: MANAGE_APPS, OWNER.
@@ -11,14 +17,14 @@ type Query {
webhook(
"""ID of the webhook."""
id: ID!
- ): Webhook
+ ): Webhook @doc(category: "Webhooks")
"""
List of all available webhook events.
Requires one of the following permissions: MANAGE_APPS.
"""
- webhookEvents: [WebhookEvent!] @deprecated(reason: "This field will be removed in Saleor 4.0. Use `WebhookEventTypeAsyncEnum` and `WebhookEventTypeSyncEnum` to get available event types.")
+ webhookEvents: [WebhookEvent!] @doc(category: "Webhooks") @deprecated(reason: "This field will be removed in Saleor 4.0. Use `WebhookEventTypeAsyncEnum` and `WebhookEventTypeSyncEnum` to get available event types.")
"""
Retrieve a sample payload for a given webhook event based on real data. It can be useful for some integrations where sample payload is required.
@@ -26,7 +32,7 @@ type Query {
webhookSamplePayload(
"""Name of the requested event type."""
eventType: WebhookSampleEventTypeEnum!
- ): JSONString
+ ): JSONString @doc(category: "Webhooks")
"""
Look up a warehouse by ID.
@@ -43,7 +49,7 @@ type Query {
Added in Saleor 3.10.
"""
externalReference: String
- ): Warehouse
+ ): Warehouse @doc(category: "Products")
"""
List of warehouses.
@@ -65,7 +71,7 @@ type Query {
"""Return the last n elements from the list."""
last: Int
- ): WarehouseCountableConnection
+ ): WarehouseCountableConnection @doc(category: "Products")
"""
Returns a list of all translatable items of a given kind.
@@ -114,7 +120,7 @@ type Query {
taxConfiguration(
"""ID of a tax configuration."""
id: ID!
- ): TaxConfiguration
+ ): TaxConfiguration @doc(category: "Taxes")
"""
List of tax configurations.
@@ -140,7 +146,7 @@ type Query {
"""Return the last n elements from the list."""
last: Int
- ): TaxConfigurationCountableConnection
+ ): TaxConfigurationCountableConnection @doc(category: "Taxes")
"""
Look up a tax class.
@@ -154,7 +160,7 @@ type Query {
taxClass(
"""ID of a tax class."""
id: ID!
- ): TaxClass
+ ): TaxClass @doc(category: "Taxes")
"""
List of tax classes.
@@ -183,7 +189,7 @@ type Query {
"""Return the last n elements from the list."""
last: Int
- ): TaxClassCountableConnection
+ ): TaxClassCountableConnection @doc(category: "Taxes")
"""
Tax class rates grouped by country.
@@ -193,10 +199,10 @@ type Query {
taxCountryConfiguration(
"""Country for which to return tax class rates."""
countryCode: CountryCode!
- ): TaxCountryConfiguration
+ ): TaxCountryConfiguration @doc(category: "Taxes")
"\\n\\nRequires one of the following permissions: AUTHENTICATED_STAFF_USER, AUTHENTICATED_APP."
- taxCountryConfigurations: [TaxCountryConfiguration!]
+ taxCountryConfigurations: [TaxCountryConfiguration!] @doc(category: "Taxes")
"""
Look up a stock by ID
@@ -206,7 +212,7 @@ type Query {
stock(
"""ID of an warehouse"""
id: ID!
- ): Stock
+ ): Stock @doc(category: "Products")
"""
List of stocks.
@@ -227,7 +233,7 @@ type Query {
"""Return the last n elements from the list."""
last: Int
- ): StockCountableConnection
+ ): StockCountableConnection @doc(category: "Products")
"""Return information about the shop."""
shop: Shop!
@@ -237,14 +243,14 @@ type Query {
Requires one of the following permissions: MANAGE_ORDERS.
"""
- orderSettings: OrderSettings @deprecated(reason: "This field will be removed in Saleor 4.0. Use the `channel` query to fetch the `orderSettings` field instead.")
+ orderSettings: OrderSettings @doc(category: "Orders") @deprecated(reason: "This field will be removed in Saleor 4.0. Use the `channel` query to fetch the `orderSettings` field instead.")
"""
Gift card related settings from site settings.
Requires one of the following permissions: MANAGE_GIFT_CARD.
"""
- giftCardSettings: GiftCardSettings!
+ giftCardSettings: GiftCardSettings! @doc(category: "Gift cards")
"""
Look up a shipping zone by ID.
@@ -257,7 +263,7 @@ type Query {
"""Slug of a channel for which the data should be returned."""
channel: String
- ): ShippingZone
+ ): ShippingZone @doc(category: "Shipping")
"""
List of the shop's shipping zones.
@@ -282,7 +288,7 @@ type Query {
"""Return the last n elements from the list."""
last: Int
- ): ShippingZoneCountableConnection
+ ): ShippingZoneCountableConnection @doc(category: "Shipping")
"""
Look up digital content by ID.
@@ -292,7 +298,7 @@ type Query {
digitalContent(
"""ID of the digital content."""
id: ID!
- ): DigitalContent
+ ): DigitalContent @doc(category: "Products")
"""
List of digital content.
@@ -311,7 +317,7 @@ type Query {
"""Return the last n elements from the list."""
last: Int
- ): DigitalContentCountableConnection
+ ): DigitalContentCountableConnection @doc(category: "Products")
"""List of the shop's categories."""
categories(
@@ -335,7 +341,7 @@ type Query {
"""Return the last n elements from the list."""
last: Int
- ): CategoryCountableConnection
+ ): CategoryCountableConnection @doc(category: "Products")
"""Look up a category by ID or slug."""
category(
@@ -344,7 +350,7 @@ type Query {
"""Slug of the category"""
slug: String
- ): Category
+ ): Category @doc(category: "Products")
"""
Look up a collection by ID. Requires one of the following permissions to include the unpublished items: MANAGE_ORDERS, MANAGE_DISCOUNTS, MANAGE_PRODUCTS.
@@ -358,7 +364,7 @@ type Query {
"""Slug of a channel for which the data should be returned."""
channel: String
- ): Collection
+ ): Collection @doc(category: "Products")
"""
List of the shop's collections. Requires one of the following permissions to include the unpublished items: MANAGE_ORDERS, MANAGE_DISCOUNTS, MANAGE_PRODUCTS.
@@ -384,7 +390,7 @@ type Query {
"""Return the last n elements from the list."""
last: Int
- ): CollectionCountableConnection
+ ): CollectionCountableConnection @doc(category: "Products")
"""
Look up a product by ID. Requires one of the following permissions to include the unpublished items: MANAGE_ORDERS, MANAGE_DISCOUNTS, MANAGE_PRODUCTS.
@@ -405,7 +411,7 @@ type Query {
"""Slug of a channel for which the data should be returned."""
channel: String
- ): Product
+ ): Product @doc(category: "Products")
"""
List of the shop's products. Requires one of the following permissions to include the unpublished items: MANAGE_ORDERS, MANAGE_DISCOUNTS, MANAGE_PRODUCTS.
@@ -431,13 +437,13 @@ type Query {
"""Return the last n elements from the list."""
last: Int
- ): ProductCountableConnection
+ ): ProductCountableConnection @doc(category: "Products")
"""Look up a product type by ID."""
productType(
"""ID of the product type."""
id: ID!
- ): ProductType
+ ): ProductType @doc(category: "Products")
"""List of the shop's product types."""
productTypes(
@@ -458,7 +464,7 @@ type Query {
"""Return the last n elements from the list."""
last: Int
- ): ProductTypeCountableConnection
+ ): ProductTypeCountableConnection @doc(category: "Products")
"""
Look up a product variant by ID or SKU. Requires one of the following permissions to include the unpublished items: MANAGE_ORDERS, MANAGE_DISCOUNTS, MANAGE_PRODUCTS.
@@ -479,7 +485,7 @@ type Query {
"""Slug of a channel for which the data should be returned."""
channel: String
- ): ProductVariant
+ ): ProductVariant @doc(category: "Products")
"""
List of product variants. Requires one of the following permissions to include the unpublished items: MANAGE_ORDERS, MANAGE_DISCOUNTS, MANAGE_PRODUCTS.
@@ -508,7 +514,7 @@ type Query {
"""Return the last n elements from the list."""
last: Int
- ): ProductVariantCountableConnection
+ ): ProductVariantCountableConnection @doc(category: "Products")
"""
List of top selling products.
@@ -533,7 +539,7 @@ type Query {
"""Return the last n elements from the list."""
last: Int
- ): ProductVariantCountableConnection
+ ): ProductVariantCountableConnection @doc(category: "Products")
"""
Look up a payment by ID.
@@ -543,7 +549,7 @@ type Query {
payment(
"""ID of the payment."""
id: ID!
- ): Payment
+ ): Payment @doc(category: "Payments")
"""
List of payments.
@@ -565,7 +571,7 @@ type Query {
"""Return the last n elements from the list."""
last: Int
- ): PaymentCountableConnection
+ ): PaymentCountableConnection @doc(category: "Payments")
"""
Look up a transaction by ID.
@@ -579,7 +585,7 @@ type Query {
transaction(
"""ID of a transaction."""
id: ID!
- ): TransactionItem
+ ): TransactionItem @doc(category: "Payments")
"""Look up a page by ID or slug."""
page(
@@ -588,7 +594,7 @@ type Query {
"""The slug of the page."""
slug: String
- ): Page
+ ): Page @doc(category: "Pages")
"""List of the shop's pages."""
pages(
@@ -609,13 +615,13 @@ type Query {
"""Return the last n elements from the list."""
last: Int
- ): PageCountableConnection
+ ): PageCountableConnection @doc(category: "Pages")
"""Look up a page type by ID."""
pageType(
"""ID of the page type."""
id: ID!
- ): PageType
+ ): PageType @doc(category: "Pages")
"""List of the page types."""
pageTypes(
@@ -636,7 +642,7 @@ type Query {
"""Return the last n elements from the list."""
last: Int
- ): PageTypeCountableConnection
+ ): PageTypeCountableConnection @doc(category: "Pages")
"""
List of activity events to display on homepage (at the moment it only contains order-events).
@@ -668,7 +674,7 @@ type Query {
Added in Saleor 3.10.
"""
externalReference: String
- ): Order
+ ): Order @doc(category: "Orders")
"""
List of orders.
@@ -696,7 +702,7 @@ type Query {
"""Return the last n elements from the list."""
last: Int
- ): OrderCountableConnection
+ ): OrderCountableConnection @doc(category: "Orders")
"""
List of draft orders.
@@ -721,7 +727,7 @@ type Query {
"""Return the last n elements from the list."""
last: Int
- ): OrderCountableConnection
+ ): OrderCountableConnection @doc(category: "Orders")
"""
Return the total sales amount from a specific period.
@@ -734,13 +740,13 @@ type Query {
"""Slug of a channel for which the data should be returned."""
channel: String
- ): TaxedMoney
+ ): TaxedMoney @doc(category: "Orders")
"""Look up an order by token."""
orderByToken(
"""The order's token."""
token: UUID!
- ): Order @deprecated(reason: "This field will be removed in Saleor 4.0.")
+ ): Order @doc(category: "Orders") @deprecated(reason: "This field will be removed in Saleor 4.0.")
"""Look up a navigation menu by ID or name."""
menu(
@@ -826,7 +832,7 @@ type Query {
giftCard(
"""ID of the gift card."""
id: ID!
- ): GiftCard
+ ): GiftCard @doc(category: "Gift cards")
"""
List of gift cards.
@@ -863,7 +869,7 @@ type Query {
"""Return the last n elements from the list."""
last: Int
- ): GiftCardCountableConnection
+ ): GiftCardCountableConnection @doc(category: "Gift cards")
"""
List of gift card currencies.
@@ -874,7 +880,7 @@ type Query {
Requires one of the following permissions: MANAGE_GIFT_CARD.
"""
- giftCardCurrencies: [String!]!
+ giftCardCurrencies: [String!]! @doc(category: "Gift cards")
"""
List of gift card tags.
@@ -900,7 +906,7 @@ type Query {
"""Return the last n elements from the list."""
last: Int
- ): GiftCardTagCountableConnection
+ ): GiftCardTagCountableConnection @doc(category: "Gift cards")
"""
Look up a plugin by ID.
@@ -948,7 +954,7 @@ type Query {
"""Slug of a channel for which the data should be returned."""
channel: String
- ): Sale
+ ): Sale @doc(category: "Discounts")
"""
List of the shop's sales.
@@ -983,7 +989,7 @@ type Query {
"""Return the last n elements from the list."""
last: Int
- ): SaleCountableConnection
+ ): SaleCountableConnection @doc(category: "Discounts")
"""
Look up a voucher by ID.
@@ -996,7 +1002,7 @@ type Query {
"""Slug of a channel for which the data should be returned."""
channel: String
- ): Voucher
+ ): Voucher @doc(category: "Discounts")
"""
List of the shop's vouchers.
@@ -1031,7 +1037,7 @@ type Query {
"""Return the last n elements from the list."""
last: Int
- ): VoucherCountableConnection
+ ): VoucherCountableConnection @doc(category: "Discounts")
"""
Look up a export file by ID.
@@ -1069,7 +1075,7 @@ type Query {
): ExportFileCountableConnection
"""List of all tax rates available from tax gateway."""
- taxTypes: [TaxType!]
+ taxTypes: [TaxType!] @doc(category: "Taxes")
"""Look up a checkout by token and slug of channel."""
checkout(
@@ -1086,7 +1092,7 @@ type Query {
DEPRECATED: this field will be removed in Saleor 4.0. Use `id` instead.
"""
token: UUID
- ): Checkout
+ ): Checkout @doc(category: "Checkout")
"""
List of checkouts.
@@ -1122,7 +1128,7 @@ type Query {
"""Return the last n elements from the list."""
last: Int
- ): CheckoutCountableConnection
+ ): CheckoutCountableConnection @doc(category: "Checkout")
"""
List of checkout lines.
@@ -1141,7 +1147,7 @@ type Query {
"""Return the last n elements from the list."""
last: Int
- ): CheckoutLineCountableConnection
+ ): CheckoutLineCountableConnection @doc(category: "Checkout")
"""Look up a channel by ID or slug."""
channel(
@@ -1156,14 +1162,14 @@ type Query {
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
slug: String
- ): Channel
+ ): Channel @doc(category: "Channels")
"""
List of all channels.
Requires one of the following permissions: AUTHENTICATED_APP, AUTHENTICATED_STAFF_USER.
"""
- channels: [Channel!]
+ channels: [Channel!] @doc(category: "Channels")
"""List of the shop's attributes."""
attributes(
@@ -1205,7 +1211,7 @@ type Query {
"""Return the last n elements from the list."""
last: Int
- ): AttributeCountableConnection
+ ): AttributeCountableConnection @doc(category: "Attributes")
"""Look up an attribute by ID, slug or external reference."""
attribute(
@@ -1221,14 +1227,14 @@ type Query {
Added in Saleor 3.10.
"""
externalReference: String
- ): Attribute
+ ): Attribute @doc(category: "Attributes")
"""
List of all apps installations
Requires one of the following permissions: MANAGE_APPS.
"""
- appsInstallations: [AppInstallation!]!
+ appsInstallations: [AppInstallation!]! @doc(category: "Apps")
"""
List of the apps.
@@ -1253,7 +1259,7 @@ type Query {
"""Return the last n elements from the list."""
last: Int
- ): AppCountableConnection
+ ): AppCountableConnection @doc(category: "Apps")
"""
Look up an app by ID. If ID is not provided, return the currently authenticated app.
@@ -1263,7 +1269,7 @@ type Query {
app(
"""ID of the app."""
id: ID
- ): App
+ ): App @doc(category: "Apps")
"""
List of all extensions.
@@ -1289,7 +1295,7 @@ type Query {
"""Return the last n elements from the list."""
last: Int
- ): AppExtensionCountableConnection
+ ): AppExtensionCountableConnection @doc(category: "Apps")
"""
Look up an app extension by ID.
@@ -1303,7 +1309,7 @@ type Query {
appExtension(
"""ID of the app extension."""
id: ID!
- ): AppExtension
+ ): AppExtension @doc(category: "Apps")
"""Returns address validation rules."""
addressValidationRules(
@@ -1318,13 +1324,13 @@ type Query {
"""Sublocality like a district."""
cityArea: String
- ): AddressValidationData
+ ): AddressValidationData @doc(category: "Users")
"""Look up an address by ID."""
address(
"""ID of an address."""
id: ID!
- ): Address
+ ): Address @doc(category: "Users")
"""
List of the shop's customers.
@@ -1349,7 +1355,7 @@ type Query {
"""Return the last n elements from the list."""
last: Int
- ): UserCountableConnection
+ ): UserCountableConnection @doc(category: "Users")
"""
List of permission groups.
@@ -1374,7 +1380,7 @@ type Query {
"""Return the last n elements from the list."""
last: Int
- ): GroupCountableConnection
+ ): GroupCountableConnection @doc(category: "Users")
"""
Look up permission group by ID.
@@ -1384,10 +1390,10 @@ type Query {
permissionGroup(
"""ID of the group."""
id: ID!
- ): Group
+ ): Group @doc(category: "Users")
"""Return the currently authenticated user."""
- me: User
+ me: User @doc(category: "Users")
"""
List of the shop's staff users.
@@ -1412,7 +1418,7 @@ type Query {
"""Return the last n elements from the list."""
last: Int
- ): UserCountableConnection
+ ): UserCountableConnection @doc(category: "Users")
"""
Look up a user by ID or email address.
@@ -1432,13 +1438,13 @@ type Query {
Added in Saleor 3.10.
"""
externalReference: String
- ): User
+ ): User @doc(category: "Users")
_entities(representations: [_Any]): [_Entity]
_service: _Service
}
"""Webhook."""
-type Webhook implements Node {
+type Webhook implements Node @doc(category: "Webhooks") {
id: ID!
name: String!
@@ -1502,7 +1508,7 @@ interface Node {
}
"""Webhook event."""
-type WebhookEvent {
+type WebhookEvent @doc(category: "Webhooks") {
"""Display name of the event."""
name: String!
@@ -1992,7 +1998,7 @@ enum WebhookEventTypeEnum {
}
"""Synchronous webhook event."""
-type WebhookEventSync {
+type WebhookEventSync @doc(category: "Webhooks") {
"""Display name of the event."""
name: String!
@@ -2052,7 +2058,7 @@ enum WebhookEventTypeSyncEnum {
}
"""Asynchronous webhook event."""
-type WebhookEventAsync {
+type WebhookEventAsync @doc(category: "Webhooks") {
"""Display name of the event."""
name: String!
@@ -2494,7 +2500,7 @@ enum WebhookEventTypeAsyncEnum {
}
"""Represents app data."""
-type App implements Node & ObjectWithMetadata {
+type App implements Node & ObjectWithMetadata @doc(category: "Apps") {
id: ID!
"""List of private metadata items. Requires staff permissions to access."""
@@ -2735,7 +2741,7 @@ enum AppTypeEnum {
}
"""Represents token data."""
-type AppToken implements Node {
+type AppToken implements Node @doc(category: "Apps") {
id: ID!
"""Name of the authenticated token."""
@@ -2746,7 +2752,7 @@ type AppToken implements Node {
}
"""Represents app data."""
-type AppExtension implements Node {
+type AppExtension implements Node @doc(category: "Apps") {
id: ID!
"""List of the app extension's permissions."""
@@ -2890,7 +2896,7 @@ type EventDeliveryAttemptCountableEdge {
}
"""Event delivery attempts."""
-type EventDeliveryAttempt implements Node {
+type EventDeliveryAttempt implements Node @doc(category: "Webhooks") {
id: ID!
"""Event delivery creation date and time."""
@@ -3075,7 +3081,7 @@ enum WebhookSampleEventTypeEnum {
}
"""Represents warehouse."""
-type Warehouse implements Node & ObjectWithMetadata {
+type Warehouse implements Node & ObjectWithMetadata @doc(category: "Products") {
id: ID!
"""List of private metadata items. Requires staff permissions to access."""
@@ -3163,7 +3169,7 @@ type Warehouse implements Node & ObjectWithMetadata {
}
"""Represents user address data."""
-type Address implements Node & ObjectWithMetadata {
+type Address implements Node & ObjectWithMetadata @doc(category: "Users") {
id: ID!
"""
@@ -3303,7 +3309,7 @@ type ShippingZoneCountableEdge {
"""
Represents a shipping zone in the shop. Zones are the concept used only for grouping shipping methods in the dashboard, and are never exposed to the customers directly.
"""
-type ShippingZone implements Node & ObjectWithMetadata {
+type ShippingZone implements Node & ObjectWithMetadata @doc(category: "Shipping") {
id: ID!
"""List of private metadata items. Requires staff permissions to access."""
@@ -3396,7 +3402,7 @@ type Money {
"""
Shipping method are the methods you'll use to get customer's orders to them. They are directly exposed to the customers.
"""
-type ShippingMethodType implements Node & ObjectWithMetadata {
+type ShippingMethodType implements Node & ObjectWithMetadata @doc(category: "Shipping") {
"""Shipping method ID."""
id: ID!
@@ -4335,7 +4341,7 @@ enum LanguageCodeEnum {
}
"""Represents shipping method channel listing."""
-type ShippingMethodChannelListing implements Node {
+type ShippingMethodChannelListing implements Node @doc(category: "Shipping") {
id: ID!
channel: Channel!
maximumOrderPrice: Money
@@ -4344,7 +4350,7 @@ type ShippingMethodChannelListing implements Node {
}
"""Represents channel."""
-type Channel implements Node {
+type Channel implements Node @doc(category: "Channels") {
id: ID!
"""Slug of the channel."""
@@ -4849,7 +4855,7 @@ type OrderSettings {
}
"""Represents shipping method postal code rule."""
-type ShippingMethodPostalCodeRule implements Node {
+type ShippingMethodPostalCodeRule implements Node @doc(category: "Shipping") {
"""The ID of the object."""
id: ID!
@@ -4887,7 +4893,7 @@ type ProductCountableEdge {
}
"""Represents an individual item for sale in the storefront."""
-type Product implements Node & ObjectWithMetadata {
+type Product implements Node & ObjectWithMetadata @doc(category: "Products") {
id: ID!
"""List of private metadata items. Requires staff permissions to access."""
@@ -5104,7 +5110,7 @@ type Product implements Node & ObjectWithMetadata {
"""
Represents a type of product. It defines what attributes are available to products of this type.
"""
-type ProductType implements Node & ObjectWithMetadata {
+type ProductType implements Node & ObjectWithMetadata @doc(category: "Products") {
id: ID!
"""List of private metadata items. Requires staff permissions to access."""
@@ -5254,7 +5260,7 @@ Added in Saleor 3.9.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type TaxClass implements Node & ObjectWithMetadata {
+type TaxClass implements Node & ObjectWithMetadata @doc(category: "Taxes") {
"""The ID of the object."""
id: ID!
@@ -5318,7 +5324,7 @@ Added in Saleor 3.9.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type TaxClassCountryRate {
+type TaxClassCountryRate @doc(category: "Taxes") {
"""Country in which this tax rate applies."""
country: CountryDisplay!
@@ -5332,7 +5338,7 @@ type TaxClassCountryRate {
"""
Custom attribute of a product. Attributes can be assigned to products and variants at the product type level.
"""
-type Attribute implements Node & ObjectWithMetadata {
+type Attribute implements Node & ObjectWithMetadata @doc(category: "Attributes") {
id: ID!
"""List of private metadata items. Requires staff permissions to access."""
@@ -5555,7 +5561,7 @@ enum MeasurementUnitsEnum {
TONNE
}
-type AttributeValueCountableConnection {
+type AttributeValueCountableConnection @doc(category: "Attributes") {
"""Pagination data for this connection."""
pageInfo: PageInfo!
edges: [AttributeValueCountableEdge!]!
@@ -5573,7 +5579,7 @@ type AttributeValueCountableEdge {
}
"""Represents a value of an attribute."""
-type AttributeValue implements Node {
+type AttributeValue implements Node @doc(category: "Attributes") {
id: ID!
"""Name of a value displayed in the interface."""
@@ -5664,7 +5670,7 @@ value as specified by
"""
scalar Date
-input AttributeChoicesSortingInput {
+input AttributeChoicesSortingInput @doc(category: "Attributes") {
"""Specifies the direction in which to sort products."""
direction: OrderDirection!
@@ -5672,7 +5678,7 @@ input AttributeChoicesSortingInput {
field: AttributeChoicesSortField!
}
-enum AttributeChoicesSortField {
+enum AttributeChoicesSortField @doc(category: "Attributes") {
"""Sort attribute choice by name."""
NAME
@@ -5680,7 +5686,7 @@ enum AttributeChoicesSortField {
SLUG
}
-input AttributeValueFilterInput {
+input AttributeValueFilterInput @doc(category: "Attributes") {
search: String
ids: [ID!]
}
@@ -5710,7 +5716,7 @@ type ProductTypeCountableEdge {
cursor: String!
}
-enum VariantAttributeScope {
+enum VariantAttributeScope @doc(category: "Products") {
ALL
VARIANT_SELECTION
NOT_VARIANT_SELECTION
@@ -5721,7 +5727,7 @@ Represents assigned attribute to variant with variant selection attached.
Added in Saleor 3.1.
"""
-type AssignedVariantAttribute {
+type AssignedVariantAttribute @doc(category: "Attributes") {
"""Attribute assigned to variant."""
attribute: Attribute!
@@ -5731,7 +5737,7 @@ type AssignedVariantAttribute {
variantSelection: Boolean!
}
-type AttributeCountableConnection {
+type AttributeCountableConnection @doc(category: "Attributes") {
"""Pagination data for this connection."""
pageInfo: PageInfo!
edges: [AttributeCountableEdge!]!
@@ -5748,7 +5754,7 @@ type AttributeCountableEdge {
cursor: String!
}
-input AttributeFilterInput {
+input AttributeFilterInput @doc(category: "Attributes") {
valueRequired: Boolean
isVariantOnly: Boolean
visibleInStorefront: Boolean
@@ -5786,7 +5792,7 @@ Added in Saleor 3.11.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-input AttributeWhereInput {
+input AttributeWhereInput @doc(category: "Attributes") {
valueRequired: Boolean
visibleInStorefront: Boolean
filterableInDashboard: Boolean
@@ -5824,7 +5830,7 @@ input StringFilterInput {
oneOf: [String!]
}
-input AttributeInputTypeEnumFilterInput {
+input AttributeInputTypeEnumFilterInput @doc(category: "Attributes") {
"""The value equal to."""
eq: AttributeInputTypeEnum
@@ -5832,7 +5838,7 @@ input AttributeInputTypeEnumFilterInput {
oneOf: [AttributeInputTypeEnum!]
}
-input AttributeEntityTypeEnumFilterInput {
+input AttributeEntityTypeEnumFilterInput @doc(category: "Attributes") {
"""The value equal to."""
eq: AttributeEntityTypeEnum
@@ -5840,7 +5846,7 @@ input AttributeEntityTypeEnumFilterInput {
oneOf: [AttributeEntityTypeEnum!]
}
-input AttributeTypeEnumFilterInput {
+input AttributeTypeEnumFilterInput @doc(category: "Attributes") {
"""The value equal to."""
eq: AttributeTypeEnum
@@ -5848,7 +5854,7 @@ input AttributeTypeEnumFilterInput {
oneOf: [AttributeTypeEnum!]
}
-input MeasurementUnitsEnumFilterInput {
+input MeasurementUnitsEnumFilterInput @doc(category: "Attributes") {
"""The value equal to."""
eq: MeasurementUnitsEnum
@@ -5859,7 +5865,7 @@ input MeasurementUnitsEnumFilterInput {
"""
Represents a single category of products. Categories allow to organize products in a tree-hierarchies which can be used for navigation in the storefront.
"""
-type Category implements Node & ObjectWithMetadata {
+type Category implements Node & ObjectWithMetadata @doc(category: "Products") {
id: ID!
"""List of private metadata items. Requires staff permissions to access."""
@@ -6094,7 +6100,7 @@ input ProductFilterInput {
channel: String
}
-input AttributeInput {
+input AttributeInput @doc(category: "Attributes") {
"""Internal representation of an attribute name."""
slug: String!
@@ -6140,7 +6146,7 @@ input DateRangeInput {
lte: Date
}
-enum StockAvailability {
+enum StockAvailability @doc(category: "Products") {
IN_STOCK
OUT_OF_STOCK
}
@@ -6158,7 +6164,7 @@ input PriceRangeInput {
lte: Float
}
-input ProductOrder {
+input ProductOrder @doc(category: "Products") {
"""Specifies the direction in which to sort products."""
direction: OrderDirection!
@@ -6179,7 +6185,7 @@ input ProductOrder {
field: ProductOrderField
}
-enum ProductOrderField {
+enum ProductOrderField @doc(category: "Products") {
"""Sort products by name."""
NAME
@@ -6294,7 +6300,7 @@ type CategoryTranslation implements Node {
}
"""Represents a version of a product such as different size or color."""
-type ProductVariant implements Node & ObjectWithMetadata {
+type ProductVariant implements Node & ObjectWithMetadata @doc(category: "Products") {
id: ID!
"""List of private metadata items. Requires staff permissions to access."""
@@ -6577,7 +6583,7 @@ input AddressInput {
}
"""Represents a custom attribute."""
-type SelectedAttribute {
+type SelectedAttribute @doc(category: "Attributes") {
"""Name of an attribute displayed in the interface."""
attribute: Attribute!
@@ -6620,7 +6626,7 @@ type ProductImage {
}
"""Represents a product media."""
-type ProductMedia implements Node & ObjectWithMetadata {
+type ProductMedia implements Node & ObjectWithMetadata @doc(category: "Products") {
id: ID!
"""
@@ -6799,7 +6805,7 @@ type DigitalContentUrl implements Node {
scalar UUID
"""Represents stock."""
-type Stock implements Node {
+type Stock implements Node @doc(category: "Products") {
id: ID!
warehouse: Warehouse!
productVariant: ProductVariant!
@@ -6946,7 +6952,7 @@ type Margin {
stop: Int
}
-input MediaSortingInput {
+input MediaSortingInput @doc(category: "Products") {
"""Specifies the direction in which to sort products."""
direction: OrderDirection!
@@ -6954,13 +6960,13 @@ input MediaSortingInput {
field: MediaChoicesSortField!
}
-enum MediaChoicesSortField {
+enum MediaChoicesSortField @doc(category: "Products") {
"""Sort media by ID."""
ID
}
"""Represents a collection of products."""
-type Collection implements Node & ObjectWithMetadata {
+type Collection implements Node & ObjectWithMetadata @doc(category: "Products") {
id: ID!
"""List of private metadata items. Requires staff permissions to access."""
@@ -7203,7 +7209,7 @@ type TranslatableItemEdge {
union TranslatableItem = ProductTranslatableContent | CollectionTranslatableContent | CategoryTranslatableContent | AttributeTranslatableContent | AttributeValueTranslatableContent | ProductVariantTranslatableContent | PageTranslatableContent | ShippingMethodTranslatableContent | SaleTranslatableContent | VoucherTranslatableContent | MenuItemTranslatableContent
-type ProductTranslatableContent implements Node {
+type ProductTranslatableContent implements Node @doc(category: "Products") {
id: ID!
seoTitle: String
seoDescription: String
@@ -7236,7 +7242,7 @@ type ProductTranslatableContent implements Node {
attributeValues: [AttributeValueTranslatableContent!]!
}
-type AttributeValueTranslatableContent implements Node {
+type AttributeValueTranslatableContent implements Node @doc(category: "Attributes") {
id: ID!
name: String!
@@ -7267,7 +7273,7 @@ type AttributeValueTranslatableContent implements Node {
attribute: AttributeTranslatableContent
}
-type AttributeTranslatableContent implements Node {
+type AttributeTranslatableContent implements Node @doc(category: "Attributes") {
id: ID!
name: String!
@@ -7281,7 +7287,7 @@ type AttributeTranslatableContent implements Node {
attribute: Attribute @deprecated(reason: "This field will be removed in Saleor 4.0. Get model fields from the root level queries.")
}
-type CollectionTranslatableContent implements Node {
+type CollectionTranslatableContent implements Node @doc(category: "Products") {
id: ID!
seoTitle: String
seoDescription: String
@@ -7311,7 +7317,7 @@ type CollectionTranslatableContent implements Node {
collection: Collection @deprecated(reason: "This field will be removed in Saleor 4.0. Get model fields from the root level queries.")
}
-type CategoryTranslatableContent implements Node {
+type CategoryTranslatableContent implements Node @doc(category: "Products") {
id: ID!
seoTitle: String
seoDescription: String
@@ -7341,7 +7347,7 @@ type CategoryTranslatableContent implements Node {
category: Category @deprecated(reason: "This field will be removed in Saleor 4.0. Get model fields from the root level queries.")
}
-type ProductVariantTranslatableContent implements Node {
+type ProductVariantTranslatableContent implements Node @doc(category: "Products") {
id: ID!
name: String!
@@ -7358,7 +7364,7 @@ type ProductVariantTranslatableContent implements Node {
attributeValues: [AttributeValueTranslatableContent!]!
}
-type PageTranslatableContent implements Node {
+type PageTranslatableContent implements Node @doc(category: "Pages") {
id: ID!
seoTitle: String
seoDescription: String
@@ -7420,7 +7426,7 @@ type PageTranslation implements Node {
"""
A static page that can be manually added by a shop operator through the dashboard.
"""
-type Page implements Node & ObjectWithMetadata {
+type Page implements Node & ObjectWithMetadata @doc(category: "Pages") {
id: ID!
"""List of private metadata items. Requires staff permissions to access."""
@@ -7511,7 +7517,7 @@ type Page implements Node & ObjectWithMetadata {
"""
Represents a type of page. It defines what attributes are available to pages of this type.
"""
-type PageType implements Node & ObjectWithMetadata {
+type PageType implements Node & ObjectWithMetadata @doc(category: "Pages") {
id: ID!
"""List of private metadata items. Requires staff permissions to access."""
@@ -7595,7 +7601,7 @@ type PageType implements Node & ObjectWithMetadata {
hasPages: Boolean
}
-type ShippingMethodTranslatableContent implements Node {
+type ShippingMethodTranslatableContent implements Node @doc(category: "Shipping") {
id: ID!
name: String!
@@ -7620,7 +7626,7 @@ type ShippingMethodTranslatableContent implements Node {
shippingMethod: ShippingMethodType @deprecated(reason: "This field will be removed in Saleor 4.0. Get model fields from the root level queries.")
}
-type SaleTranslatableContent implements Node {
+type SaleTranslatableContent implements Node @doc(category: "Discounts") {
id: ID!
name: String!
@@ -7649,7 +7655,7 @@ type SaleTranslation implements Node {
"""
Sales allow creating discounts for categories, collections or products and are visible to all the customers.
"""
-type Sale implements Node & ObjectWithMetadata {
+type Sale implements Node & ObjectWithMetadata @doc(category: "Discounts") {
id: ID!
"""List of private metadata items. Requires staff permissions to access."""
@@ -7845,7 +7851,7 @@ type SaleChannelListing implements Node {
currency: String!
}
-type VoucherTranslatableContent implements Node {
+type VoucherTranslatableContent implements Node @doc(category: "Discounts") {
id: ID!
name: String
@@ -7874,7 +7880,7 @@ type VoucherTranslation implements Node {
"""
Vouchers allow giving discounts to particular customers on categories, collections or specific products. They can be used during checkout by providing valid voucher codes.
"""
-type Voucher implements Node & ObjectWithMetadata {
+type Voucher implements Node & ObjectWithMetadata @doc(category: "Discounts") {
id: ID!
"""List of private metadata items. Requires staff permissions to access."""
@@ -8051,7 +8057,7 @@ enum VoucherTypeEnum {
}
"""Represents voucher channel listing."""
-type VoucherChannelListing implements Node {
+type VoucherChannelListing implements Node @doc(category: "Discounts") {
id: ID!
channel: Channel!
discountValue: Float!
@@ -8238,7 +8244,7 @@ Added in Saleor 3.9.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type TaxConfiguration implements Node & ObjectWithMetadata {
+type TaxConfiguration implements Node & ObjectWithMetadata @doc(category: "Taxes") {
"""The ID of the object."""
id: ID!
@@ -8323,7 +8329,7 @@ Added in Saleor 3.9.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type TaxConfigurationPerCountry {
+type TaxConfigurationPerCountry @doc(category: "Taxes") {
"""Country in which this configuration applies."""
country: CountryDisplay!
@@ -8341,7 +8347,7 @@ type TaxConfigurationPerCountry {
displayGrossPrices: Boolean!
}
-type TaxConfigurationCountableConnection {
+type TaxConfigurationCountableConnection @doc(category: "Taxes") {
"""Pagination data for this connection."""
pageInfo: PageInfo!
edges: [TaxConfigurationCountableEdge!]!
@@ -8358,12 +8364,12 @@ type TaxConfigurationCountableEdge {
cursor: String!
}
-input TaxConfigurationFilterInput {
+input TaxConfigurationFilterInput @doc(category: "Taxes") {
metadata: [MetadataFilter!]
ids: [ID!]
}
-type TaxClassCountableConnection {
+type TaxClassCountableConnection @doc(category: "Taxes") {
"""Pagination data for this connection."""
pageInfo: PageInfo!
edges: [TaxClassCountableEdge!]!
@@ -8380,7 +8386,7 @@ type TaxClassCountableEdge {
cursor: String!
}
-input TaxClassSortingInput {
+input TaxClassSortingInput @doc(category: "Taxes") {
"""Specifies the direction in which to sort products."""
direction: OrderDirection!
@@ -8388,12 +8394,12 @@ input TaxClassSortingInput {
field: TaxClassSortField!
}
-enum TaxClassSortField {
+enum TaxClassSortField @doc(category: "Taxes") {
"""Sort tax classes by name."""
NAME
}
-input TaxClassFilterInput {
+input TaxClassFilterInput @doc(category: "Taxes") {
metadata: [MetadataFilter!]
ids: [ID!]
countries: [CountryCode!]
@@ -8406,7 +8412,7 @@ Added in Saleor 3.9.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type TaxCountryConfiguration {
+type TaxCountryConfiguration @doc(category: "Taxes") {
"""A country for which tax class rates are grouped."""
country: CountryDisplay!
@@ -8724,7 +8730,7 @@ type StaffNotificationRecipient implements Node {
}
"""Represents user data."""
-type User implements Node & ObjectWithMetadata {
+type User implements Node & ObjectWithMetadata @doc(category: "Users") {
id: ID!
"""List of private metadata items. Requires staff permissions to access."""
@@ -8911,7 +8917,7 @@ type User implements Node & ObjectWithMetadata {
}
"""Checkout object."""
-type Checkout implements Node & ObjectWithMetadata {
+type Checkout implements Node & ObjectWithMetadata @doc(category: "Checkout") {
id: ID!
"""List of private metadata items. Requires staff permissions to access."""
@@ -9073,7 +9079,7 @@ type Checkout implements Node & ObjectWithMetadata {
"""
A gift card is a prepaid electronic payment card accepted in stores. They can be used during checkout by providing a valid gift card codes.
"""
-type GiftCard implements Node & ObjectWithMetadata {
+type GiftCard implements Node & ObjectWithMetadata @doc(category: "Gift cards") {
id: ID!
"""List of private metadata items. Requires staff permissions to access."""
@@ -9337,13 +9343,13 @@ Added in Saleor 3.1.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type GiftCardTag implements Node {
+type GiftCardTag implements Node @doc(category: "Gift cards") {
id: ID!
name: String!
}
"""Represents an item in the checkout."""
-type CheckoutLine implements Node & ObjectWithMetadata {
+type CheckoutLine implements Node & ObjectWithMetadata @doc(category: "Checkout") {
id: ID!
"""
@@ -9438,7 +9444,7 @@ Added in Saleor 3.4.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type TransactionItem implements Node & ObjectWithMetadata {
+type TransactionItem implements Node & ObjectWithMetadata @doc(category: "Payments") {
"""The ID of the object."""
id: ID!
@@ -9542,7 +9548,7 @@ enum TransactionActionEnum {
}
"""Represents an order in the shop."""
-type Order implements Node & ObjectWithMetadata {
+type Order implements Node & ObjectWithMetadata @doc(category: "Orders") {
id: ID!
"""List of private metadata items. Requires staff permissions to access."""
@@ -9862,7 +9868,7 @@ enum OrderStatus {
}
"""Represents order fulfillment."""
-type Fulfillment implements Node & ObjectWithMetadata {
+type Fulfillment implements Node & ObjectWithMetadata @doc(category: "Orders") {
id: ID!
"""List of private metadata items. Requires staff permissions to access."""
@@ -9937,14 +9943,14 @@ enum FulfillmentStatus {
}
"""Represents line of the fulfillment."""
-type FulfillmentLine implements Node {
+type FulfillmentLine implements Node @doc(category: "Orders") {
id: ID!
quantity: Int!
orderLine: OrderLine
}
"""Represents order line of particular order."""
-type OrderLine implements Node & ObjectWithMetadata {
+type OrderLine implements Node & ObjectWithMetadata @doc(category: "Orders") {
id: ID!
"""
@@ -10307,7 +10313,7 @@ enum OrderChargeStatusEnum {
}
"""Represents a payment of a given type."""
-type Payment implements Node & ObjectWithMetadata {
+type Payment implements Node & ObjectWithMetadata @doc(category: "Payments") {
id: ID!
"""List of private metadata items. Requires staff permissions to access."""
@@ -10413,7 +10419,7 @@ type Payment implements Node & ObjectWithMetadata {
}
"""An object representing a single payment."""
-type Transaction implements Node {
+type Transaction implements Node @doc(category: "Payments") {
id: ID!
created: DateTime!
payment: Payment!
@@ -10459,7 +10465,7 @@ type CreditCard {
}
"""History log of the order."""
-type OrderEvent implements Node {
+type OrderEvent implements Node @doc(category: "Orders") {
id: ID!
"""Date when event happened at in ISO 8601 format."""
@@ -10645,7 +10651,7 @@ enum TransactionStatus {
}
"""Contains all details related to the applied discount to the order."""
-type OrderDiscount implements Node {
+type OrderDiscount implements Node @doc(category: "Discounts") {
id: ID!
type: OrderDiscountType!
name: String
@@ -10742,7 +10748,7 @@ enum AddressTypeEnum {
}
"""Represents transaction's event."""
-type TransactionEvent implements Node {
+type TransactionEvent implements Node @doc(category: "Payments") {
"""The ID of the object."""
id: ID!
createdAt: DateTime!
@@ -10808,7 +10814,8 @@ type OrderCountableEdge {
cursor: String!
}
-type UserPermission {
+"""Represents user's permissions."""
+type UserPermission @doc(category: "Users") {
"""Internal code for permission."""
code: PermissionEnum!
@@ -10823,7 +10830,7 @@ type UserPermission {
}
"""Represents permission group data."""
-type Group implements Node {
+type Group implements Node @doc(category: "Users") {
id: ID!
name: String!
@@ -10844,7 +10851,7 @@ type Group implements Node {
}
"""History log of the customer."""
-type CustomerEvent implements Node {
+type CustomerEvent implements Node @doc(category: "Users") {
id: ID!
"""Date when event happened at in ISO 8601 format."""
@@ -10990,7 +10997,7 @@ input CategoryFilterInput {
slugs: [String!]
}
-input CategorySortingInput {
+input CategorySortingInput @doc(category: "Products") {
"""Specifies the direction in which to sort products."""
direction: OrderDirection!
@@ -11005,7 +11012,7 @@ input CategorySortingInput {
field: CategorySortField!
}
-enum CategorySortField {
+enum CategorySortField @doc(category: "Products") {
"""Sort categories by name."""
NAME
@@ -11031,12 +11038,12 @@ input CollectionFilterInput {
channel: String
}
-enum CollectionPublished {
+enum CollectionPublished @doc(category: "Products") {
PUBLISHED
HIDDEN
}
-input CollectionSortingInput {
+input CollectionSortingInput @doc(category: "Products") {
"""Specifies the direction in which to sort products."""
direction: OrderDirection!
@@ -11051,7 +11058,7 @@ input CollectionSortingInput {
field: CollectionSortField!
}
-enum CollectionSortField {
+enum CollectionSortField @doc(category: "Products") {
"""Sort collections by name."""
NAME
@@ -11090,17 +11097,17 @@ input ProductTypeFilterInput {
slugs: [String!]
}
-enum ProductTypeConfigurable {
+enum ProductTypeConfigurable @doc(category: "Products") {
CONFIGURABLE
SIMPLE
}
-enum ProductTypeEnum {
+enum ProductTypeEnum @doc(category: "Products") {
DIGITAL
SHIPPABLE
}
-input ProductTypeSortingInput {
+input ProductTypeSortingInput @doc(category: "Products") {
"""Specifies the direction in which to sort products."""
direction: OrderDirection!
@@ -11108,7 +11115,7 @@ input ProductTypeSortingInput {
field: ProductTypeSortField!
}
-enum ProductTypeSortField {
+enum ProductTypeSortField @doc(category: "Products") {
"""Sort products by name."""
NAME
@@ -11127,7 +11134,7 @@ input ProductVariantFilterInput {
updatedAt: DateTimeRangeInput
}
-input ProductVariantSortingInput {
+input ProductVariantSortingInput @doc(category: "Products") {
"""Specifies the direction in which to sort products."""
direction: OrderDirection!
@@ -11135,7 +11142,7 @@ input ProductVariantSortingInput {
field: ProductVariantSortField!
}
-enum ProductVariantSortField {
+enum ProductVariantSortField @doc(category: "Products") {
"""Sort products variants by last modified at."""
LAST_MODIFIED_AT
}
@@ -11338,7 +11345,7 @@ enum OrderSortField {
FULFILLMENT_STATUS
}
-input OrderFilterInput {
+input OrderFilterInput @doc(category: "Orders") {
paymentStatus: [PaymentChargeStatusEnum!]
status: [OrderStatusFilter!]
customer: String
@@ -11368,7 +11375,7 @@ enum OrderStatusFilter {
CANCELED
}
-input OrderDraftFilterInput {
+input OrderDraftFilterInput @doc(category: "Orders") {
customer: String
created: DateRangeInput
search: String
@@ -11913,7 +11920,7 @@ type CheckoutLineCountableEdge {
cursor: String!
}
-input AttributeSortingInput {
+input AttributeSortingInput @doc(category: "Attributes") {
"""Specifies the direction in which to sort products."""
direction: OrderDirection!
@@ -11921,7 +11928,7 @@ input AttributeSortingInput {
field: AttributeSortField!
}
-enum AttributeSortField {
+enum AttributeSortField @doc(category: "Attributes") {
"""Sort attributes by name"""
NAME
@@ -11953,7 +11960,7 @@ enum AttributeSortField {
}
"""Represents ongoing installation of app."""
-type AppInstallation implements Node & Job {
+type AppInstallation implements Node & Job @doc(category: "Apps") {
id: ID!
"""Job status."""
@@ -11971,7 +11978,7 @@ type AppInstallation implements Node & Job {
manifestUrl: String!
}
-type AppCountableConnection {
+type AppCountableConnection @doc(category: "Apps") {
"""Pagination data for this connection."""
pageInfo: PageInfo!
edges: [AppCountableEdge!]!
@@ -11988,13 +11995,13 @@ type AppCountableEdge {
cursor: String!
}
-input AppFilterInput {
+input AppFilterInput @doc(category: "Apps") {
search: String
isActive: Boolean
type: AppTypeEnum
}
-input AppSortingInput {
+input AppSortingInput @doc(category: "Apps") {
"""Specifies the direction in which to sort products."""
direction: OrderDirection!
@@ -12002,7 +12009,7 @@ input AppSortingInput {
field: AppSortField!
}
-enum AppSortField {
+enum AppSortField @doc(category: "Apps") {
"""Sort apps by name."""
NAME
@@ -12010,7 +12017,7 @@ enum AppSortField {
CREATION_DATE
}
-type AppExtensionCountableConnection {
+type AppExtensionCountableConnection @doc(category: "Apps") {
"""Pagination data for this connection."""
pageInfo: PageInfo!
edges: [AppExtensionCountableEdge!]!
@@ -12027,12 +12034,13 @@ type AppExtensionCountableEdge {
cursor: String!
}
-input AppExtensionFilterInput {
+input AppExtensionFilterInput @doc(category: "Apps") {
mount: [AppExtensionMountEnum!]
target: AppExtensionTargetEnum
}
-type AddressValidationData {
+"""Represents address validation rules for a country."""
+type AddressValidationData @doc(category: "Users") {
countryCode: String!
countryName: String!
addressFormat: String!
@@ -12057,7 +12065,7 @@ type ChoiceValue {
verbose: String
}
-type UserCountableConnection {
+type UserCountableConnection @doc(category: "Users") {
"""Pagination data for this connection."""
pageInfo: PageInfo!
edges: [UserCountableEdge!]!
@@ -12074,7 +12082,7 @@ type UserCountableEdge {
cursor: String!
}
-input CustomerFilterInput {
+input CustomerFilterInput @doc(category: "Users") {
dateJoined: DateRangeInput
numberOfOrders: IntRangeInput
placedOrders: DateRangeInput
@@ -12090,7 +12098,7 @@ input CustomerFilterInput {
updatedAt: DateTimeRangeInput
}
-input UserSortingInput {
+input UserSortingInput @doc(category: "Users") {
"""Specifies the direction in which to sort products."""
direction: OrderDirection!
@@ -12098,7 +12106,7 @@ input UserSortingInput {
field: UserSortField!
}
-enum UserSortField {
+enum UserSortField @doc(category: "Users") {
"""Sort users by first name."""
FIRST_NAME
@@ -12118,7 +12126,7 @@ enum UserSortField {
LAST_MODIFIED_AT
}
-type GroupCountableConnection {
+type GroupCountableConnection @doc(category: "Users") {
"""Pagination data for this connection."""
pageInfo: PageInfo!
edges: [GroupCountableEdge!]!
@@ -12135,12 +12143,12 @@ type GroupCountableEdge {
cursor: String!
}
-input PermissionGroupFilterInput {
+input PermissionGroupFilterInput @doc(category: "Users") {
search: String
ids: [ID!]
}
-input PermissionGroupSortingInput {
+input PermissionGroupSortingInput @doc(category: "Users") {
"""Specifies the direction in which to sort products."""
direction: OrderDirection!
@@ -12148,18 +12156,20 @@ input PermissionGroupSortingInput {
field: PermissionGroupSortField!
}
-enum PermissionGroupSortField {
+"""Sorting options for permission groups."""
+enum PermissionGroupSortField @doc(category: "Users") {
"""Sort permission group accounts by name."""
NAME
}
-input StaffUserInput {
+input StaffUserInput @doc(category: "Users") {
status: StaffMemberStatus
search: String
ids: [ID!]
}
-enum StaffMemberStatus {
+"""Represents status of a staff account."""
+enum StaffMemberStatus @doc(category: "Users") {
"""User account has been activated."""
ACTIVE
@@ -12176,7 +12186,7 @@ type Mutation {
webhookCreate(
"""Fields required to create a webhook."""
input: WebhookCreateInput!
- ): WebhookCreate
+ ): WebhookCreate @doc(category: "Webhooks")
"""
Delete a webhook. Before the deletion, the webhook is deactivated to pause any deliveries that are already scheduled. The deletion might fail if delivery is in progress. In such a case, the webhook is not deleted but remains deactivated.
@@ -12186,7 +12196,7 @@ type Mutation {
webhookDelete(
"""ID of a webhook to delete."""
id: ID!
- ): WebhookDelete
+ ): WebhookDelete @doc(category: "Webhooks")
"""
Updates a webhook subscription.
@@ -12199,7 +12209,7 @@ type Mutation {
"""Fields required to update a webhook."""
input: WebhookUpdateInput!
- ): WebhookUpdate
+ ): WebhookUpdate @doc(category: "Webhooks")
"""
Retries event delivery.
@@ -12209,7 +12219,7 @@ type Mutation {
eventDeliveryRetry(
"""ID of the event delivery to retry."""
id: ID!
- ): EventDeliveryRetry
+ ): EventDeliveryRetry @doc(category: "Webhooks")
"""
Performs a dry run of a webhook event. Supports a single event (the first, if multiple provided in the `query`). Requires permission relevant to processed event.
@@ -12226,7 +12236,7 @@ type Mutation {
"""The subscription query that defines the webhook event and its payload."""
query: String!
- ): WebhookDryRun
+ ): WebhookDryRun @doc(category: "Webhooks")
"""
Trigger a webhook event. Supports a single event (the first, if multiple provided in the `webhook.subscription_query`). Requires permission relevant to processed event. Successfully delivered webhook returns `delivery` with status='PENDING' and empty payload.
@@ -12243,7 +12253,7 @@ type Mutation {
"""The ID of the webhook."""
webhookId: ID!
- ): WebhookTrigger
+ ): WebhookTrigger @doc(category: "Webhooks")
"""
Creates new warehouse.
@@ -12253,7 +12263,7 @@ type Mutation {
createWarehouse(
"""Fields required to create warehouse."""
input: WarehouseCreateInput!
- ): WarehouseCreate
+ ): WarehouseCreate @doc(category: "Products")
"""
Updates given warehouse.
@@ -12266,7 +12276,7 @@ type Mutation {
"""Fields required to update warehouse."""
input: WarehouseUpdateInput!
- ): WarehouseUpdate
+ ): WarehouseUpdate @doc(category: "Products")
"""
Deletes selected warehouse.
@@ -12276,7 +12286,7 @@ type Mutation {
deleteWarehouse(
"""ID of a warehouse to delete."""
id: ID!
- ): WarehouseDelete
+ ): WarehouseDelete @doc(category: "Products")
"""
Add shipping zone to given warehouse.
@@ -12289,7 +12299,7 @@ type Mutation {
"""List of shipping zone IDs."""
shippingZoneIds: [ID!]!
- ): WarehouseShippingZoneAssign
+ ): WarehouseShippingZoneAssign @doc(category: "Products")
"""
Remove shipping zone from given warehouse.
@@ -12302,7 +12312,7 @@ type Mutation {
"""List of shipping zone IDs."""
shippingZoneIds: [ID!]!
- ): WarehouseShippingZoneUnassign
+ ): WarehouseShippingZoneUnassign @doc(category: "Products")
"""
Create a tax class.
@@ -12316,7 +12326,7 @@ type Mutation {
taxClassCreate(
"""Fields required to create a tax class."""
input: TaxClassCreateInput!
- ): TaxClassCreate
+ ): TaxClassCreate @doc(category: "Taxes")
"""
Delete a tax class. After deleting the tax class any products, product types or shipping methods using it are updated to use the default tax class.
@@ -12330,7 +12340,7 @@ type Mutation {
taxClassDelete(
"""ID of a tax class to delete."""
id: ID!
- ): TaxClassDelete
+ ): TaxClassDelete @doc(category: "Taxes")
"""
Update a tax class.
@@ -12347,7 +12357,7 @@ type Mutation {
"""Fields required to update a tax class."""
input: TaxClassUpdateInput!
- ): TaxClassUpdate
+ ): TaxClassUpdate @doc(category: "Taxes")
"""
Update tax configuration for a channel.
@@ -12364,7 +12374,7 @@ type Mutation {
"""Fields required to update the tax configuration."""
input: TaxConfigurationUpdateInput!
- ): TaxConfigurationUpdate
+ ): TaxConfigurationUpdate @doc(category: "Taxes")
"""
Update tax class rates for a specific country.
@@ -12383,7 +12393,7 @@ type Mutation {
List of tax rates per tax class to update. When `{taxClass: id, rate: null`} is passed, it deletes the rate object for given taxClass ID. When `{rate: Int}` is passed without a tax class, it updates the default tax class for this country.
"""
updateTaxClassRates: [TaxClassRateInput!]!
- ): TaxCountryConfigurationUpdate
+ ): TaxCountryConfigurationUpdate @doc(category: "Taxes")
"""
Remove all tax class rates for a specific country.
@@ -12397,7 +12407,7 @@ type Mutation {
taxCountryConfigurationDelete(
"""Country in which to update the tax class rates."""
countryCode: CountryCode!
- ): TaxCountryConfigurationDelete
+ ): TaxCountryConfigurationDelete @doc(category: "Taxes")
"""
Exempt checkout or order from charging the taxes. When tax exemption is enabled, taxes won't be charged for the checkout or order. Taxes may still be calculated in cases when product prices are entered with the tax included and the net price needs to be known.
@@ -12414,7 +12424,7 @@ type Mutation {
"""Determines if a taxes should be exempt."""
taxExemption: Boolean!
- ): TaxExemptionManage
+ ): TaxExemptionManage @doc(category: "Taxes")
"""
Updates stocks for a given variant and warehouse.
@@ -12431,7 +12441,7 @@ type Mutation {
"""Input list of stocks to update."""
stocks: [StockBulkUpdateInput!]!
- ): StockBulkUpdate
+ ): StockBulkUpdate @doc(category: "Products")
"""
Creates a new staff notification recipient.
@@ -12441,7 +12451,7 @@ type Mutation {
staffNotificationRecipientCreate(
"""Fields required to create a staff notification recipient."""
input: StaffNotificationRecipientInput!
- ): StaffNotificationRecipientCreate
+ ): StaffNotificationRecipientCreate @doc(category: "Users")
"""
Updates a staff notification recipient.
@@ -12454,7 +12464,7 @@ type Mutation {
"""Fields required to update a staff notification recipient."""
input: StaffNotificationRecipientInput!
- ): StaffNotificationRecipientUpdate
+ ): StaffNotificationRecipientUpdate @doc(category: "Users")
"""
Delete staff notification recipient.
@@ -12464,7 +12474,7 @@ type Mutation {
staffNotificationRecipientDelete(
"""ID of a staff notification recipient to delete."""
id: ID!
- ): StaffNotificationRecipientDelete
+ ): StaffNotificationRecipientDelete @doc(category: "Users")
"""
Updates site domain of the shop.
@@ -12524,7 +12534,7 @@ type Mutation {
orderSettingsUpdate(
"""Fields required to update shop order settings."""
input: OrderSettingsUpdateInput!
- ): OrderSettingsUpdate @deprecated(reason: "\\n\\nDEPRECATED: this mutation will be removed in Saleor 4.0. Use `channelUpdate` mutation instead.")
+ ): OrderSettingsUpdate @doc(category: "Orders") @deprecated(reason: "\\n\\nDEPRECATED: this mutation will be removed in Saleor 4.0. Use `channelUpdate` mutation instead.")
"""
Update gift card settings.
@@ -12534,7 +12544,7 @@ type Mutation {
giftCardSettingsUpdate(
"""Fields required to update gift card settings."""
input: GiftCardSettingsUpdateInput!
- ): GiftCardSettingsUpdate
+ ): GiftCardSettingsUpdate @doc(category: "Gift cards")
"""
Manage shipping method's availability in channels.
@@ -12557,7 +12567,7 @@ type Mutation {
shippingPriceCreate(
"""Fields required to create a shipping price."""
input: ShippingPriceInput!
- ): ShippingPriceCreate
+ ): ShippingPriceCreate @doc(category: "Shipping")
"""
Deletes a shipping price.
@@ -12567,7 +12577,7 @@ type Mutation {
shippingPriceDelete(
"""ID of a shipping price to delete."""
id: ID!
- ): ShippingPriceDelete
+ ): ShippingPriceDelete @doc(category: "Shipping")
"""
Deletes shipping prices.
@@ -12577,7 +12587,7 @@ type Mutation {
shippingPriceBulkDelete(
"""List of shipping price IDs to delete."""
ids: [ID!]!
- ): ShippingPriceBulkDelete
+ ): ShippingPriceBulkDelete @doc(category: "Shipping")
"""
Updates a new shipping price.
@@ -12590,7 +12600,7 @@ type Mutation {
"""Fields required to update a shipping price."""
input: ShippingPriceInput!
- ): ShippingPriceUpdate
+ ): ShippingPriceUpdate @doc(category: "Shipping")
"""
Creates/updates translations for a shipping method.
@@ -12604,7 +12614,7 @@ type Mutation {
"""Translation language code."""
languageCode: LanguageCodeEnum!
- ): ShippingPriceTranslate
+ ): ShippingPriceTranslate @doc(category: "Shipping")
"""
Exclude products from shipping price.
@@ -12617,7 +12627,7 @@ type Mutation {
"""Exclude products input."""
input: ShippingPriceExcludeProductsInput!
- ): ShippingPriceExcludeProducts
+ ): ShippingPriceExcludeProducts @doc(category: "Shipping")
"""
Remove product from excluded list for shipping price.
@@ -12630,7 +12640,7 @@ type Mutation {
"""List of products which will be removed from excluded list."""
products: [ID!]!
- ): ShippingPriceRemoveProductFromExclude
+ ): ShippingPriceRemoveProductFromExclude @doc(category: "Shipping")
"""
Creates a new shipping zone.
@@ -12640,7 +12650,7 @@ type Mutation {
shippingZoneCreate(
"""Fields required to create a shipping zone."""
input: ShippingZoneCreateInput!
- ): ShippingZoneCreate
+ ): ShippingZoneCreate @doc(category: "Shipping")
"""
Deletes a shipping zone.
@@ -12650,7 +12660,7 @@ type Mutation {
shippingZoneDelete(
"""ID of a shipping zone to delete."""
id: ID!
- ): ShippingZoneDelete
+ ): ShippingZoneDelete @doc(category: "Shipping")
"""
Deletes shipping zones.
@@ -12660,7 +12670,7 @@ type Mutation {
shippingZoneBulkDelete(
"""List of shipping zone IDs to delete."""
ids: [ID!]!
- ): ShippingZoneBulkDelete
+ ): ShippingZoneBulkDelete @doc(category: "Shipping")
"""
Updates a new shipping zone.
@@ -12673,7 +12683,7 @@ type Mutation {
"""Fields required to update a shipping zone."""
input: ShippingZoneUpdateInput!
- ): ShippingZoneUpdate
+ ): ShippingZoneUpdate @doc(category: "Shipping")
"""
Assign attributes to a given product type.
@@ -12686,7 +12696,7 @@ type Mutation {
"""ID of the product type to assign the attributes into."""
productTypeId: ID!
- ): ProductAttributeAssign
+ ): ProductAttributeAssign @doc(category: "Products")
"""
Update attributes assigned to product variant for given product type.
@@ -12701,7 +12711,7 @@ type Mutation {
"""ID of the product type to assign the attributes into."""
productTypeId: ID!
- ): ProductAttributeAssignmentUpdate
+ ): ProductAttributeAssignmentUpdate @doc(category: "Products")
"""
Un-assign attributes from a given product type.
@@ -12714,7 +12724,7 @@ type Mutation {
"""ID of the product type from which the attributes should be unassigned."""
productTypeId: ID!
- ): ProductAttributeUnassign
+ ): ProductAttributeUnassign @doc(category: "Products")
"""
Creates a new category.
@@ -12729,7 +12739,7 @@ type Mutation {
ID of the parent category. If empty, category will be top level category.
"""
parent: ID
- ): CategoryCreate
+ ): CategoryCreate @doc(category: "Products")
"""
Deletes a category.
@@ -12739,7 +12749,7 @@ type Mutation {
categoryDelete(
"""ID of a category to delete."""
id: ID!
- ): CategoryDelete
+ ): CategoryDelete @doc(category: "Products")
"""
Deletes categories.
@@ -12749,7 +12759,7 @@ type Mutation {
categoryBulkDelete(
"""List of category IDs to delete."""
ids: [ID!]!
- ): CategoryBulkDelete
+ ): CategoryBulkDelete @doc(category: "Products")
"""
Updates a category.
@@ -12762,7 +12772,7 @@ type Mutation {
"""Fields required to update a category."""
input: CategoryInput!
- ): CategoryUpdate
+ ): CategoryUpdate @doc(category: "Products")
"""
Creates/updates translations for a category.
@@ -12776,7 +12786,7 @@ type Mutation {
"""Translation language code."""
languageCode: LanguageCodeEnum!
- ): CategoryTranslate
+ ): CategoryTranslate @doc(category: "Products")
"""
Adds products to a collection.
@@ -12789,7 +12799,7 @@ type Mutation {
"""List of product IDs."""
products: [ID!]!
- ): CollectionAddProducts
+ ): CollectionAddProducts @doc(category: "Products")
"""
Creates a new collection.
@@ -12799,7 +12809,7 @@ type Mutation {
collectionCreate(
"""Fields required to create a collection."""
input: CollectionCreateInput!
- ): CollectionCreate
+ ): CollectionCreate @doc(category: "Products")
"""
Deletes a collection.
@@ -12809,7 +12819,7 @@ type Mutation {
collectionDelete(
"""ID of a collection to delete."""
id: ID!
- ): CollectionDelete
+ ): CollectionDelete @doc(category: "Products")
"""
Reorder the products of a collection.
@@ -12822,7 +12832,7 @@ type Mutation {
"""The collection products position operations."""
moves: [MoveProductInput!]!
- ): CollectionReorderProducts
+ ): CollectionReorderProducts @doc(category: "Products")
"""
Deletes collections.
@@ -12832,7 +12842,7 @@ type Mutation {
collectionBulkDelete(
"""List of collection IDs to delete."""
ids: [ID!]!
- ): CollectionBulkDelete
+ ): CollectionBulkDelete @doc(category: "Products")
"""
Remove products from a collection.
@@ -12845,7 +12855,7 @@ type Mutation {
"""List of product IDs."""
products: [ID!]!
- ): CollectionRemoveProducts
+ ): CollectionRemoveProducts @doc(category: "Products")
"""
Updates a collection.
@@ -12858,7 +12868,7 @@ type Mutation {
"""Fields required to update a collection."""
input: CollectionInput!
- ): CollectionUpdate
+ ): CollectionUpdate @doc(category: "Products")
"""
Creates/updates translations for a collection.
@@ -12872,7 +12882,7 @@ type Mutation {
"""Translation language code."""
languageCode: LanguageCodeEnum!
- ): CollectionTranslate
+ ): CollectionTranslate @doc(category: "Products")
"""
Manage collection's availability in channels.
@@ -12885,7 +12895,7 @@ type Mutation {
"""Fields required to create or update collection channel listings."""
input: CollectionChannelListingUpdateInput!
- ): CollectionChannelListingUpdate
+ ): CollectionChannelListingUpdate @doc(category: "Products")
"""
Creates a new product.
@@ -12895,7 +12905,7 @@ type Mutation {
productCreate(
"""Fields required to create a product."""
input: ProductCreateInput!
- ): ProductCreate
+ ): ProductCreate @doc(category: "Products")
"""
Deletes a product.
@@ -12912,7 +12922,7 @@ type Mutation {
"""ID of a product to delete."""
id: ID
- ): ProductDelete
+ ): ProductDelete @doc(category: "Products")
"""
Deletes products.
@@ -12922,7 +12932,7 @@ type Mutation {
productBulkDelete(
"""List of product IDs to delete."""
ids: [ID!]!
- ): ProductBulkDelete
+ ): ProductBulkDelete @doc(category: "Products")
"""
Updates an existing product.
@@ -12942,7 +12952,7 @@ type Mutation {
"""Fields required to update a product."""
input: ProductInput!
- ): ProductUpdate
+ ): ProductUpdate @doc(category: "Products")
"""
Creates/updates translations for a product.
@@ -12956,7 +12966,7 @@ type Mutation {
"""Translation language code."""
languageCode: LanguageCodeEnum!
- ): ProductTranslate
+ ): ProductTranslate @doc(category: "Products")
"""
Manage product's availability in channels.
@@ -12969,7 +12979,7 @@ type Mutation {
"""Fields required to create or update product channel listings."""
input: ProductChannelListingUpdateInput!
- ): ProductChannelListingUpdate
+ ): ProductChannelListingUpdate @doc(category: "Products")
"""
Create a media object (image or video URL) associated with product. For image, this mutation must be sent as a `multipart` request. More detailed specs of the upload format can be found here: https://github.com/jaydenseric/graphql-multipart-request-spec
@@ -12979,7 +12989,7 @@ type Mutation {
productMediaCreate(
"""Fields required to create a product media."""
input: ProductMediaCreateInput!
- ): ProductMediaCreate
+ ): ProductMediaCreate @doc(category: "Products")
"""
Reorder the variants of a product. Mutation updates updated_at on product and triggers PRODUCT_UPDATED webhook.
@@ -12992,7 +13002,7 @@ type Mutation {
"""Id of product that variants order will be altered."""
productId: ID!
- ): ProductVariantReorder
+ ): ProductVariantReorder @doc(category: "Products")
"""
Deletes a product media.
@@ -13002,7 +13012,7 @@ type Mutation {
productMediaDelete(
"""ID of a product media to delete."""
id: ID!
- ): ProductMediaDelete
+ ): ProductMediaDelete @doc(category: "Products")
"""
Deletes product media.
@@ -13012,7 +13022,7 @@ type Mutation {
productMediaBulkDelete(
"""List of product media IDs to delete."""
ids: [ID!]!
- ): ProductMediaBulkDelete
+ ): ProductMediaBulkDelete @doc(category: "Products")
"""
Changes ordering of the product media.
@@ -13025,7 +13035,7 @@ type Mutation {
"""ID of product that media order will be altered."""
productId: ID!
- ): ProductMediaReorder
+ ): ProductMediaReorder @doc(category: "Products")
"""
Updates a product media.
@@ -13038,7 +13048,7 @@ type Mutation {
"""Fields required to update a product media."""
input: ProductMediaUpdateInput!
- ): ProductMediaUpdate
+ ): ProductMediaUpdate @doc(category: "Products")
"""
Creates a new product type.
@@ -13048,7 +13058,7 @@ type Mutation {
productTypeCreate(
"""Fields required to create a product type."""
input: ProductTypeInput!
- ): ProductTypeCreate
+ ): ProductTypeCreate @doc(category: "Products")
"""
Deletes a product type.
@@ -13058,7 +13068,7 @@ type Mutation {
productTypeDelete(
"""ID of a product type to delete."""
id: ID!
- ): ProductTypeDelete
+ ): ProductTypeDelete @doc(category: "Products")
"""
Deletes product types.
@@ -13068,7 +13078,7 @@ type Mutation {
productTypeBulkDelete(
"""List of product type IDs to delete."""
ids: [ID!]!
- ): ProductTypeBulkDelete
+ ): ProductTypeBulkDelete @doc(category: "Products")
"""
Updates an existing product type.
@@ -13081,7 +13091,7 @@ type Mutation {
"""Fields required to update a product type."""
input: ProductTypeInput!
- ): ProductTypeUpdate
+ ): ProductTypeUpdate @doc(category: "Products")
"""
Reorder the attributes of a product type.
@@ -13097,7 +13107,7 @@ type Mutation {
"""The attribute type to reorder."""
type: ProductAttributeType!
- ): ProductTypeReorderAttributes
+ ): ProductTypeReorderAttributes @doc(category: "Products")
"""
Reorder product attribute values.
@@ -13113,7 +13123,7 @@ type Mutation {
"""ID of a product."""
productId: ID!
- ): ProductReorderAttributeValues
+ ): ProductReorderAttributeValues @doc(category: "Products")
"""
Create new digital content. This mutation must be sent as a `multipart` request. More detailed specs of the upload format can be found here: https://github.com/jaydenseric/graphql-multipart-request-spec
@@ -13126,7 +13136,7 @@ type Mutation {
"""ID of a product variant to upload digital content."""
variantId: ID!
- ): DigitalContentCreate
+ ): DigitalContentCreate @doc(category: "Products")
"""
Remove digital content assigned to given variant.
@@ -13136,7 +13146,7 @@ type Mutation {
digitalContentDelete(
"""ID of a product variant with digital content to remove."""
variantId: ID!
- ): DigitalContentDelete
+ ): DigitalContentDelete @doc(category: "Products")
"""
Update digital content.
@@ -13149,7 +13159,7 @@ type Mutation {
"""ID of a product variant with digital content to update."""
variantId: ID!
- ): DigitalContentUpdate
+ ): DigitalContentUpdate @doc(category: "Products")
"""
Generate new URL to digital content.
@@ -13169,7 +13179,7 @@ type Mutation {
productVariantCreate(
"""Fields required to create a product variant."""
input: ProductVariantCreateInput!
- ): ProductVariantCreate
+ ): ProductVariantCreate @doc(category: "Products")
"""
Deletes a product variant.
@@ -13193,7 +13203,7 @@ type Mutation {
Added in Saleor 3.8.
"""
sku: String
- ): ProductVariantDelete
+ ): ProductVariantDelete @doc(category: "Products")
"""
Creates product variants for a given product.
@@ -13215,7 +13225,7 @@ type Mutation {
"""Input list of product variants to create."""
variants: [ProductVariantBulkCreateInput!]!
- ): ProductVariantBulkCreate
+ ): ProductVariantBulkCreate @doc(category: "Products")
"""
Update multiple product variants.
@@ -13235,7 +13245,7 @@ type Mutation {
"""Input list of product variants to update."""
variants: [ProductVariantBulkUpdateInput!]!
- ): ProductVariantBulkUpdate
+ ): ProductVariantBulkUpdate @doc(category: "Products")
"""
Deletes product variants.
@@ -13252,7 +13262,7 @@ type Mutation {
Added in Saleor 3.8.
"""
skus: [String!]
- ): ProductVariantBulkDelete
+ ): ProductVariantBulkDelete @doc(category: "Products")
"""
Creates stocks for product variant.
@@ -13265,7 +13275,7 @@ type Mutation {
"""ID of a product variant for which stocks will be created."""
variantId: ID!
- ): ProductVariantStocksCreate
+ ): ProductVariantStocksCreate @doc(category: "Products")
"""
Delete stocks from product variant.
@@ -13281,7 +13291,7 @@ type Mutation {
"""Input list of warehouse IDs."""
warehouseIds: [ID!]
- ): ProductVariantStocksDelete
+ ): ProductVariantStocksDelete @doc(category: "Products")
"""
Update stocks for product variant.
@@ -13297,7 +13307,7 @@ type Mutation {
"""ID of a product variant for which stocks will be updated."""
variantId: ID
- ): ProductVariantStocksUpdate
+ ): ProductVariantStocksUpdate @doc(category: "Products")
"""
Updates an existing variant for product.
@@ -13324,7 +13334,7 @@ type Mutation {
Added in Saleor 3.8.
"""
sku: String
- ): ProductVariantUpdate
+ ): ProductVariantUpdate @doc(category: "Products")
"""
Set default variant for a product. Mutation triggers PRODUCT_UPDATED webhook.
@@ -13337,7 +13347,7 @@ type Mutation {
"""Id of a variant that will be set as default."""
variantId: ID!
- ): ProductVariantSetDefault
+ ): ProductVariantSetDefault @doc(category: "Products")
"""
Creates/updates translations for a product variant.
@@ -13351,7 +13361,7 @@ type Mutation {
"""Translation language code."""
languageCode: LanguageCodeEnum!
- ): ProductVariantTranslate
+ ): ProductVariantTranslate @doc(category: "Products")
"""
Manage product variant prices in channels.
@@ -13373,7 +13383,7 @@ type Mutation {
Added in Saleor 3.8.
"""
sku: String
- ): ProductVariantChannelListingUpdate
+ ): ProductVariantChannelListingUpdate @doc(category: "Products")
"""
Reorder product variant attribute values.
@@ -13389,7 +13399,7 @@ type Mutation {
"""ID of a product variant."""
variantId: ID!
- ): ProductVariantReorderAttributeValues
+ ): ProductVariantReorderAttributeValues @doc(category: "Products")
"""
Deactivates product variant preorder. It changes all preorder allocation into regular allocation.
@@ -13403,7 +13413,7 @@ type Mutation {
productVariantPreorderDeactivate(
"""ID of a variant which preorder should be deactivated."""
id: ID!
- ): ProductVariantPreorderDeactivate
+ ): ProductVariantPreorderDeactivate @doc(category: "Products")
"""
Assign an media to a product variant.
@@ -13416,7 +13426,7 @@ type Mutation {
"""ID of a product variant."""
variantId: ID!
- ): VariantMediaAssign
+ ): VariantMediaAssign @doc(category: "Products")
"""
Unassign an media from a product variant.
@@ -13429,7 +13439,7 @@ type Mutation {
"""ID of a product variant."""
variantId: ID!
- ): VariantMediaUnassign
+ ): VariantMediaUnassign @doc(category: "Products")
"""
Captures the authorized payment amount.
@@ -13442,7 +13452,7 @@ type Mutation {
"""Payment ID."""
paymentId: ID!
- ): PaymentCapture
+ ): PaymentCapture @doc(category: "Payments")
"""
Refunds the captured payment amount.
@@ -13455,7 +13465,7 @@ type Mutation {
"""Payment ID."""
paymentId: ID!
- ): PaymentRefund
+ ): PaymentRefund @doc(category: "Payments")
"""
Voids the authorized payment.
@@ -13465,7 +13475,7 @@ type Mutation {
paymentVoid(
"""Payment ID."""
paymentId: ID!
- ): PaymentVoid
+ ): PaymentVoid @doc(category: "Payments")
"""Initializes payment process when it is required by gateway."""
paymentInitialize(
@@ -13477,13 +13487,13 @@ type Mutation {
"""Client-side generated data required to initialize the payment."""
paymentData: JSONString
- ): PaymentInitialize
+ ): PaymentInitialize @doc(category: "Payments")
"""Check payment balance."""
paymentCheckBalance(
"""Fields required to check payment balance."""
input: PaymentCheckBalanceInput!
- ): PaymentCheckBalance
+ ): PaymentCheckBalance @doc(category: "Payments")
"""
Create transaction for checkout or order. Requires the following permissions: AUTHENTICATED_APP and HANDLE_PAYMENTS.
@@ -13501,7 +13511,7 @@ type Mutation {
"""Data that defines a transaction event."""
transactionEvent: TransactionEventInput
- ): TransactionCreate
+ ): TransactionCreate @doc(category: "Payments")
"""
Create transaction for checkout or order. Requires the following permissions: AUTHENTICATED_APP and HANDLE_PAYMENTS.
@@ -13519,7 +13529,7 @@ type Mutation {
"""Data that defines a transaction transaction."""
transactionEvent: TransactionEventInput
- ): TransactionUpdate
+ ): TransactionUpdate @doc(category: "Payments")
"""
Request an action for payment transaction.
@@ -13541,7 +13551,7 @@ type Mutation {
"""The ID of the transaction."""
id: ID!
- ): TransactionRequestAction
+ ): TransactionRequestAction @doc(category: "Payments")
"""
Creates a new page.
@@ -13551,7 +13561,7 @@ type Mutation {
pageCreate(
"""Fields required to create a page."""
input: PageCreateInput!
- ): PageCreate
+ ): PageCreate @doc(category: "Pages")
"""
Deletes a page.
@@ -13561,7 +13571,7 @@ type Mutation {
pageDelete(
"""ID of a page to delete."""
id: ID!
- ): PageDelete
+ ): PageDelete @doc(category: "Pages")
"""
Deletes pages.
@@ -13571,7 +13581,7 @@ type Mutation {
pageBulkDelete(
"""List of page IDs to delete."""
ids: [ID!]!
- ): PageBulkDelete
+ ): PageBulkDelete @doc(category: "Pages")
"""
Publish pages.
@@ -13584,7 +13594,7 @@ type Mutation {
"""Determine if pages will be published or not."""
isPublished: Boolean!
- ): PageBulkPublish
+ ): PageBulkPublish @doc(category: "Pages")
"""
Updates an existing page.
@@ -13597,7 +13607,7 @@ type Mutation {
"""Fields required to update a page."""
input: PageInput!
- ): PageUpdate
+ ): PageUpdate @doc(category: "Pages")
"""
Creates/updates translations for a page.
@@ -13611,7 +13621,7 @@ type Mutation {
"""Translation language code."""
languageCode: LanguageCodeEnum!
- ): PageTranslate
+ ): PageTranslate @doc(category: "Pages")
"""
Create a new page type.
@@ -13621,7 +13631,7 @@ type Mutation {
pageTypeCreate(
"""Fields required to create page type."""
input: PageTypeCreateInput!
- ): PageTypeCreate
+ ): PageTypeCreate @doc(category: "Pages")
"""
Update page type.
@@ -13634,7 +13644,7 @@ type Mutation {
"""Fields required to update page type."""
input: PageTypeUpdateInput!
- ): PageTypeUpdate
+ ): PageTypeUpdate @doc(category: "Pages")
"""
Delete a page type.
@@ -13644,7 +13654,7 @@ type Mutation {
pageTypeDelete(
"""ID of the page type to delete."""
id: ID!
- ): PageTypeDelete
+ ): PageTypeDelete @doc(category: "Pages")
"""
Delete page types.
@@ -13654,7 +13664,7 @@ type Mutation {
pageTypeBulkDelete(
"""List of page type IDs to delete"""
ids: [ID!]!
- ): PageTypeBulkDelete
+ ): PageTypeBulkDelete @doc(category: "Pages")
"""
Assign attributes to a given page type.
@@ -13667,7 +13677,7 @@ type Mutation {
"""ID of the page type to assign the attributes into."""
pageTypeId: ID!
- ): PageAttributeAssign
+ ): PageAttributeAssign @doc(category: "Pages")
"""
Unassign attributes from a given page type.
@@ -13680,7 +13690,7 @@ type Mutation {
"""ID of the page type from which the attributes should be unassign."""
pageTypeId: ID!
- ): PageAttributeUnassign
+ ): PageAttributeUnassign @doc(category: "Pages")
"""
Reorder the attributes of a page type.
@@ -13693,7 +13703,7 @@ type Mutation {
"""ID of a page type."""
pageTypeId: ID!
- ): PageTypeReorderAttributes
+ ): PageTypeReorderAttributes @doc(category: "Pages")
"""
Reorder page attribute values.
@@ -13709,7 +13719,7 @@ type Mutation {
"""ID of a page."""
pageId: ID!
- ): PageReorderAttributeValues
+ ): PageReorderAttributeValues @doc(category: "Pages")
"""
Completes creating an order.
@@ -13719,7 +13729,7 @@ type Mutation {
draftOrderComplete(
"""ID of the order that will be completed."""
id: ID!
- ): DraftOrderComplete
+ ): DraftOrderComplete @doc(category: "Orders")
"""
Creates a new draft order.
@@ -13729,7 +13739,7 @@ type Mutation {
draftOrderCreate(
"""Fields required to create an order."""
input: DraftOrderCreateInput!
- ): DraftOrderCreate
+ ): DraftOrderCreate @doc(category: "Orders")
"""
Deletes a draft order.
@@ -13746,7 +13756,7 @@ type Mutation {
"""ID of a product to delete."""
id: ID
- ): DraftOrderDelete
+ ): DraftOrderDelete @doc(category: "Orders")
"""
Deletes draft orders.
@@ -13756,7 +13766,7 @@ type Mutation {
draftOrderBulkDelete(
"""List of draft order IDs to delete."""
ids: [ID!]!
- ): DraftOrderBulkDelete
+ ): DraftOrderBulkDelete @doc(category: "Orders")
"""
Deletes order lines.
@@ -13766,7 +13776,7 @@ type Mutation {
draftOrderLinesBulkDelete(
"""List of order lines IDs to delete."""
ids: [ID!]!
- ): DraftOrderLinesBulkDelete @deprecated(reason: "This field will be removed in Saleor 4.0.")
+ ): DraftOrderLinesBulkDelete @doc(category: "Orders") @deprecated(reason: "This field will be removed in Saleor 4.0.")
"""
Updates a draft order.
@@ -13786,7 +13796,7 @@ type Mutation {
"""Fields required to update an order."""
input: DraftOrderInput!
- ): DraftOrderUpdate
+ ): DraftOrderUpdate @doc(category: "Orders")
"""
Adds note to the order.
@@ -13799,7 +13809,7 @@ type Mutation {
"""Fields required to create a note for the order."""
input: OrderAddNoteInput!
- ): OrderAddNote
+ ): OrderAddNote @doc(category: "Orders")
"""
Cancel an order.
@@ -13809,7 +13819,7 @@ type Mutation {
orderCancel(
"""ID of the order to cancel."""
id: ID!
- ): OrderCancel
+ ): OrderCancel @doc(category: "Orders")
"""
Capture an order.
@@ -13822,7 +13832,7 @@ type Mutation {
"""ID of the order to capture."""
id: ID!
- ): OrderCapture
+ ): OrderCapture @doc(category: "Orders")
"""
Confirms an unconfirmed order by changing status to unfulfilled.
@@ -13832,7 +13842,7 @@ type Mutation {
orderConfirm(
"""ID of an order to confirm."""
id: ID!
- ): OrderConfirm
+ ): OrderConfirm @doc(category: "Orders")
"""
Creates new fulfillments for an order.
@@ -13845,7 +13855,7 @@ type Mutation {
"""ID of the order to be fulfilled."""
order: ID
- ): OrderFulfill
+ ): OrderFulfill @doc(category: "Orders")
"""
Cancels existing fulfillment and optionally restocks items.
@@ -13858,7 +13868,7 @@ type Mutation {
"""Fields required to cancel a fulfillment."""
input: FulfillmentCancelInput
- ): FulfillmentCancel
+ ): FulfillmentCancel @doc(category: "Orders")
"""
Approve existing fulfillment.
@@ -13876,7 +13886,7 @@ type Mutation {
"""True if confirmation email should be send."""
notifyCustomer: Boolean!
- ): FulfillmentApprove
+ ): FulfillmentApprove @doc(category: "Orders")
"""
Updates a fulfillment for an order.
@@ -13889,7 +13899,7 @@ type Mutation {
"""Fields required to update a fulfillment."""
input: FulfillmentUpdateTrackingInput!
- ): FulfillmentUpdateTracking
+ ): FulfillmentUpdateTracking @doc(category: "Orders")
"""
Refund products.
@@ -13902,7 +13912,7 @@ type Mutation {
"""ID of the order to be refunded."""
order: ID!
- ): FulfillmentRefundProducts
+ ): FulfillmentRefundProducts @doc(category: "Orders")
"""
Return products.
@@ -13915,7 +13925,7 @@ type Mutation {
"""ID of the order to be returned."""
order: ID!
- ): FulfillmentReturnProducts
+ ): FulfillmentReturnProducts @doc(category: "Orders")
"""
Create order lines for an order.
@@ -13928,7 +13938,7 @@ type Mutation {
"""Fields required to add order lines."""
input: [OrderLineCreateInput!]!
- ): OrderLinesCreate
+ ): OrderLinesCreate @doc(category: "Orders")
"""
Deletes an order line from an order.
@@ -13938,7 +13948,7 @@ type Mutation {
orderLineDelete(
"""ID of the order line to delete."""
id: ID!
- ): OrderLineDelete
+ ): OrderLineDelete @doc(category: "Orders")
"""
Updates an order line of an order.
@@ -13951,7 +13961,7 @@ type Mutation {
"""Fields required to update an order line."""
input: OrderLineInput!
- ): OrderLineUpdate
+ ): OrderLineUpdate @doc(category: "Orders")
"""
Adds discount to the order.
@@ -13964,7 +13974,7 @@ type Mutation {
"""ID of an order to discount."""
orderId: ID!
- ): OrderDiscountAdd
+ ): OrderDiscountAdd @doc(category: "Orders")
"""
Update discount for the order.
@@ -13977,7 +13987,7 @@ type Mutation {
"""Fields required to update a discount for the order."""
input: OrderDiscountCommonInput!
- ): OrderDiscountUpdate
+ ): OrderDiscountUpdate @doc(category: "Orders")
"""
Remove discount from the order.
@@ -13987,7 +13997,7 @@ type Mutation {
orderDiscountDelete(
"""ID of a discount to remove."""
discountId: ID!
- ): OrderDiscountDelete
+ ): OrderDiscountDelete @doc(category: "Orders")
"""
Update discount for the order line.
@@ -14000,7 +14010,7 @@ type Mutation {
"""ID of a order line to update price"""
orderLineId: ID!
- ): OrderLineDiscountUpdate
+ ): OrderLineDiscountUpdate @doc(category: "Orders")
"""
Remove discount applied to the order line.
@@ -14010,7 +14020,7 @@ type Mutation {
orderLineDiscountRemove(
"""ID of a order line to remove its discount"""
orderLineId: ID!
- ): OrderLineDiscountRemove
+ ): OrderLineDiscountRemove @doc(category: "Orders")
"""
Mark order as manually paid.
@@ -14023,7 +14033,7 @@ type Mutation {
"""The external transaction reference."""
transactionReference: String
- ): OrderMarkAsPaid
+ ): OrderMarkAsPaid @doc(category: "Orders")
"""
Refund an order.
@@ -14036,7 +14046,7 @@ type Mutation {
"""ID of the order to refund."""
id: ID!
- ): OrderRefund
+ ): OrderRefund @doc(category: "Orders")
"""
Updates an order.
@@ -14056,7 +14066,7 @@ type Mutation {
"""Fields required to update an order."""
input: OrderUpdateInput!
- ): OrderUpdate
+ ): OrderUpdate @doc(category: "Orders")
"""
Updates a shipping method of the order. Requires shipping method ID to update, when null is passed then currently assigned shipping method is removed.
@@ -14069,7 +14079,7 @@ type Mutation {
"""Fields required to change shipping method of the order."""
input: OrderUpdateShippingInput!
- ): OrderUpdateShipping
+ ): OrderUpdateShipping @doc(category: "Orders")
"""
Void an order.
@@ -14079,7 +14089,7 @@ type Mutation {
orderVoid(
"""ID of the order to void."""
id: ID!
- ): OrderVoid
+ ): OrderVoid @doc(category: "Orders")
"""
Cancels orders.
@@ -14089,7 +14099,7 @@ type Mutation {
orderBulkCancel(
"""List of orders IDs to cancel."""
ids: [ID!]!
- ): OrderBulkCancel
+ ): OrderBulkCancel @doc(category: "Orders")
"""
Delete metadata of an object. To use it, you need to have access to the modified object.
@@ -14342,7 +14352,7 @@ type Mutation {
giftCardActivate(
"""ID of a gift card to activate."""
id: ID!
- ): GiftCardActivate
+ ): GiftCardActivate @doc(category: "Gift cards")
"""
Creates a new gift card.
@@ -14352,7 +14362,7 @@ type Mutation {
giftCardCreate(
"""Fields required to create a gift card."""
input: GiftCardCreateInput!
- ): GiftCardCreate
+ ): GiftCardCreate @doc(category: "Gift cards")
"""
Delete gift card.
@@ -14366,7 +14376,7 @@ type Mutation {
giftCardDelete(
"""ID of the gift card to delete."""
id: ID!
- ): GiftCardDelete
+ ): GiftCardDelete @doc(category: "Gift cards")
"""
Deactivate a gift card.
@@ -14376,7 +14386,7 @@ type Mutation {
giftCardDeactivate(
"""ID of a gift card to deactivate."""
id: ID!
- ): GiftCardDeactivate
+ ): GiftCardDeactivate @doc(category: "Gift cards")
"""
Update a gift card.
@@ -14389,7 +14399,7 @@ type Mutation {
"""Fields required to update a gift card."""
input: GiftCardUpdateInput!
- ): GiftCardUpdate
+ ): GiftCardUpdate @doc(category: "Gift cards")
"""
Resend a gift card.
@@ -14403,7 +14413,7 @@ type Mutation {
giftCardResend(
"""Fields required to resend a gift card."""
input: GiftCardResendInput!
- ): GiftCardResend
+ ): GiftCardResend @doc(category: "Gift cards")
"""
Adds note to the gift card.
@@ -14420,7 +14430,7 @@ type Mutation {
"""Fields required to create a note for the gift card."""
input: GiftCardAddNoteInput!
- ): GiftCardAddNote
+ ): GiftCardAddNote @doc(category: "Gift cards")
"""
Create gift cards.
@@ -14434,7 +14444,7 @@ type Mutation {
giftCardBulkCreate(
"""Fields required to create gift cards."""
input: GiftCardBulkCreateInput!
- ): GiftCardBulkCreate
+ ): GiftCardBulkCreate @doc(category: "Gift cards")
"""
Delete gift cards.
@@ -14448,7 +14458,7 @@ type Mutation {
giftCardBulkDelete(
"""List of gift card IDs to delete."""
ids: [ID!]!
- ): GiftCardBulkDelete
+ ): GiftCardBulkDelete @doc(category: "Gift cards")
"""
Activate gift cards.
@@ -14462,7 +14472,7 @@ type Mutation {
giftCardBulkActivate(
"""List of gift card IDs to activate."""
ids: [ID!]!
- ): GiftCardBulkActivate
+ ): GiftCardBulkActivate @doc(category: "Gift cards")
"""
Deactivate gift cards.
@@ -14476,7 +14486,7 @@ type Mutation {
giftCardBulkDeactivate(
"""List of gift card IDs to deactivate."""
ids: [ID!]!
- ): GiftCardBulkDeactivate
+ ): GiftCardBulkDeactivate @doc(category: "Gift cards")
"""
Update plugin configuration.
@@ -14520,7 +14530,7 @@ type Mutation {
saleCreate(
"""Fields required to create a sale."""
input: SaleInput!
- ): SaleCreate
+ ): SaleCreate @doc(category: "Discounts")
"""
Deletes a sale.
@@ -14530,7 +14540,7 @@ type Mutation {
saleDelete(
"""ID of a sale to delete."""
id: ID!
- ): SaleDelete
+ ): SaleDelete @doc(category: "Discounts")
"""
Deletes sales.
@@ -14540,7 +14550,7 @@ type Mutation {
saleBulkDelete(
"""List of sale IDs to delete."""
ids: [ID!]!
- ): SaleBulkDelete
+ ): SaleBulkDelete @doc(category: "Discounts")
"""
Updates a sale.
@@ -14553,7 +14563,7 @@ type Mutation {
"""Fields required to update a sale."""
input: SaleInput!
- ): SaleUpdate
+ ): SaleUpdate @doc(category: "Discounts")
"""
Adds products, categories, collections to a voucher.
@@ -14566,7 +14576,7 @@ type Mutation {
"""Fields required to modify catalogue IDs of sale."""
input: CatalogueInput!
- ): SaleAddCatalogues
+ ): SaleAddCatalogues @doc(category: "Products")
"""
Removes products, categories, collections from a sale.
@@ -14579,7 +14589,7 @@ type Mutation {
"""Fields required to modify catalogue IDs of sale."""
input: CatalogueInput!
- ): SaleRemoveCatalogues
+ ): SaleRemoveCatalogues @doc(category: "Products")
"""
Creates/updates translations for a sale.
@@ -14593,7 +14603,7 @@ type Mutation {
"""Translation language code."""
languageCode: LanguageCodeEnum!
- ): SaleTranslate
+ ): SaleTranslate @doc(category: "Discounts")
"""
Manage sale's availability in channels.
@@ -14606,7 +14616,7 @@ type Mutation {
"""Fields required to update sale channel listings."""
input: SaleChannelListingInput!
- ): SaleChannelListingUpdate
+ ): SaleChannelListingUpdate @doc(category: "Products")
"""
Creates a new voucher.
@@ -14616,7 +14626,7 @@ type Mutation {
voucherCreate(
"""Fields required to create a voucher."""
input: VoucherInput!
- ): VoucherCreate
+ ): VoucherCreate @doc(category: "Discounts")
"""
Deletes a voucher.
@@ -14626,7 +14636,7 @@ type Mutation {
voucherDelete(
"""ID of a voucher to delete."""
id: ID!
- ): VoucherDelete
+ ): VoucherDelete @doc(category: "Discounts")
"""
Deletes vouchers.
@@ -14636,7 +14646,7 @@ type Mutation {
voucherBulkDelete(
"""List of voucher IDs to delete."""
ids: [ID!]!
- ): VoucherBulkDelete
+ ): VoucherBulkDelete @doc(category: "Discounts")
"""
Updates a voucher.
@@ -14649,7 +14659,7 @@ type Mutation {
"""Fields required to update a voucher."""
input: VoucherInput!
- ): VoucherUpdate
+ ): VoucherUpdate @doc(category: "Discounts")
"""
Adds products, categories, collections to a voucher.
@@ -14662,7 +14672,7 @@ type Mutation {
"""Fields required to modify catalogue IDs of voucher."""
input: CatalogueInput!
- ): VoucherAddCatalogues
+ ): VoucherAddCatalogues @doc(category: "Products")
"""
Removes products, categories, collections from a voucher.
@@ -14675,7 +14685,7 @@ type Mutation {
"""Fields required to modify catalogue IDs of voucher."""
input: CatalogueInput!
- ): VoucherRemoveCatalogues
+ ): VoucherRemoveCatalogues @doc(category: "Products")
"""
Creates/updates translations for a voucher.
@@ -14689,7 +14699,7 @@ type Mutation {
"""Translation language code."""
languageCode: LanguageCodeEnum!
- ): VoucherTranslate
+ ): VoucherTranslate @doc(category: "Discounts")
"""
Manage voucher's availability in channels.
@@ -14702,7 +14712,7 @@ type Mutation {
"""Fields required to update voucher channel listings."""
input: VoucherChannelListingInput!
- ): VoucherChannelListingUpdate
+ ): VoucherChannelListingUpdate @doc(category: "Products")
"""
Export products to csv file.
@@ -14763,7 +14773,7 @@ type Mutation {
DEPRECATED: this field will be removed in Saleor 4.0. Use `id` instead.
"""
token: UUID
- ): CheckoutAddPromoCode
+ ): CheckoutAddPromoCode @doc(category: "Checkout")
"""Update billing address in the existing checkout."""
checkoutBillingAddressUpdate(
@@ -14799,7 +14809,7 @@ type Mutation {
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
validationRules: CheckoutAddressValidationRules
- ): CheckoutBillingAddressUpdate
+ ): CheckoutBillingAddressUpdate @doc(category: "Checkout")
"""
Completes the checkout. As a result a new order is created and a payment charge is made. This action requires a successful payment before it can be performed. In case additional confirmation step as 3D secure is required confirmationNeeded flag will be set to True and no order created until payment is confirmed with second call of this mutation.
@@ -14847,13 +14857,13 @@ type Mutation {
DEPRECATED: this field will be removed in Saleor 4.0. Use `id` instead.
"""
token: UUID
- ): CheckoutComplete
+ ): CheckoutComplete @doc(category: "Checkout")
"""Create a new checkout."""
checkoutCreate(
"""Fields required to create checkout."""
input: CheckoutCreateInput!
- ): CheckoutCreate
+ ): CheckoutCreate @doc(category: "Checkout")
"""
Sets the customer as the owner of the checkout.
@@ -14886,7 +14896,7 @@ type Mutation {
DEPRECATED: this field will be removed in Saleor 4.0. Use `id` instead.
"""
token: UUID
- ): CheckoutCustomerAttach
+ ): CheckoutCustomerAttach @doc(category: "Checkout")
"""
Removes the user assigned as the owner of the checkout.
@@ -14914,7 +14924,7 @@ type Mutation {
DEPRECATED: this field will be removed in Saleor 4.0. Use `id` instead.
"""
token: UUID
- ): CheckoutCustomerDetach
+ ): CheckoutCustomerDetach @doc(category: "Checkout")
"""Updates email address in the existing checkout object."""
checkoutEmailUpdate(
@@ -14941,7 +14951,7 @@ type Mutation {
DEPRECATED: this field will be removed in Saleor 4.0. Use `id` instead.
"""
token: UUID
- ): CheckoutEmailUpdate
+ ): CheckoutEmailUpdate @doc(category: "Checkout")
"""Deletes a CheckoutLine."""
checkoutLineDelete(
@@ -14968,7 +14978,7 @@ type Mutation {
DEPRECATED: this field will be removed in Saleor 4.0. Use `id` instead.
"""
token: UUID
- ): CheckoutLineDelete @deprecated(reason: "This field will be removed in Saleor 4.0. Use `checkoutLinesDelete` instead.")
+ ): CheckoutLineDelete @doc(category: "Checkout") @deprecated(reason: "This field will be removed in Saleor 4.0. Use `checkoutLinesDelete` instead.")
"""Deletes checkout lines."""
checkoutLinesDelete(
@@ -14988,7 +14998,7 @@ type Mutation {
DEPRECATED: this field will be removed in Saleor 4.0. Use `id` instead.
"""
token: UUID
- ): CheckoutLinesDelete
+ ): CheckoutLinesDelete @doc(category: "Checkout")
"""
Adds a checkout line to the existing checkout.If line was already in checkout, its quantity will be increased.
@@ -15019,7 +15029,7 @@ type Mutation {
DEPRECATED: this field will be removed in Saleor 4.0. Use `id` instead.
"""
token: UUID
- ): CheckoutLinesAdd
+ ): CheckoutLinesAdd @doc(category: "Checkout")
"""Updates checkout line in the existing checkout."""
checkoutLinesUpdate(
@@ -15048,7 +15058,7 @@ type Mutation {
DEPRECATED: this field will be removed in Saleor 4.0. Use `id` instead.
"""
token: UUID
- ): CheckoutLinesUpdate
+ ): CheckoutLinesUpdate @doc(category: "Checkout")
"""Remove a gift card or a voucher from a checkout."""
checkoutRemovePromoCode(
@@ -15078,7 +15088,7 @@ type Mutation {
DEPRECATED: this field will be removed in Saleor 4.0. Use `id` instead.
"""
token: UUID
- ): CheckoutRemovePromoCode
+ ): CheckoutRemovePromoCode @doc(category: "Checkout")
"""Create a new payment for given checkout."""
checkoutPaymentCreate(
@@ -15105,7 +15115,7 @@ type Mutation {
DEPRECATED: this field will be removed in Saleor 4.0. Use `id` instead.
"""
token: UUID
- ): CheckoutPaymentCreate
+ ): CheckoutPaymentCreate @doc(category: "Payments")
"""Update shipping address in the existing checkout."""
checkoutShippingAddressUpdate(
@@ -15141,7 +15151,7 @@ type Mutation {
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
validationRules: CheckoutAddressValidationRules
- ): CheckoutShippingAddressUpdate
+ ): CheckoutShippingAddressUpdate @doc(category: "Checkout")
"""Updates the shipping method of the checkout."""
checkoutShippingMethodUpdate(
@@ -15168,7 +15178,7 @@ type Mutation {
DEPRECATED: this field will be removed in Saleor 4.0. Use `id` instead.
"""
token: UUID
- ): CheckoutShippingMethodUpdate @deprecated(reason: "This field will be removed in Saleor 4.0. Use `checkoutDeliveryMethodUpdate` instead.")
+ ): CheckoutShippingMethodUpdate @doc(category: "Checkout") @deprecated(reason: "This field will be removed in Saleor 4.0. Use `checkoutDeliveryMethodUpdate` instead.")
"""
Updates the delivery method (shipping method or pick up point) of the checkout.
@@ -15194,7 +15204,7 @@ type Mutation {
DEPRECATED: this field will be removed in Saleor 4.0. Use `id` instead.
"""
token: UUID
- ): CheckoutDeliveryMethodUpdate
+ ): CheckoutDeliveryMethodUpdate @doc(category: "Checkout")
"""Update language code in the existing checkout."""
checkoutLanguageCodeUpdate(
@@ -15221,7 +15231,7 @@ type Mutation {
DEPRECATED: this field will be removed in Saleor 4.0. Use `id` instead.
"""
token: UUID
- ): CheckoutLanguageCodeUpdate
+ ): CheckoutLanguageCodeUpdate @doc(category: "Checkout")
"""
Create new order from existing checkout. Requires the following permissions: AUTHENTICATED_APP and HANDLE_CHECKOUTS.
@@ -15252,7 +15262,7 @@ type Mutation {
Determines if checkout should be removed after creating an order. Default true.
"""
removeCheckout: Boolean = true
- ): OrderCreateFromCheckout
+ ): OrderCreateFromCheckout @doc(category: "Checkout")
"""
Creates new channel.
@@ -15262,7 +15272,7 @@ type Mutation {
channelCreate(
"""Fields required to create channel."""
input: ChannelCreateInput!
- ): ChannelCreate
+ ): ChannelCreate @doc(category: "Channels")
"""
Update a channel.
@@ -15276,7 +15286,7 @@ type Mutation {
"""Fields required to update a channel."""
input: ChannelUpdateInput!
- ): ChannelUpdate
+ ): ChannelUpdate @doc(category: "Channels")
"""
Delete a channel. Orders associated with the deleted channel will be moved to the target channel. Checkouts, product availability, and pricing will be removed.
@@ -15289,7 +15299,7 @@ type Mutation {
"""Fields required to delete a channel."""
input: ChannelDeleteInput
- ): ChannelDelete
+ ): ChannelDelete @doc(category: "Channels")
"""
Activate a channel.
@@ -15299,7 +15309,7 @@ type Mutation {
channelActivate(
"""ID of the channel to activate."""
id: ID!
- ): ChannelActivate
+ ): ChannelActivate @doc(category: "Channels")
"""
Deactivate a channel.
@@ -15309,7 +15319,7 @@ type Mutation {
channelDeactivate(
"""ID of the channel to deactivate."""
id: ID!
- ): ChannelDeactivate
+ ): ChannelDeactivate @doc(category: "Channels")
"""
Reorder the warehouses of a channel.
@@ -15326,13 +15336,13 @@ type Mutation {
"""The list of reordering operations for the given channel warehouses."""
moves: [ReorderInput!]!
- ): ChannelReorderWarehouses
+ ): ChannelReorderWarehouses @doc(category: "Channels")
"""Creates an attribute."""
attributeCreate(
"""Fields required to create an attribute."""
input: AttributeCreateInput!
- ): AttributeCreate
+ ): AttributeCreate @doc(category: "Attributes")
"""
Deletes an attribute.
@@ -15349,7 +15359,7 @@ type Mutation {
"""ID of an attribute to delete."""
id: ID
- ): AttributeDelete
+ ): AttributeDelete @doc(category: "Attributes")
"""
Updates attribute.
@@ -15369,7 +15379,7 @@ type Mutation {
"""Fields required to update an attribute."""
input: AttributeUpdateInput!
- ): AttributeUpdate
+ ): AttributeUpdate @doc(category: "Attributes")
"""
Creates/updates translations for an attribute.
@@ -15383,7 +15393,7 @@ type Mutation {
"""Translation language code."""
languageCode: LanguageCodeEnum!
- ): AttributeTranslate
+ ): AttributeTranslate @doc(category: "Attributes")
"""
Deletes attributes.
@@ -15393,7 +15403,7 @@ type Mutation {
attributeBulkDelete(
"""List of attribute IDs to delete."""
ids: [ID!]!
- ): AttributeBulkDelete
+ ): AttributeBulkDelete @doc(category: "Attributes")
"""
Deletes values of attributes.
@@ -15403,7 +15413,7 @@ type Mutation {
attributeValueBulkDelete(
"""List of attribute value IDs to delete."""
ids: [ID!]!
- ): AttributeValueBulkDelete
+ ): AttributeValueBulkDelete @doc(category: "Attributes")
"""
Creates a value for an attribute.
@@ -15416,7 +15426,7 @@ type Mutation {
"""Fields required to create an AttributeValue."""
input: AttributeValueCreateInput!
- ): AttributeValueCreate
+ ): AttributeValueCreate @doc(category: "Attributes")
"""
Deletes a value of an attribute.
@@ -15433,7 +15443,7 @@ type Mutation {
"""ID of a value to delete."""
id: ID
- ): AttributeValueDelete
+ ): AttributeValueDelete @doc(category: "Attributes")
"""
Updates value of an attribute.
@@ -15453,7 +15463,7 @@ type Mutation {
"""Fields required to update an AttributeValue."""
input: AttributeValueUpdateInput!
- ): AttributeValueUpdate
+ ): AttributeValueUpdate @doc(category: "Attributes")
"""
Creates/updates translations for an attribute value.
@@ -15467,7 +15477,7 @@ type Mutation {
"""Translation language code."""
languageCode: LanguageCodeEnum!
- ): AttributeValueTranslate
+ ): AttributeValueTranslate @doc(category: "Attributes")
"""
Reorder the values of an attribute.
@@ -15480,7 +15490,7 @@ type Mutation {
"""The list of reordering operations for given attribute values."""
moves: [ReorderInput!]!
- ): AttributeReorderValues
+ ): AttributeReorderValues @doc(category: "Attributes")
"""
Creates a new app. Requires the following permissions: AUTHENTICATED_STAFF_USER and MANAGE_APPS.
@@ -15488,7 +15498,7 @@ type Mutation {
appCreate(
"""Fields required to create a new app."""
input: AppInput!
- ): AppCreate
+ ): AppCreate @doc(category: "Apps")
"""
Updates an existing app.
@@ -15501,7 +15511,7 @@ type Mutation {
"""Fields required to update an existing app."""
input: AppInput!
- ): AppUpdate
+ ): AppUpdate @doc(category: "Apps")
"""
Deletes an app.
@@ -15511,7 +15521,7 @@ type Mutation {
appDelete(
"""ID of an app to delete."""
id: ID!
- ): AppDelete
+ ): AppDelete @doc(category: "Apps")
"""
Creates a new token.
@@ -15521,7 +15531,7 @@ type Mutation {
appTokenCreate(
"""Fields required to create a new auth token."""
input: AppTokenInput!
- ): AppTokenCreate
+ ): AppTokenCreate @doc(category: "Apps")
"""
Deletes an authentication token assigned to app.
@@ -15531,13 +15541,13 @@ type Mutation {
appTokenDelete(
"""ID of an auth token to delete."""
id: ID!
- ): AppTokenDelete
+ ): AppTokenDelete @doc(category: "Apps")
"""Verify provided app token."""
appTokenVerify(
"""App token to verify."""
token: String!
- ): AppTokenVerify
+ ): AppTokenVerify @doc(category: "Apps")
"""
Install new app by using app manifest. Requires the following permissions: AUTHENTICATED_STAFF_USER and MANAGE_APPS.
@@ -15545,7 +15555,7 @@ type Mutation {
appInstall(
"""Fields required to install a new app."""
input: AppInstallInput!
- ): AppInstall
+ ): AppInstall @doc(category: "Apps")
"""
Retry failed installation of new app.
@@ -15558,7 +15568,7 @@ type Mutation {
"""ID of failed installation."""
id: ID!
- ): AppRetryInstall
+ ): AppRetryInstall @doc(category: "Apps")
"""
Delete failed installation.
@@ -15568,14 +15578,14 @@ type Mutation {
appDeleteFailedInstallation(
"""ID of failed installation to delete."""
id: ID!
- ): AppDeleteFailedInstallation
+ ): AppDeleteFailedInstallation @doc(category: "Apps")
"""
Fetch and validate manifest.
Requires one of the following permissions: MANAGE_APPS.
"""
- appFetchManifest(manifestUrl: String!): AppFetchManifest
+ appFetchManifest(manifestUrl: String!): AppFetchManifest @doc(category: "Apps")
"""
Activate the app.
@@ -15585,7 +15595,7 @@ type Mutation {
appActivate(
"""ID of app to activate."""
id: ID!
- ): AppActivate
+ ): AppActivate @doc(category: "Apps")
"""
Deactivate the app.
@@ -15595,7 +15605,7 @@ type Mutation {
appDeactivate(
"""ID of app to deactivate."""
id: ID!
- ): AppDeactivate
+ ): AppDeactivate @doc(category: "Apps")
"""Create JWT token."""
tokenCreate(
@@ -15613,7 +15623,7 @@ type Mutation {
"""Password of a user."""
password: String!
- ): CreateToken
+ ): CreateToken @doc(category: "Authentication")
"""
Refresh JWT token. Mutation tries to take refreshToken from the input.If it fails it will try to take refreshToken from the http-only cookie -refreshToken. csrfToken is required when refreshToken is provided as a cookie.
@@ -15626,29 +15636,29 @@ type Mutation {
"""Refresh token."""
refreshToken: String
- ): RefreshToken
+ ): RefreshToken @doc(category: "Authentication")
"""Verify JWT token."""
tokenVerify(
"""JWT token to validate."""
token: String!
- ): VerifyToken
+ ): VerifyToken @doc(category: "Authentication")
"""
Deactivate all JWT tokens of the currently authenticated user.
Requires one of the following permissions: AUTHENTICATED_USER.
"""
- tokensDeactivateAll: DeactivateAllUserTokens
+ tokensDeactivateAll: DeactivateAllUserTokens @doc(category: "Authentication")
- """Prepare external authentication url for user by custom plugin."""
+ """Prepare external authentication URL for user by custom plugin."""
externalAuthenticationUrl(
"""The data required by plugin to create external authentication url."""
input: JSONString!
"""The ID of the authentication plugin."""
pluginId: String!
- ): ExternalAuthenticationUrl
+ ): ExternalAuthenticationUrl @doc(category: "Authentication")
"""Obtain external access tokens for user by custom plugin."""
externalObtainAccessTokens(
@@ -15657,7 +15667,7 @@ type Mutation {
"""The ID of the authentication plugin."""
pluginId: String!
- ): ExternalObtainAccessTokens
+ ): ExternalObtainAccessTokens @doc(category: "Authentication")
"""Refresh user's access by custom plugin."""
externalRefresh(
@@ -15666,7 +15676,7 @@ type Mutation {
"""The ID of the authentication plugin."""
pluginId: String!
- ): ExternalRefresh
+ ): ExternalRefresh @doc(category: "Authentication")
"""Logout user by custom plugin."""
externalLogout(
@@ -15675,7 +15685,7 @@ type Mutation {
"""The ID of the authentication plugin."""
pluginId: String!
- ): ExternalLogout
+ ): ExternalLogout @doc(category: "Authentication")
"""Verify external authentication data by plugin."""
externalVerify(
@@ -15684,7 +15694,7 @@ type Mutation {
"""The ID of the authentication plugin."""
pluginId: String!
- ): ExternalVerify
+ ): ExternalVerify @doc(category: "Authentication")
"""Sends an email with the account password modification link."""
requestPasswordReset(
@@ -15700,7 +15710,7 @@ type Mutation {
URL of a view where users should be redirected to reset the password. URL in RFC 1808 format.
"""
redirectUrl: String!
- ): RequestPasswordReset
+ ): RequestPasswordReset @doc(category: "Users")
"""Confirm user account with token sent by email during registration."""
confirmAccount(
@@ -15709,7 +15719,7 @@ type Mutation {
"""A one-time token required to confirm the account."""
token: String!
- ): ConfirmAccount
+ ): ConfirmAccount @doc(category: "Users")
"""
Sets the user's password from the token sent by email using the RequestPasswordReset mutation.
@@ -15723,7 +15733,7 @@ type Mutation {
"""A one-time token required to set the password."""
token: String!
- ): SetPassword
+ ): SetPassword @doc(category: "Users")
"""
Change the password of the logged in user.
@@ -15736,7 +15746,7 @@ type Mutation {
"""Current user password."""
oldPassword: String
- ): PasswordChange
+ ): PasswordChange @doc(category: "Users")
"""
Request email change of the logged in user.
@@ -15759,7 +15769,7 @@ type Mutation {
URL of a view where users should be redirected to update the email address. URL in RFC 1808 format.
"""
redirectUrl: String!
- ): RequestEmailChange
+ ): RequestEmailChange @doc(category: "Users")
"""
Confirm the email change of the logged-in user.
@@ -15774,7 +15784,7 @@ type Mutation {
"""A one-time token required to change the email."""
token: String!
- ): ConfirmEmailChange
+ ): ConfirmEmailChange @doc(category: "Users")
"""
Create a new address for the customer.
@@ -15789,7 +15799,7 @@ type Mutation {
A type of address. If provided, the new address will be automatically assigned as the customer's default address of that type.
"""
type: AddressTypeEnum
- ): AccountAddressCreate
+ ): AccountAddressCreate @doc(category: "Users")
"""
Updates an address of the logged-in user. Requires one of the following permissions: MANAGE_USERS, IS_OWNER.
@@ -15800,7 +15810,7 @@ type Mutation {
"""Fields required to update the address."""
input: AddressInput!
- ): AccountAddressUpdate
+ ): AccountAddressUpdate @doc(category: "Users")
"""
Delete an address of the logged-in user. Requires one of the following permissions: MANAGE_USERS, IS_OWNER.
@@ -15808,7 +15818,7 @@ type Mutation {
accountAddressDelete(
"""ID of the address to delete."""
id: ID!
- ): AccountAddressDelete
+ ): AccountAddressDelete @doc(category: "Users")
"""
Sets a default address for the authenticated user.
@@ -15821,13 +15831,13 @@ type Mutation {
"""The type of address."""
type: AddressTypeEnum!
- ): AccountSetDefaultAddress
+ ): AccountSetDefaultAddress @doc(category: "Users")
"""Register a new user."""
accountRegister(
"""Fields required to create a user."""
input: AccountRegisterInput!
- ): AccountRegister
+ ): AccountRegister @doc(category: "Users")
"""
Updates the account of the logged-in user.
@@ -15837,7 +15847,7 @@ type Mutation {
accountUpdate(
"""Fields required to update the account of the logged-in user."""
input: AccountInput!
- ): AccountUpdate
+ ): AccountUpdate @doc(category: "Users")
"""
Sends an email with the account removal link for the logged-in user.
@@ -15854,7 +15864,7 @@ type Mutation {
URL of a view where users should be redirected to delete their account. URL in RFC 1808 format.
"""
redirectUrl: String!
- ): AccountRequestDeletion
+ ): AccountRequestDeletion @doc(category: "Users")
"""
Remove user account.
@@ -15866,7 +15876,7 @@ type Mutation {
A one-time token required to remove account. Sent by email using AccountRequestDeletion mutation.
"""
token: String!
- ): AccountDelete
+ ): AccountDelete @doc(category: "Users")
"""
Creates user address.
@@ -15879,7 +15889,7 @@ type Mutation {
"""ID of a user to create address for."""
userId: ID!
- ): AddressCreate
+ ): AddressCreate @doc(category: "Users")
"""
Updates an address.
@@ -15892,7 +15902,7 @@ type Mutation {
"""Fields required to update the address."""
input: AddressInput!
- ): AddressUpdate
+ ): AddressUpdate @doc(category: "Users")
"""
Deletes an address.
@@ -15902,7 +15912,7 @@ type Mutation {
addressDelete(
"""ID of the address to delete."""
id: ID!
- ): AddressDelete
+ ): AddressDelete @doc(category: "Users")
"""
Sets a default address for the given user.
@@ -15918,7 +15928,7 @@ type Mutation {
"""ID of the user to change the address for."""
userId: ID!
- ): AddressSetDefault
+ ): AddressSetDefault @doc(category: "Users")
"""
Creates a new customer.
@@ -15928,7 +15938,7 @@ type Mutation {
customerCreate(
"""Fields required to create a customer."""
input: UserCreateInput!
- ): CustomerCreate
+ ): CustomerCreate @doc(category: "Users")
"""
Updates an existing customer.
@@ -15948,7 +15958,7 @@ type Mutation {
"""Fields required to update a customer."""
input: CustomerInput!
- ): CustomerUpdate
+ ): CustomerUpdate @doc(category: "Users")
"""
Deletes a customer.
@@ -15965,7 +15975,7 @@ type Mutation {
"""ID of a customer to delete."""
id: ID
- ): CustomerDelete
+ ): CustomerDelete @doc(category: "Users")
"""
Deletes customers.
@@ -15975,7 +15985,7 @@ type Mutation {
customerBulkDelete(
"""List of user IDs to delete."""
ids: [ID!]!
- ): CustomerBulkDelete
+ ): CustomerBulkDelete @doc(category: "Users")
"""
Creates a new staff user. Apps are not allowed to perform this mutation.
@@ -15985,7 +15995,7 @@ type Mutation {
staffCreate(
"""Fields required to create a staff user."""
input: StaffCreateInput!
- ): StaffCreate
+ ): StaffCreate @doc(category: "Users")
"""
Updates an existing staff user. Apps are not allowed to perform this mutation.
@@ -15998,7 +16008,7 @@ type Mutation {
"""Fields required to update a staff user."""
input: StaffUpdateInput!
- ): StaffUpdate
+ ): StaffUpdate @doc(category: "Users")
"""
Deletes a staff user. Apps are not allowed to perform this mutation.
@@ -16008,7 +16018,7 @@ type Mutation {
staffDelete(
"""ID of a staff user to delete."""
id: ID!
- ): StaffDelete
+ ): StaffDelete @doc(category: "Users")
"""
Deletes staff users. Apps are not allowed to perform this mutation.
@@ -16018,7 +16028,7 @@ type Mutation {
staffBulkDelete(
"""List of user IDs to delete."""
ids: [ID!]!
- ): StaffBulkDelete
+ ): StaffBulkDelete @doc(category: "Users")
"""
Create a user avatar. Only for staff members. This mutation must be sent as a `multipart` request. More detailed specs of the upload format can be found here: https://github.com/jaydenseric/graphql-multipart-request-spec
@@ -16028,14 +16038,14 @@ type Mutation {
userAvatarUpdate(
"""Represents an image file in a multipart request."""
image: Upload!
- ): UserAvatarUpdate
+ ): UserAvatarUpdate @doc(category: "Users")
"""
Deletes a user avatar. Only for staff members.
Requires one of the following permissions: AUTHENTICATED_STAFF_USER.
"""
- userAvatarDelete: UserAvatarDelete
+ userAvatarDelete: UserAvatarDelete @doc(category: "Users")
"""
Activate or deactivate users.
@@ -16048,7 +16058,7 @@ type Mutation {
"""Determine if users will be set active or not."""
isActive: Boolean!
- ): UserBulkSetActive
+ ): UserBulkSetActive @doc(category: "Users")
"""
Create new permission group. Apps are not allowed to perform this mutation.
@@ -16058,7 +16068,7 @@ type Mutation {
permissionGroupCreate(
"""Input fields to create permission group."""
input: PermissionGroupCreateInput!
- ): PermissionGroupCreate
+ ): PermissionGroupCreate @doc(category: "Users")
"""
Update permission group. Apps are not allowed to perform this mutation.
@@ -16071,7 +16081,7 @@ type Mutation {
"""Input fields to create permission group."""
input: PermissionGroupUpdateInput!
- ): PermissionGroupUpdate
+ ): PermissionGroupUpdate @doc(category: "Users")
"""
Delete permission group. Apps are not allowed to perform this mutation.
@@ -16081,7 +16091,7 @@ type Mutation {
permissionGroupDelete(
"""ID of the group to delete."""
id: ID!
- ): PermissionGroupDelete
+ ): PermissionGroupDelete @doc(category: "Users")
}
"""
@@ -16089,7 +16099,7 @@ Creates a new webhook subscription.
Requires one of the following permissions: MANAGE_APPS, AUTHENTICATED_APP.
"""
-type WebhookCreate {
+type WebhookCreate @doc(category: "Webhooks") {
webhookErrors: [WebhookError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [WebhookError!]!
webhook: Webhook
@@ -16180,7 +16190,7 @@ Delete a webhook. Before the deletion, the webhook is deactivated to pause any d
Requires one of the following permissions: MANAGE_APPS, AUTHENTICATED_APP.
"""
-type WebhookDelete {
+type WebhookDelete @doc(category: "Webhooks") {
webhookErrors: [WebhookError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [WebhookError!]!
webhook: Webhook
@@ -16191,7 +16201,7 @@ Updates a webhook subscription.
Requires one of the following permissions: MANAGE_APPS.
"""
-type WebhookUpdate {
+type WebhookUpdate @doc(category: "Webhooks") {
webhookErrors: [WebhookError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [WebhookError!]!
webhook: Webhook
@@ -16254,7 +16264,7 @@ Retries event delivery.
Requires one of the following permissions: MANAGE_APPS.
"""
-type EventDeliveryRetry {
+type EventDeliveryRetry @doc(category: "Webhooks") {
"""Event delivery."""
delivery: EventDelivery
errors: [WebhookError!]!
@@ -16269,7 +16279,7 @@ Note: this API is currently in Feature Preview and can be subject to changes at
Requires one of the following permissions: AUTHENTICATED_STAFF_USER.
"""
-type WebhookDryRun {
+type WebhookDryRun @doc(category: "Webhooks") {
"""JSON payload, that would be sent out to webhook's target URL."""
payload: JSONString
errors: [WebhookDryRunError!]!
@@ -16310,7 +16320,7 @@ Note: this API is currently in Feature Preview and can be subject to changes at
Requires one of the following permissions: AUTHENTICATED_STAFF_USER.
"""
-type WebhookTrigger {
+type WebhookTrigger @doc(category: "Webhooks") {
delivery: EventDelivery
errors: [WebhookTriggerError!]!
}
@@ -16347,7 +16357,7 @@ Creates new warehouse.
Requires one of the following permissions: MANAGE_PRODUCTS.
"""
-type WarehouseCreate {
+type WarehouseCreate @doc(category: "Products") {
warehouseErrors: [WarehouseError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [WarehouseError!]!
warehouse: Warehouse
@@ -16412,7 +16422,7 @@ Updates given warehouse.
Requires one of the following permissions: MANAGE_PRODUCTS.
"""
-type WarehouseUpdate {
+type WarehouseUpdate @doc(category: "Products") {
warehouseErrors: [WarehouseError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [WarehouseError!]!
warehouse: Warehouse
@@ -16462,7 +16472,7 @@ Deletes selected warehouse.
Requires one of the following permissions: MANAGE_PRODUCTS.
"""
-type WarehouseDelete {
+type WarehouseDelete @doc(category: "Products") {
warehouseErrors: [WarehouseError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [WarehouseError!]!
warehouse: Warehouse
@@ -16473,7 +16483,7 @@ Add shipping zone to given warehouse.
Requires one of the following permissions: MANAGE_PRODUCTS.
"""
-type WarehouseShippingZoneAssign {
+type WarehouseShippingZoneAssign @doc(category: "Products") {
warehouseErrors: [WarehouseError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [WarehouseError!]!
warehouse: Warehouse
@@ -16484,7 +16494,7 @@ Remove shipping zone from given warehouse.
Requires one of the following permissions: MANAGE_PRODUCTS.
"""
-type WarehouseShippingZoneUnassign {
+type WarehouseShippingZoneUnassign @doc(category: "Products") {
warehouseErrors: [WarehouseError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [WarehouseError!]!
warehouse: Warehouse
@@ -16499,12 +16509,12 @@ Note: this API is currently in Feature Preview and can be subject to changes at
Requires one of the following permissions: MANAGE_TAXES.
"""
-type TaxClassCreate {
+type TaxClassCreate @doc(category: "Taxes") {
errors: [TaxClassCreateError!]!
taxClass: TaxClass
}
-type TaxClassCreateError {
+type TaxClassCreateError @doc(category: "Taxes") {
"""
Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
"""
@@ -16527,7 +16537,7 @@ enum TaxClassCreateErrorCode {
NOT_FOUND
}
-input TaxClassCreateInput {
+input TaxClassCreateInput @doc(category: "Taxes") {
"""Name of the tax class."""
name: String!
@@ -16535,7 +16545,7 @@ input TaxClassCreateInput {
createCountryRates: [CountryRateInput!]
}
-input CountryRateInput {
+input CountryRateInput @doc(category: "Taxes") {
"""Country in which this rate applies."""
countryCode: CountryCode!
@@ -16554,7 +16564,7 @@ Note: this API is currently in Feature Preview and can be subject to changes at
Requires one of the following permissions: MANAGE_TAXES.
"""
-type TaxClassDelete {
+type TaxClassDelete @doc(category: "Taxes") {
errors: [TaxClassDeleteError!]!
taxClass: TaxClass
}
@@ -16588,7 +16598,7 @@ Note: this API is currently in Feature Preview and can be subject to changes at
Requires one of the following permissions: MANAGE_TAXES.
"""
-type TaxClassUpdate {
+type TaxClassUpdate @doc(category: "Taxes") {
errors: [TaxClassUpdateError!]!
taxClass: TaxClass
}
@@ -16651,7 +16661,7 @@ Note: this API is currently in Feature Preview and can be subject to changes at
Requires one of the following permissions: MANAGE_TAXES.
"""
-type TaxConfigurationUpdate {
+type TaxConfigurationUpdate @doc(category: "Taxes") {
errors: [TaxConfigurationUpdateError!]!
taxConfiguration: TaxConfiguration
}
@@ -16733,13 +16743,13 @@ Note: this API is currently in Feature Preview and can be subject to changes at
Requires one of the following permissions: MANAGE_TAXES.
"""
-type TaxCountryConfigurationUpdate {
+type TaxCountryConfigurationUpdate @doc(category: "Taxes") {
"""Updated tax class rates grouped by a country."""
taxCountryConfiguration: TaxCountryConfiguration
errors: [TaxCountryConfigurationUpdateError!]!
}
-type TaxCountryConfigurationUpdateError {
+type TaxCountryConfigurationUpdateError @doc(category: "Taxes") {
"""
Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
"""
@@ -16764,7 +16774,7 @@ enum TaxCountryConfigurationUpdateErrorCode {
CANNOT_CREATE_NEGATIVE_RATE
}
-input TaxClassRateInput {
+input TaxClassRateInput @doc(category: "Taxes") {
"""ID of a tax class for which to update the tax rate"""
taxClassId: ID
@@ -16781,7 +16791,7 @@ Note: this API is currently in Feature Preview and can be subject to changes at
Requires one of the following permissions: MANAGE_TAXES.
"""
-type TaxCountryConfigurationDelete {
+type TaxCountryConfigurationDelete @doc(category: "Taxes") {
"""Updated tax class rates grouped by a country."""
taxCountryConfiguration: TaxCountryConfiguration
errors: [TaxCountryConfigurationDeleteError!]!
@@ -16816,7 +16826,7 @@ Note: this API is currently in Feature Preview and can be subject to changes at
Requires one of the following permissions: MANAGE_TAXES.
"""
-type TaxExemptionManage {
+type TaxExemptionManage @doc(category: "Taxes") {
taxableObject: TaxSourceObject
errors: [TaxExemptionManageError!]!
}
@@ -16853,7 +16863,7 @@ Note: this API is currently in Feature Preview and can be subject to changes at
Requires one of the following permissions: MANAGE_PRODUCTS.
"""
-type StockBulkUpdate {
+type StockBulkUpdate @doc(category: "Products") {
"""Returns how many objects were updated."""
count: Int!
@@ -16862,7 +16872,7 @@ type StockBulkUpdate {
errors: [StockBulkUpdateError!]!
}
-type StockBulkResult {
+type StockBulkResult @doc(category: "Products") {
"""Stock data."""
stock: Stock
@@ -16904,7 +16914,7 @@ enum ErrorPolicyEnum {
REJECT_FAILED_ROWS
}
-input StockBulkUpdateInput {
+input StockBulkUpdateInput @doc(category: "Products") {
"""Variant ID."""
variantId: ID
@@ -16926,7 +16936,7 @@ Creates a new staff notification recipient.
Requires one of the following permissions: MANAGE_SETTINGS.
"""
-type StaffNotificationRecipientCreate {
+type StaffNotificationRecipientCreate @doc(category: "Users") {
shopErrors: [ShopError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [ShopError!]!
staffNotificationRecipient: StaffNotificationRecipient
@@ -16972,7 +16982,7 @@ Updates a staff notification recipient.
Requires one of the following permissions: MANAGE_SETTINGS.
"""
-type StaffNotificationRecipientUpdate {
+type StaffNotificationRecipientUpdate @doc(category: "Users") {
shopErrors: [ShopError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [ShopError!]!
staffNotificationRecipient: StaffNotificationRecipient
@@ -16983,7 +16993,7 @@ Delete staff notification recipient.
Requires one of the following permissions: MANAGE_SETTINGS.
"""
-type StaffNotificationRecipientDelete {
+type StaffNotificationRecipientDelete @doc(category: "Users") {
shopErrors: [ShopError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [ShopError!]!
staffNotificationRecipient: StaffNotificationRecipient
@@ -17178,7 +17188,7 @@ Update shop order settings across all channels. Returns `orderSettings` for the
Requires one of the following permissions: MANAGE_ORDERS.
"""
-type OrderSettingsUpdate {
+type OrderSettingsUpdate @doc(category: "Orders") {
"""Order settings."""
orderSettings: OrderSettings
orderSettingsErrors: [OrderSettingsError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -17203,7 +17213,7 @@ enum OrderSettingsErrorCode {
INVALID
}
-input OrderSettingsUpdateInput {
+input OrderSettingsUpdateInput @doc(category: "Orders") {
"""
When disabled, all new orders from checkout will be marked as unconfirmed. When enabled orders from checkout will become unfulfilled immediately. By default set to True
"""
@@ -17220,7 +17230,7 @@ Update gift card settings.
Requires one of the following permissions: MANAGE_GIFT_CARD.
"""
-type GiftCardSettingsUpdate {
+type GiftCardSettingsUpdate @doc(category: "Gift cards") {
"""Gift card settings."""
giftCardSettings: GiftCardSettings
errors: [GiftCardSettingsError!]!
@@ -17246,7 +17256,7 @@ enum GiftCardSettingsErrorCode {
GRAPHQL_ERROR
}
-input GiftCardSettingsUpdateInput {
+input GiftCardSettingsUpdateInput @doc(category: "Gift cards") {
"""Defines gift card default expiry settings."""
expiryType: GiftCardSettingsExpiryTypeEnum
@@ -17332,7 +17342,7 @@ Creates a new shipping price.
Requires one of the following permissions: MANAGE_SHIPPING.
"""
-type ShippingPriceCreate {
+type ShippingPriceCreate @doc(category: "Shipping") {
"""A shipping zone to which the shipping method belongs."""
shippingZone: ShippingZone
shippingMethod: ShippingMethodType
@@ -17395,7 +17405,7 @@ Deletes a shipping price.
Requires one of the following permissions: MANAGE_SHIPPING.
"""
-type ShippingPriceDelete {
+type ShippingPriceDelete @doc(category: "Shipping") {
"""A shipping method to delete."""
shippingMethod: ShippingMethodType
@@ -17410,7 +17420,7 @@ Deletes shipping prices.
Requires one of the following permissions: MANAGE_SHIPPING.
"""
-type ShippingPriceBulkDelete {
+type ShippingPriceBulkDelete @doc(category: "Shipping") {
"""Returns how many objects were affected."""
count: Int!
shippingErrors: [ShippingError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -17422,7 +17432,7 @@ Updates a new shipping price.
Requires one of the following permissions: MANAGE_SHIPPING.
"""
-type ShippingPriceUpdate {
+type ShippingPriceUpdate @doc(category: "Shipping") {
"""A shipping zone to which the shipping method belongs."""
shippingZone: ShippingZone
shippingMethod: ShippingMethodType
@@ -17435,7 +17445,7 @@ Creates/updates translations for a shipping method.
Requires one of the following permissions: MANAGE_TRANSLATIONS.
"""
-type ShippingPriceTranslate {
+type ShippingPriceTranslate @doc(category: "Shipping") {
translationErrors: [TranslationError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [TranslationError!]!
shippingMethod: ShippingMethodType
@@ -17457,14 +17467,14 @@ Exclude products from shipping price.
Requires one of the following permissions: MANAGE_SHIPPING.
"""
-type ShippingPriceExcludeProducts {
+type ShippingPriceExcludeProducts @doc(category: "Shipping") {
"""A shipping method with new list of excluded products."""
shippingMethod: ShippingMethodType
shippingErrors: [ShippingError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [ShippingError!]!
}
-input ShippingPriceExcludeProductsInput {
+input ShippingPriceExcludeProductsInput @doc(category: "Shipping") {
"""List of products which will be excluded."""
products: [ID!]!
}
@@ -17474,7 +17484,7 @@ Remove product from excluded list for shipping price.
Requires one of the following permissions: MANAGE_SHIPPING.
"""
-type ShippingPriceRemoveProductFromExclude {
+type ShippingPriceRemoveProductFromExclude @doc(category: "Shipping") {
"""A shipping method with new list of excluded products."""
shippingMethod: ShippingMethodType
shippingErrors: [ShippingError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -17486,7 +17496,7 @@ Creates a new shipping zone.
Requires one of the following permissions: MANAGE_SHIPPING.
"""
-type ShippingZoneCreate {
+type ShippingZoneCreate @doc(category: "Shipping") {
shippingErrors: [ShippingError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [ShippingError!]!
shippingZone: ShippingZone
@@ -17519,7 +17529,7 @@ Deletes a shipping zone.
Requires one of the following permissions: MANAGE_SHIPPING.
"""
-type ShippingZoneDelete {
+type ShippingZoneDelete @doc(category: "Shipping") {
shippingErrors: [ShippingError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [ShippingError!]!
shippingZone: ShippingZone
@@ -17530,7 +17540,7 @@ Deletes shipping zones.
Requires one of the following permissions: MANAGE_SHIPPING.
"""
-type ShippingZoneBulkDelete {
+type ShippingZoneBulkDelete @doc(category: "Shipping") {
"""Returns how many objects were affected."""
count: Int!
shippingErrors: [ShippingError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -17542,7 +17552,7 @@ Updates a new shipping zone.
Requires one of the following permissions: MANAGE_SHIPPING.
"""
-type ShippingZoneUpdate {
+type ShippingZoneUpdate @doc(category: "Shipping") {
shippingErrors: [ShippingError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [ShippingError!]!
shippingZone: ShippingZone
@@ -17581,7 +17591,7 @@ Assign attributes to a given product type.
Requires one of the following permissions: MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES.
"""
-type ProductAttributeAssign {
+type ProductAttributeAssign @doc(category: "Products") {
"""The updated product type."""
productType: ProductType
productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -17631,7 +17641,7 @@ enum ProductErrorCode {
PREORDER_VARIANT_CANNOT_BE_DEACTIVATED
}
-input ProductAttributeAssignInput {
+input ProductAttributeAssignInput @doc(category: "Products") {
"""The ID of the attribute to assign."""
id: ID!
@@ -17646,7 +17656,7 @@ input ProductAttributeAssignInput {
variantSelection: Boolean
}
-enum ProductAttributeType {
+enum ProductAttributeType @doc(category: "Products") {
PRODUCT
VARIANT
}
@@ -17658,14 +17668,14 @@ Added in Saleor 3.1.
Requires one of the following permissions: MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES.
"""
-type ProductAttributeAssignmentUpdate {
+type ProductAttributeAssignmentUpdate @doc(category: "Products") {
"""The updated product type."""
productType: ProductType
productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [ProductError!]!
}
-input ProductAttributeAssignmentUpdateInput {
+input ProductAttributeAssignmentUpdateInput @doc(category: "Products") {
"""The ID of the attribute to assign."""
id: ID!
@@ -17682,7 +17692,7 @@ Un-assign attributes from a given product type.
Requires one of the following permissions: MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES.
"""
-type ProductAttributeUnassign {
+type ProductAttributeUnassign @doc(category: "Products") {
"""The updated product type."""
productType: ProductType
productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -17694,7 +17704,7 @@ Creates a new category.
Requires one of the following permissions: MANAGE_PRODUCTS.
"""
-type CategoryCreate {
+type CategoryCreate @doc(category: "Products") {
productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [ProductError!]!
category: Category
@@ -17764,7 +17774,7 @@ Deletes a category.
Requires one of the following permissions: MANAGE_PRODUCTS.
"""
-type CategoryDelete {
+type CategoryDelete @doc(category: "Products") {
productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [ProductError!]!
category: Category
@@ -17775,7 +17785,7 @@ Deletes categories.
Requires one of the following permissions: MANAGE_PRODUCTS.
"""
-type CategoryBulkDelete {
+type CategoryBulkDelete @doc(category: "Products") {
"""Returns how many objects were affected."""
count: Int!
productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -17787,7 +17797,7 @@ Updates a category.
Requires one of the following permissions: MANAGE_PRODUCTS.
"""
-type CategoryUpdate {
+type CategoryUpdate @doc(category: "Products") {
productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [ProductError!]!
category: Category
@@ -17798,7 +17808,7 @@ Creates/updates translations for a category.
Requires one of the following permissions: MANAGE_TRANSLATIONS.
"""
-type CategoryTranslate {
+type CategoryTranslate @doc(category: "Products") {
translationErrors: [TranslationError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [TranslationError!]!
category: Category
@@ -17822,7 +17832,7 @@ Adds products to a collection.
Requires one of the following permissions: MANAGE_PRODUCTS.
"""
-type CollectionAddProducts {
+type CollectionAddProducts @doc(category: "Products") {
"""Collection to which products will be added."""
collection: Collection
collectionErrors: [CollectionError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -17861,13 +17871,13 @@ Creates a new collection.
Requires one of the following permissions: MANAGE_PRODUCTS.
"""
-type CollectionCreate {
+type CollectionCreate @doc(category: "Products") {
collectionErrors: [CollectionError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [CollectionError!]!
collection: Collection
}
-input CollectionCreateInput {
+input CollectionCreateInput @doc(category: "Products") {
"""Informs whether a collection is published."""
isPublished: Boolean
@@ -17923,7 +17933,7 @@ Deletes a collection.
Requires one of the following permissions: MANAGE_PRODUCTS.
"""
-type CollectionDelete {
+type CollectionDelete @doc(category: "Products") {
collectionErrors: [CollectionError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [CollectionError!]!
collection: Collection
@@ -17934,14 +17944,14 @@ Reorder the products of a collection.
Requires one of the following permissions: MANAGE_PRODUCTS.
"""
-type CollectionReorderProducts {
+type CollectionReorderProducts @doc(category: "Products") {
"""Collection from which products are reordered."""
collection: Collection
collectionErrors: [CollectionError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [CollectionError!]!
}
-input MoveProductInput {
+input MoveProductInput @doc(category: "Products") {
"""The ID of the product to move."""
productId: ID!
@@ -17956,7 +17966,7 @@ Deletes collections.
Requires one of the following permissions: MANAGE_PRODUCTS.
"""
-type CollectionBulkDelete {
+type CollectionBulkDelete @doc(category: "Products") {
"""Returns how many objects were affected."""
count: Int!
collectionErrors: [CollectionError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -17968,7 +17978,7 @@ Remove products from a collection.
Requires one of the following permissions: MANAGE_PRODUCTS.
"""
-type CollectionRemoveProducts {
+type CollectionRemoveProducts @doc(category: "Products") {
"""Collection from which products will be removed."""
collection: Collection
collectionErrors: [CollectionError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -17980,13 +17990,13 @@ Updates a collection.
Requires one of the following permissions: MANAGE_PRODUCTS.
"""
-type CollectionUpdate {
+type CollectionUpdate @doc(category: "Products") {
collectionErrors: [CollectionError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [CollectionError!]!
collection: Collection
}
-input CollectionInput {
+input CollectionInput @doc(category: "Products") {
"""Informs whether a collection is published."""
isPublished: Boolean
@@ -18039,7 +18049,7 @@ Creates/updates translations for a collection.
Requires one of the following permissions: MANAGE_TRANSLATIONS.
"""
-type CollectionTranslate {
+type CollectionTranslate @doc(category: "Products") {
translationErrors: [TranslationError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [TranslationError!]!
collection: Collection
@@ -18050,7 +18060,7 @@ Manage collection's availability in channels.
Requires one of the following permissions: MANAGE_PRODUCTS.
"""
-type CollectionChannelListingUpdate {
+type CollectionChannelListingUpdate @doc(category: "Products") {
"""An updated collection instance."""
collection: Collection
collectionChannelListingErrors: [CollectionChannelListingError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -18079,7 +18089,7 @@ type CollectionChannelListingError {
channels: [ID!]
}
-input CollectionChannelListingUpdateInput {
+input CollectionChannelListingUpdateInput @doc(category: "Products") {
"""List of channels to which the collection should be assigned."""
addChannels: [PublishableChannelListingInput!]
@@ -18087,7 +18097,7 @@ input CollectionChannelListingUpdateInput {
removeChannels: [ID!]
}
-input PublishableChannelListingInput {
+input PublishableChannelListingInput @doc(category: "Products") {
"""ID of a channel."""
channelId: ID!
@@ -18114,13 +18124,13 @@ Creates a new product.
Requires one of the following permissions: MANAGE_PRODUCTS.
"""
-type ProductCreate {
+type ProductCreate @doc(category: "Products") {
productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [ProductError!]!
product: Product
}
-input ProductCreateInput {
+input ProductCreateInput @doc(category: "Products") {
"""List of attributes."""
attributes: [AttributeValueInput!]
@@ -18196,7 +18206,7 @@ input ProductCreateInput {
productType: ID!
}
-input AttributeValueInput {
+input AttributeValueInput @doc(category: "Attributes") {
"""ID of the selected attribute."""
id: ID
@@ -18263,7 +18273,7 @@ Represents attribute value. If no ID provided, value will be resolved.
Added in Saleor 3.9.
"""
-input AttributeValueSelectableTypeInput {
+input AttributeValueSelectableTypeInput @doc(category: "Attributes") {
"""ID of an attribute value."""
id: ID
@@ -18278,7 +18288,7 @@ Deletes a product.
Requires one of the following permissions: MANAGE_PRODUCTS.
"""
-type ProductDelete {
+type ProductDelete @doc(category: "Products") {
productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [ProductError!]!
product: Product
@@ -18289,7 +18299,7 @@ Deletes products.
Requires one of the following permissions: MANAGE_PRODUCTS.
"""
-type ProductBulkDelete {
+type ProductBulkDelete @doc(category: "Products") {
"""Returns how many objects were affected."""
count: Int!
productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -18301,13 +18311,13 @@ Updates an existing product.
Requires one of the following permissions: MANAGE_PRODUCTS.
"""
-type ProductUpdate {
+type ProductUpdate @doc(category: "Products") {
productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [ProductError!]!
product: Product
}
-input ProductInput {
+input ProductInput @doc(category: "Products") {
"""List of attributes."""
attributes: [AttributeValueInput!]
@@ -18385,7 +18395,7 @@ Creates/updates translations for a product.
Requires one of the following permissions: MANAGE_TRANSLATIONS.
"""
-type ProductTranslate {
+type ProductTranslate @doc(category: "Products") {
translationErrors: [TranslationError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [TranslationError!]!
product: Product
@@ -18396,7 +18406,7 @@ Manage product's availability in channels.
Requires one of the following permissions: MANAGE_PRODUCTS.
"""
-type ProductChannelListingUpdate {
+type ProductChannelListingUpdate @doc(category: "Products") {
"""An updated product instance."""
product: Product
productChannelListingErrors: [ProductChannelListingError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -18428,7 +18438,7 @@ type ProductChannelListingError {
variants: [ID!]
}
-input ProductChannelListingUpdateInput {
+input ProductChannelListingUpdateInput @doc(category: "Products") {
"""List of channels to which the product should be assigned or updated."""
updateChannels: [ProductChannelListingAddInput!]
@@ -18436,7 +18446,7 @@ input ProductChannelListingUpdateInput {
removeChannels: [ID!]
}
-input ProductChannelListingAddInput {
+input ProductChannelListingAddInput @doc(category: "Products") {
"""ID of a channel."""
channelId: ID!
@@ -18491,14 +18501,14 @@ Create a media object (image or video URL) associated with product. For image, t
Requires one of the following permissions: MANAGE_PRODUCTS.
"""
-type ProductMediaCreate {
+type ProductMediaCreate @doc(category: "Products") {
product: Product
media: ProductMedia
productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [ProductError!]!
}
-input ProductMediaCreateInput {
+input ProductMediaCreateInput @doc(category: "Products") {
"""Alt text for a product media."""
alt: String
@@ -18517,7 +18527,7 @@ Reorder the variants of a product. Mutation updates updated_at on product and tr
Requires one of the following permissions: MANAGE_PRODUCTS.
"""
-type ProductVariantReorder {
+type ProductVariantReorder @doc(category: "Products") {
product: Product
productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [ProductError!]!
@@ -18538,7 +18548,7 @@ Deletes a product media.
Requires one of the following permissions: MANAGE_PRODUCTS.
"""
-type ProductMediaDelete {
+type ProductMediaDelete @doc(category: "Products") {
product: Product
media: ProductMedia
productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -18550,7 +18560,7 @@ Deletes product media.
Requires one of the following permissions: MANAGE_PRODUCTS.
"""
-type ProductMediaBulkDelete {
+type ProductMediaBulkDelete @doc(category: "Products") {
"""Returns how many objects were affected."""
count: Int!
productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -18562,7 +18572,7 @@ Changes ordering of the product media.
Requires one of the following permissions: MANAGE_PRODUCTS.
"""
-type ProductMediaReorder {
+type ProductMediaReorder @doc(category: "Products") {
product: Product
media: [ProductMedia!]
productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -18574,14 +18584,14 @@ Updates a product media.
Requires one of the following permissions: MANAGE_PRODUCTS.
"""
-type ProductMediaUpdate {
+type ProductMediaUpdate @doc(category: "Products") {
product: Product
media: ProductMedia
productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [ProductError!]!
}
-input ProductMediaUpdateInput {
+input ProductMediaUpdateInput @doc(category: "Products") {
"""Alt text for a product media."""
alt: String
}
@@ -18591,13 +18601,13 @@ Creates a new product type.
Requires one of the following permissions: MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES.
"""
-type ProductTypeCreate {
+type ProductTypeCreate @doc(category: "Products") {
productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [ProductError!]!
productType: ProductType
}
-input ProductTypeInput {
+input ProductTypeInput @doc(category: "Products") {
"""Name of the product type."""
name: String
@@ -18647,7 +18657,7 @@ Deletes a product type.
Requires one of the following permissions: MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES.
"""
-type ProductTypeDelete {
+type ProductTypeDelete @doc(category: "Products") {
productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [ProductError!]!
productType: ProductType
@@ -18658,7 +18668,7 @@ Deletes product types.
Requires one of the following permissions: MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES.
"""
-type ProductTypeBulkDelete {
+type ProductTypeBulkDelete @doc(category: "Products") {
"""Returns how many objects were affected."""
count: Int!
productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -18670,7 +18680,7 @@ Updates an existing product type.
Requires one of the following permissions: MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES.
"""
-type ProductTypeUpdate {
+type ProductTypeUpdate @doc(category: "Products") {
productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [ProductError!]!
productType: ProductType
@@ -18681,7 +18691,7 @@ Reorder the attributes of a product type.
Requires one of the following permissions: MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES.
"""
-type ProductTypeReorderAttributes {
+type ProductTypeReorderAttributes @doc(category: "Products") {
"""Product type from which attributes are reordered."""
productType: ProductType
productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -18693,7 +18703,7 @@ Reorder product attribute values.
Requires one of the following permissions: MANAGE_PRODUCTS.
"""
-type ProductReorderAttributeValues {
+type ProductReorderAttributeValues @doc(category: "Products") {
"""Product from which attribute values are reordered."""
product: Product
productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -18705,14 +18715,14 @@ Create new digital content. This mutation must be sent as a `multipart` request.
Requires one of the following permissions: MANAGE_PRODUCTS.
"""
-type DigitalContentCreate {
+type DigitalContentCreate @doc(category: "Products") {
variant: ProductVariant
content: DigitalContent
productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [ProductError!]!
}
-input DigitalContentUploadInput {
+input DigitalContentUploadInput @doc(category: "Products") {
"""Use default digital content settings for this product."""
useDefaultSettings: Boolean!
@@ -18752,7 +18762,7 @@ Remove digital content assigned to given variant.
Requires one of the following permissions: MANAGE_PRODUCTS.
"""
-type DigitalContentDelete {
+type DigitalContentDelete @doc(category: "Products") {
variant: ProductVariant
productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [ProductError!]!
@@ -18763,14 +18773,14 @@ Update digital content.
Requires one of the following permissions: MANAGE_PRODUCTS.
"""
-type DigitalContentUpdate {
+type DigitalContentUpdate @doc(category: "Products") {
variant: ProductVariant
content: DigitalContent
productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [ProductError!]!
}
-input DigitalContentInput {
+input DigitalContentInput @doc(category: "Products") {
"""Use default digital content settings for this product."""
useDefaultSettings: Boolean!
@@ -18813,7 +18823,7 @@ type DigitalContentUrlCreate {
digitalContentUrl: DigitalContentUrl
}
-input DigitalContentUrlCreateInput {
+input DigitalContentUrlCreateInput @doc(category: "Products") {
"""Digital content ID which URL will belong to."""
content: ID!
}
@@ -18823,13 +18833,13 @@ Creates a new variant for a product.
Requires one of the following permissions: MANAGE_PRODUCTS.
"""
-type ProductVariantCreate {
+type ProductVariantCreate @doc(category: "Products") {
productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [ProductError!]!
productVariant: ProductVariant
}
-input ProductVariantCreateInput {
+input ProductVariantCreateInput @doc(category: "Products") {
"""List of attributes specific to this variant."""
attributes: [AttributeValueInput!]!
@@ -18893,7 +18903,7 @@ input ProductVariantCreateInput {
stocks: [StockInput!]
}
-input PreorderSettingsInput {
+input PreorderSettingsInput @doc(category: "Products") {
"""The global threshold for preorder variant."""
globalThreshold: Int
@@ -18901,7 +18911,7 @@ input PreorderSettingsInput {
endDate: DateTime
}
-input StockInput {
+input StockInput @doc(category: "Products") {
"""Warehouse in which stock is located."""
warehouse: ID!
@@ -18914,7 +18924,7 @@ Deletes a product variant.
Requires one of the following permissions: MANAGE_PRODUCTS.
"""
-type ProductVariantDelete {
+type ProductVariantDelete @doc(category: "Products") {
productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [ProductError!]!
productVariant: ProductVariant
@@ -18925,7 +18935,7 @@ Creates product variants for a given product.
Requires one of the following permissions: MANAGE_PRODUCTS.
"""
-type ProductVariantBulkCreate {
+type ProductVariantBulkCreate @doc(category: "Products") {
"""Returns how many objects were created."""
count: Int!
@@ -18942,7 +18952,7 @@ type ProductVariantBulkCreate {
errors: [BulkProductError!]!
}
-type ProductVariantBulkResult {
+type ProductVariantBulkResult @doc(category: "Products") {
"""Product variant data."""
productVariant: ProductVariant
@@ -19033,7 +19043,7 @@ type BulkProductError {
channels: [ID!]
}
-input ProductVariantBulkCreateInput {
+input ProductVariantBulkCreateInput @doc(category: "Products") {
"""List of attributes specific to this variant."""
attributes: [BulkAttributeValueInput!]!
@@ -19097,7 +19107,7 @@ input ProductVariantBulkCreateInput {
channelListings: [ProductVariantChannelListingAddInput!]
}
-input BulkAttributeValueInput {
+input BulkAttributeValueInput @doc(category: "Products") {
"""ID of the selected attribute."""
id: ID
@@ -19189,7 +19199,7 @@ input BulkAttributeValueInput {
dateTime: DateTime
}
-input ProductVariantChannelListingAddInput {
+input ProductVariantChannelListingAddInput @doc(category: "Products") {
"""ID of a channel."""
channelId: ID!
@@ -19218,7 +19228,7 @@ Note: this API is currently in Feature Preview and can be subject to changes at
Requires one of the following permissions: MANAGE_PRODUCTS.
"""
-type ProductVariantBulkUpdate {
+type ProductVariantBulkUpdate @doc(category: "Products") {
"""Returns how many objects were updated."""
count: Int!
@@ -19232,7 +19242,7 @@ Input fields to update product variants.
Added in Saleor 3.11.
"""
-input ProductVariantBulkUpdateInput {
+input ProductVariantBulkUpdateInput @doc(category: "Products") {
"""List of attributes specific to this variant."""
attributes: [BulkAttributeValueInput!]
@@ -19311,7 +19321,7 @@ input ProductVariantBulkUpdateInput {
id: ID!
}
-input ProductVariantStocksUpdateInput {
+input ProductVariantStocksUpdateInput @doc(category: "Products") {
"""List of warehouses to create stocks."""
create: [StockInput!]
@@ -19322,7 +19332,7 @@ input ProductVariantStocksUpdateInput {
remove: [ID!]
}
-input StockUpdateInput {
+input StockUpdateInput @doc(category: "Products") {
"""Stock."""
stock: ID!
@@ -19330,7 +19340,7 @@ input StockUpdateInput {
quantity: Int!
}
-input ProductVariantChannelListingUpdateInput {
+input ProductVariantChannelListingUpdateInput @doc(category: "Products") {
"""List of channels to create variant channel listings."""
create: [ProductVariantChannelListingAddInput!]
@@ -19341,7 +19351,7 @@ input ProductVariantChannelListingUpdateInput {
remove: [ID!]
}
-input ChannelListingUpdateInput {
+input ChannelListingUpdateInput @doc(category: "Products") {
"""ID of a channel listing."""
channelListing: ID!
@@ -19360,7 +19370,7 @@ Deletes product variants.
Requires one of the following permissions: MANAGE_PRODUCTS.
"""
-type ProductVariantBulkDelete {
+type ProductVariantBulkDelete @doc(category: "Products") {
"""Returns how many objects were affected."""
count: Int!
productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -19372,7 +19382,7 @@ Creates stocks for product variant.
Requires one of the following permissions: MANAGE_PRODUCTS.
"""
-type ProductVariantStocksCreate {
+type ProductVariantStocksCreate @doc(category: "Products") {
"""Updated product variant."""
productVariant: ProductVariant
bulkStockErrors: [BulkStockError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -19406,7 +19416,7 @@ Delete stocks from product variant.
Requires one of the following permissions: MANAGE_PRODUCTS.
"""
-type ProductVariantStocksDelete {
+type ProductVariantStocksDelete @doc(category: "Products") {
"""Updated product variant."""
productVariant: ProductVariant
stockErrors: [StockError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -19441,7 +19451,7 @@ Update stocks for product variant.
Requires one of the following permissions: MANAGE_PRODUCTS.
"""
-type ProductVariantStocksUpdate {
+type ProductVariantStocksUpdate @doc(category: "Products") {
"""Updated product variant."""
productVariant: ProductVariant
bulkStockErrors: [BulkStockError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -19453,13 +19463,13 @@ Updates an existing variant for product.
Requires one of the following permissions: MANAGE_PRODUCTS.
"""
-type ProductVariantUpdate {
+type ProductVariantUpdate @doc(category: "Products") {
productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [ProductError!]!
productVariant: ProductVariant
}
-input ProductVariantInput {
+input ProductVariantInput @doc(category: "Products") {
"""List of attributes specific to this variant."""
attributes: [AttributeValueInput!]
@@ -19522,7 +19532,7 @@ Set default variant for a product. Mutation triggers PRODUCT_UPDATED webhook.
Requires one of the following permissions: MANAGE_PRODUCTS.
"""
-type ProductVariantSetDefault {
+type ProductVariantSetDefault @doc(category: "Products") {
product: Product
productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [ProductError!]!
@@ -19533,7 +19543,7 @@ Creates/updates translations for a product variant.
Requires one of the following permissions: MANAGE_TRANSLATIONS.
"""
-type ProductVariantTranslate {
+type ProductVariantTranslate @doc(category: "Products") {
translationErrors: [TranslationError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [TranslationError!]!
productVariant: ProductVariant
@@ -19548,7 +19558,7 @@ Manage product variant prices in channels.
Requires one of the following permissions: MANAGE_PRODUCTS.
"""
-type ProductVariantChannelListingUpdate {
+type ProductVariantChannelListingUpdate @doc(category: "Products") {
"""An updated product variant instance."""
variant: ProductVariant
productChannelListingErrors: [ProductChannelListingError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -19560,7 +19570,7 @@ Reorder product variant attribute values.
Requires one of the following permissions: MANAGE_PRODUCTS.
"""
-type ProductVariantReorderAttributeValues {
+type ProductVariantReorderAttributeValues @doc(category: "Products") {
"""Product variant from which attribute values are reordered."""
productVariant: ProductVariant
productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -19576,7 +19586,7 @@ Note: this API is currently in Feature Preview and can be subject to changes at
Requires one of the following permissions: MANAGE_PRODUCTS.
"""
-type ProductVariantPreorderDeactivate {
+type ProductVariantPreorderDeactivate @doc(category: "Products") {
"""Product variant with ended preorder."""
productVariant: ProductVariant
errors: [ProductError!]!
@@ -19587,7 +19597,7 @@ Assign an media to a product variant.
Requires one of the following permissions: MANAGE_PRODUCTS.
"""
-type VariantMediaAssign {
+type VariantMediaAssign @doc(category: "Products") {
productVariant: ProductVariant
media: ProductMedia
productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -19599,7 +19609,7 @@ Unassign an media from a product variant.
Requires one of the following permissions: MANAGE_PRODUCTS.
"""
-type VariantMediaUnassign {
+type VariantMediaUnassign @doc(category: "Products") {
productVariant: ProductVariant
media: ProductMedia
productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -19611,7 +19621,7 @@ Captures the authorized payment amount.
Requires one of the following permissions: MANAGE_ORDERS.
"""
-type PaymentCapture {
+type PaymentCapture @doc(category: "Payments") {
"""Updated payment."""
payment: Payment
paymentErrors: [PaymentError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -19660,7 +19670,7 @@ Refunds the captured payment amount.
Requires one of the following permissions: MANAGE_ORDERS.
"""
-type PaymentRefund {
+type PaymentRefund @doc(category: "Payments") {
"""Updated payment."""
payment: Payment
paymentErrors: [PaymentError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -19672,7 +19682,7 @@ Voids the authorized payment.
Requires one of the following permissions: MANAGE_ORDERS.
"""
-type PaymentVoid {
+type PaymentVoid @doc(category: "Payments") {
"""Updated payment."""
payment: Payment
paymentErrors: [PaymentError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -19680,7 +19690,7 @@ type PaymentVoid {
}
"""Initializes payment process when it is required by gateway."""
-type PaymentInitialize {
+type PaymentInitialize @doc(category: "Payments") {
initializedPayment: PaymentInitialized
paymentErrors: [PaymentError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [PaymentError!]!
@@ -19701,14 +19711,14 @@ type PaymentInitialized {
}
"""Check payment balance."""
-type PaymentCheckBalance {
+type PaymentCheckBalance @doc(category: "Payments") {
"""Response from the gateway."""
data: JSONString
paymentErrors: [PaymentError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [PaymentError!]!
}
-input PaymentCheckBalanceInput {
+input PaymentCheckBalanceInput @doc(category: "Payments") {
"""An ID of a payment gateway to check."""
gatewayId: String!
@@ -19750,7 +19760,7 @@ Added in Saleor 3.4.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type TransactionCreate {
+type TransactionCreate @doc(category: "Payments") {
transaction: TransactionItem
errors: [TransactionCreateError!]!
}
@@ -19777,7 +19787,7 @@ enum TransactionCreateErrorCode {
METADATA_KEY_REQUIRED
}
-input TransactionCreateInput {
+input TransactionCreateInput @doc(category: "Payments") {
"""Status of the transaction."""
status: String!
@@ -19809,7 +19819,7 @@ input TransactionCreateInput {
privateMetadata: [MetadataInput!]
}
-input TransactionEventInput {
+input TransactionEventInput @doc(category: "Payments") {
"""Current status of the payment transaction."""
status: TransactionStatus!
@@ -19827,7 +19837,7 @@ Added in Saleor 3.4.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type TransactionUpdate {
+type TransactionUpdate @doc(category: "Payments") {
transaction: TransactionItem
errors: [TransactionUpdateError!]!
}
@@ -19854,7 +19864,7 @@ enum TransactionUpdateErrorCode {
METADATA_KEY_REQUIRED
}
-input TransactionUpdateInput {
+input TransactionUpdateInput @doc(category: "Payments") {
"""Status of the transaction."""
status: String
@@ -19895,7 +19905,7 @@ Note: this API is currently in Feature Preview and can be subject to changes at
Requires one of the following permissions: HANDLE_PAYMENTS, MANAGE_ORDERS.
"""
-type TransactionRequestAction {
+type TransactionRequestAction @doc(category: "Payments") {
transaction: TransactionItem
errors: [TransactionRequestActionError!]!
}
@@ -19926,7 +19936,7 @@ Creates a new page.
Requires one of the following permissions: MANAGE_PAGES.
"""
-type PageCreate {
+type PageCreate @doc(category: "Pages") {
pageErrors: [PageError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [PageError!]!
page: Page
@@ -19962,7 +19972,7 @@ enum PageErrorCode {
ATTRIBUTE_ALREADY_ASSIGNED
}
-input PageCreateInput {
+input PageCreateInput @doc(category: "Pages") {
"""Page internal name."""
slug: String
@@ -20008,7 +20018,7 @@ Deletes a page.
Requires one of the following permissions: MANAGE_PAGES.
"""
-type PageDelete {
+type PageDelete @doc(category: "Pages") {
pageErrors: [PageError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [PageError!]!
page: Page
@@ -20019,7 +20029,7 @@ Deletes pages.
Requires one of the following permissions: MANAGE_PAGES.
"""
-type PageBulkDelete {
+type PageBulkDelete @doc(category: "Pages") {
"""Returns how many objects were affected."""
count: Int!
pageErrors: [PageError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -20031,7 +20041,7 @@ Publish pages.
Requires one of the following permissions: MANAGE_PAGES.
"""
-type PageBulkPublish {
+type PageBulkPublish @doc(category: "Pages") {
"""Returns how many objects were affected."""
count: Int!
pageErrors: [PageError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -20043,13 +20053,13 @@ Updates an existing page.
Requires one of the following permissions: MANAGE_PAGES.
"""
-type PageUpdate {
+type PageUpdate @doc(category: "Pages") {
pageErrors: [PageError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [PageError!]!
page: Page
}
-input PageInput {
+input PageInput @doc(category: "Pages") {
"""Page internal name."""
slug: String
@@ -20092,7 +20102,7 @@ Creates/updates translations for a page.
Requires one of the following permissions: MANAGE_TRANSLATIONS.
"""
-type PageTranslate {
+type PageTranslate @doc(category: "Pages") {
translationErrors: [TranslationError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [TranslationError!]!
page: PageTranslatableContent
@@ -20116,13 +20126,13 @@ Create a new page type.
Requires one of the following permissions: MANAGE_PAGE_TYPES_AND_ATTRIBUTES.
"""
-type PageTypeCreate {
+type PageTypeCreate @doc(category: "Pages") {
pageErrors: [PageError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [PageError!]!
pageType: PageType
}
-input PageTypeCreateInput {
+input PageTypeCreateInput @doc(category: "Pages") {
"""Name of the page type."""
name: String
@@ -20138,13 +20148,13 @@ Update page type.
Requires one of the following permissions: MANAGE_PAGE_TYPES_AND_ATTRIBUTES.
"""
-type PageTypeUpdate {
+type PageTypeUpdate @doc(category: "Pages") {
pageErrors: [PageError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [PageError!]!
pageType: PageType
}
-input PageTypeUpdateInput {
+input PageTypeUpdateInput @doc(category: "Pages") {
"""Name of the page type."""
name: String
@@ -20163,7 +20173,7 @@ Delete a page type.
Requires one of the following permissions: MANAGE_PAGE_TYPES_AND_ATTRIBUTES.
"""
-type PageTypeDelete {
+type PageTypeDelete @doc(category: "Pages") {
pageErrors: [PageError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [PageError!]!
pageType: PageType
@@ -20174,7 +20184,7 @@ Delete page types.
Requires one of the following permissions: MANAGE_PAGE_TYPES_AND_ATTRIBUTES.
"""
-type PageTypeBulkDelete {
+type PageTypeBulkDelete @doc(category: "Pages") {
"""Returns how many objects were affected."""
count: Int!
pageErrors: [PageError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -20186,7 +20196,7 @@ Assign attributes to a given page type.
Requires one of the following permissions: MANAGE_PAGE_TYPES_AND_ATTRIBUTES.
"""
-type PageAttributeAssign {
+type PageAttributeAssign @doc(category: "Pages") {
"""The updated page type."""
pageType: PageType
pageErrors: [PageError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -20198,7 +20208,7 @@ Unassign attributes from a given page type.
Requires one of the following permissions: MANAGE_PAGE_TYPES_AND_ATTRIBUTES.
"""
-type PageAttributeUnassign {
+type PageAttributeUnassign @doc(category: "Pages") {
"""The updated page type."""
pageType: PageType
pageErrors: [PageError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -20210,7 +20220,7 @@ Reorder the attributes of a page type.
Requires one of the following permissions: MANAGE_PAGE_TYPES_AND_ATTRIBUTES.
"""
-type PageTypeReorderAttributes {
+type PageTypeReorderAttributes @doc(category: "Pages") {
"""Page type from which attributes are reordered."""
pageType: PageType
pageErrors: [PageError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -20222,7 +20232,7 @@ Reorder page attribute values.
Requires one of the following permissions: MANAGE_PAGES.
"""
-type PageReorderAttributeValues {
+type PageReorderAttributeValues @doc(category: "Pages") {
"""Page from which attribute values are reordered."""
page: Page
pageErrors: [PageError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -20234,7 +20244,7 @@ Completes creating an order.
Requires one of the following permissions: MANAGE_ORDERS.
"""
-type DraftOrderComplete {
+type DraftOrderComplete @doc(category: "Orders") {
"""Completed order."""
order: Order
orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -20246,13 +20256,13 @@ Creates a new draft order.
Requires one of the following permissions: MANAGE_ORDERS.
"""
-type DraftOrderCreate {
+type DraftOrderCreate @doc(category: "Orders") {
orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [OrderError!]!
order: Order
}
-input DraftOrderCreateInput {
+input DraftOrderCreateInput @doc(category: "Orders") {
"""Billing address of the customer."""
billingAddress: AddressInput
@@ -20296,7 +20306,7 @@ input DraftOrderCreateInput {
lines: [OrderLineCreateInput!]
}
-input OrderLineCreateInput {
+input OrderLineCreateInput @doc(category: "Orders") {
"""Number of variant items ordered."""
quantity: Int!
@@ -20318,7 +20328,7 @@ Deletes a draft order.
Requires one of the following permissions: MANAGE_ORDERS.
"""
-type DraftOrderDelete {
+type DraftOrderDelete @doc(category: "Orders") {
orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [OrderError!]!
order: Order
@@ -20329,7 +20339,7 @@ Deletes draft orders.
Requires one of the following permissions: MANAGE_ORDERS.
"""
-type DraftOrderBulkDelete {
+type DraftOrderBulkDelete @doc(category: "Orders") {
"""Returns how many objects were affected."""
count: Int!
orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -20341,7 +20351,7 @@ Deletes order lines.
Requires one of the following permissions: MANAGE_ORDERS.
"""
-type DraftOrderLinesBulkDelete {
+type DraftOrderLinesBulkDelete @doc(category: "Orders") {
"""Returns how many objects were affected."""
count: Int!
orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -20353,13 +20363,13 @@ Updates a draft order.
Requires one of the following permissions: MANAGE_ORDERS.
"""
-type DraftOrderUpdate {
+type DraftOrderUpdate @doc(category: "Orders") {
orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [OrderError!]!
order: Order
}
-input DraftOrderInput {
+input DraftOrderInput @doc(category: "Orders") {
"""Billing address of the customer."""
billingAddress: AddressInput
@@ -20405,7 +20415,7 @@ Adds note to the order.
Requires one of the following permissions: MANAGE_ORDERS.
"""
-type OrderAddNote {
+type OrderAddNote @doc(category: "Orders") {
"""Order with the note added."""
order: Order
@@ -20415,7 +20425,7 @@ type OrderAddNote {
errors: [OrderError!]!
}
-input OrderAddNoteInput {
+input OrderAddNoteInput @doc(category: "Orders") {
"""Note message."""
message: String!
}
@@ -20425,7 +20435,7 @@ Cancel an order.
Requires one of the following permissions: MANAGE_ORDERS.
"""
-type OrderCancel {
+type OrderCancel @doc(category: "Orders") {
"""Canceled order."""
order: Order
orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -20437,7 +20447,7 @@ Capture an order.
Requires one of the following permissions: MANAGE_ORDERS.
"""
-type OrderCapture {
+type OrderCapture @doc(category: "Orders") {
"""Captured order."""
order: Order
orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -20449,7 +20459,7 @@ Confirms an unconfirmed order by changing status to unfulfilled.
Requires one of the following permissions: MANAGE_ORDERS.
"""
-type OrderConfirm {
+type OrderConfirm @doc(category: "Orders") {
order: Order
orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [OrderError!]!
@@ -20460,7 +20470,7 @@ Creates new fulfillments for an order.
Requires one of the following permissions: MANAGE_ORDERS.
"""
-type OrderFulfill {
+type OrderFulfill @doc(category: "Orders") {
"""List of created fulfillments."""
fulfillments: [Fulfillment!]
@@ -20470,7 +20480,7 @@ type OrderFulfill {
errors: [OrderError!]!
}
-input OrderFulfillInput {
+input OrderFulfillInput @doc(category: "Orders") {
"""List of items informing how to fulfill the order."""
lines: [OrderFulfillLineInput!]!
@@ -20488,7 +20498,7 @@ input OrderFulfillInput {
trackingNumber: String
}
-input OrderFulfillLineInput {
+input OrderFulfillLineInput @doc(category: "Orders") {
"""The ID of the order line."""
orderLineId: ID
@@ -20496,7 +20506,7 @@ input OrderFulfillLineInput {
stocks: [OrderFulfillStockInput!]!
}
-input OrderFulfillStockInput {
+input OrderFulfillStockInput @doc(category: "Orders") {
"""The number of line items to be fulfilled from given warehouse."""
quantity: Int!
@@ -20509,7 +20519,7 @@ Cancels existing fulfillment and optionally restocks items.
Requires one of the following permissions: MANAGE_ORDERS.
"""
-type FulfillmentCancel {
+type FulfillmentCancel @doc(category: "Orders") {
"""A canceled fulfillment."""
fulfillment: Fulfillment
@@ -20519,7 +20529,7 @@ type FulfillmentCancel {
errors: [OrderError!]!
}
-input FulfillmentCancelInput {
+input FulfillmentCancelInput @doc(category: "Orders") {
"""
ID of a warehouse where items will be restocked. Optional when fulfillment is in WAITING_FOR_APPROVAL state.
"""
@@ -20533,7 +20543,7 @@ Added in Saleor 3.1.
Requires one of the following permissions: MANAGE_ORDERS.
"""
-type FulfillmentApprove {
+type FulfillmentApprove @doc(category: "Orders") {
"""An approved fulfillment."""
fulfillment: Fulfillment
@@ -20548,7 +20558,7 @@ Updates a fulfillment for an order.
Requires one of the following permissions: MANAGE_ORDERS.
"""
-type FulfillmentUpdateTracking {
+type FulfillmentUpdateTracking @doc(category: "Orders") {
"""A fulfillment with updated tracking."""
fulfillment: Fulfillment
@@ -20558,7 +20568,7 @@ type FulfillmentUpdateTracking {
errors: [OrderError!]!
}
-input FulfillmentUpdateTrackingInput {
+input FulfillmentUpdateTrackingInput @doc(category: "Orders") {
"""Fulfillment tracking number."""
trackingNumber: String
@@ -20571,7 +20581,7 @@ Refund products.
Requires one of the following permissions: MANAGE_ORDERS.
"""
-type FulfillmentRefundProducts {
+type FulfillmentRefundProducts @doc(category: "Orders") {
"""A refunded fulfillment."""
fulfillment: Fulfillment
@@ -20581,7 +20591,7 @@ type FulfillmentRefundProducts {
errors: [OrderError!]!
}
-input OrderRefundProductsInput {
+input OrderRefundProductsInput @doc(category: "Orders") {
"""List of unfulfilled lines to refund."""
orderLines: [OrderRefundLineInput!]
@@ -20597,7 +20607,7 @@ input OrderRefundProductsInput {
includeShippingCosts: Boolean = false
}
-input OrderRefundLineInput {
+input OrderRefundLineInput @doc(category: "Orders") {
"""The ID of the order line to refund."""
orderLineId: ID!
@@ -20605,7 +20615,7 @@ input OrderRefundLineInput {
quantity: Int!
}
-input OrderRefundFulfillmentLineInput {
+input OrderRefundFulfillmentLineInput @doc(category: "Orders") {
"""The ID of the fulfillment line to refund."""
fulfillmentLineId: ID!
@@ -20618,7 +20628,7 @@ Return products.
Requires one of the following permissions: MANAGE_ORDERS.
"""
-type FulfillmentReturnProducts {
+type FulfillmentReturnProducts @doc(category: "Orders") {
"""A return fulfillment."""
returnFulfillment: Fulfillment
@@ -20634,7 +20644,7 @@ type FulfillmentReturnProducts {
errors: [OrderError!]!
}
-input OrderReturnProductsInput {
+input OrderReturnProductsInput @doc(category: "Orders") {
"""List of unfulfilled lines to return."""
orderLines: [OrderReturnLineInput!]
@@ -20653,7 +20663,7 @@ input OrderReturnProductsInput {
refund: Boolean = false
}
-input OrderReturnLineInput {
+input OrderReturnLineInput @doc(category: "Orders") {
"""The ID of the order line to return."""
orderLineId: ID!
@@ -20664,7 +20674,7 @@ input OrderReturnLineInput {
replace: Boolean = false
}
-input OrderReturnFulfillmentLineInput {
+input OrderReturnFulfillmentLineInput @doc(category: "Orders") {
"""The ID of the fulfillment line to return."""
fulfillmentLineId: ID!
@@ -20680,7 +20690,7 @@ Create order lines for an order.
Requires one of the following permissions: MANAGE_ORDERS.
"""
-type OrderLinesCreate {
+type OrderLinesCreate @doc(category: "Orders") {
"""Related order."""
order: Order
@@ -20695,7 +20705,7 @@ Deletes an order line from an order.
Requires one of the following permissions: MANAGE_ORDERS.
"""
-type OrderLineDelete {
+type OrderLineDelete @doc(category: "Orders") {
"""A related order."""
order: Order
@@ -20710,7 +20720,7 @@ Updates an order line of an order.
Requires one of the following permissions: MANAGE_ORDERS.
"""
-type OrderLineUpdate {
+type OrderLineUpdate @doc(category: "Orders") {
"""Related order."""
order: Order
orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -20718,7 +20728,7 @@ type OrderLineUpdate {
orderLine: OrderLine
}
-input OrderLineInput {
+input OrderLineInput @doc(category: "Orders") {
"""Number of variant items ordered."""
quantity: Int!
}
@@ -20728,14 +20738,14 @@ Adds discount to the order.
Requires one of the following permissions: MANAGE_ORDERS.
"""
-type OrderDiscountAdd {
+type OrderDiscountAdd @doc(category: "Orders") {
"""Order which has been discounted."""
order: Order
orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [OrderError!]!
}
-input OrderDiscountCommonInput {
+input OrderDiscountCommonInput @doc(category: "Orders") {
"""Type of the discount: fixed or percent"""
valueType: DiscountValueTypeEnum!
@@ -20751,7 +20761,7 @@ Update discount for the order.
Requires one of the following permissions: MANAGE_ORDERS.
"""
-type OrderDiscountUpdate {
+type OrderDiscountUpdate @doc(category: "Orders") {
"""Order which has been discounted."""
order: Order
orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -20763,7 +20773,7 @@ Remove discount from the order.
Requires one of the following permissions: MANAGE_ORDERS.
"""
-type OrderDiscountDelete {
+type OrderDiscountDelete @doc(category: "Orders") {
"""Order which has removed discount."""
order: Order
orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -20775,7 +20785,7 @@ Update discount for the order line.
Requires one of the following permissions: MANAGE_ORDERS.
"""
-type OrderLineDiscountUpdate {
+type OrderLineDiscountUpdate @doc(category: "Orders") {
"""Order line which has been discounted."""
orderLine: OrderLine
@@ -20790,7 +20800,7 @@ Remove discount applied to the order line.
Requires one of the following permissions: MANAGE_ORDERS.
"""
-type OrderLineDiscountRemove {
+type OrderLineDiscountRemove @doc(category: "Orders") {
"""Order line which has removed discount."""
orderLine: OrderLine
@@ -20805,7 +20815,7 @@ Mark order as manually paid.
Requires one of the following permissions: MANAGE_ORDERS.
"""
-type OrderMarkAsPaid {
+type OrderMarkAsPaid @doc(category: "Orders") {
"""Order marked as paid."""
order: Order
orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -20817,7 +20827,7 @@ Refund an order.
Requires one of the following permissions: MANAGE_ORDERS.
"""
-type OrderRefund {
+type OrderRefund @doc(category: "Orders") {
"""A refunded order."""
order: Order
orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -20829,7 +20839,7 @@ Updates an order.
Requires one of the following permissions: MANAGE_ORDERS.
"""
-type OrderUpdate {
+type OrderUpdate @doc(category: "Orders") {
orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [OrderError!]!
order: Order
@@ -20858,14 +20868,14 @@ Updates a shipping method of the order. Requires shipping method ID to update, w
Requires one of the following permissions: MANAGE_ORDERS.
"""
-type OrderUpdateShipping {
+type OrderUpdateShipping @doc(category: "Orders") {
"""Order with updated shipping method."""
order: Order
orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [OrderError!]!
}
-input OrderUpdateShippingInput {
+input OrderUpdateShippingInput @doc(category: "Orders") {
"""
ID of the selected shipping method, pass null to remove currently assigned shipping method.
"""
@@ -20877,7 +20887,7 @@ Void an order.
Requires one of the following permissions: MANAGE_ORDERS.
"""
-type OrderVoid {
+type OrderVoid @doc(category: "Orders") {
"""A voided order."""
order: Order
orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -20889,7 +20899,7 @@ Cancels orders.
Requires one of the following permissions: MANAGE_ORDERS.
"""
-type OrderBulkCancel {
+type OrderBulkCancel @doc(category: "Orders") {
"""Returns how many objects were affected."""
count: Int!
orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -21299,7 +21309,7 @@ Activate a gift card.
Requires one of the following permissions: MANAGE_GIFT_CARD.
"""
-type GiftCardActivate {
+type GiftCardActivate @doc(category: "Gift cards") {
"""Activated gift card."""
giftCard: GiftCard
giftCardErrors: [GiftCardError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -21339,13 +21349,13 @@ Creates a new gift card.
Requires one of the following permissions: MANAGE_GIFT_CARD.
"""
-type GiftCardCreate {
+type GiftCardCreate @doc(category: "Gift cards") {
giftCardErrors: [GiftCardError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [GiftCardError!]!
giftCard: GiftCard
}
-input GiftCardCreateInput {
+input GiftCardCreateInput @doc(category: "Gift cards") {
"""
The gift card tags to add.
@@ -21436,7 +21446,7 @@ Note: this API is currently in Feature Preview and can be subject to changes at
Requires one of the following permissions: MANAGE_GIFT_CARD.
"""
-type GiftCardDelete {
+type GiftCardDelete @doc(category: "Gift cards") {
giftCardErrors: [GiftCardError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [GiftCardError!]!
giftCard: GiftCard
@@ -21447,7 +21457,7 @@ Deactivate a gift card.
Requires one of the following permissions: MANAGE_GIFT_CARD.
"""
-type GiftCardDeactivate {
+type GiftCardDeactivate @doc(category: "Gift cards") {
"""Deactivated gift card."""
giftCard: GiftCard
giftCardErrors: [GiftCardError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -21459,13 +21469,13 @@ Update a gift card.
Requires one of the following permissions: MANAGE_GIFT_CARD.
"""
-type GiftCardUpdate {
+type GiftCardUpdate @doc(category: "Gift cards") {
giftCardErrors: [GiftCardError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [GiftCardError!]!
giftCard: GiftCard
}
-input GiftCardUpdateInput {
+input GiftCardUpdateInput @doc(category: "Gift cards") {
"""
The gift card tags to add.
@@ -21526,13 +21536,13 @@ Note: this API is currently in Feature Preview and can be subject to changes at
Requires one of the following permissions: MANAGE_GIFT_CARD.
"""
-type GiftCardResend {
+type GiftCardResend @doc(category: "Gift cards") {
"""Gift card which has been sent."""
giftCard: GiftCard
errors: [GiftCardError!]!
}
-input GiftCardResendInput {
+input GiftCardResendInput @doc(category: "Gift cards") {
"""ID of a gift card to resend."""
id: ID!
@@ -21552,7 +21562,7 @@ Note: this API is currently in Feature Preview and can be subject to changes at
Requires one of the following permissions: MANAGE_GIFT_CARD.
"""
-type GiftCardAddNote {
+type GiftCardAddNote @doc(category: "Gift cards") {
"""Gift card with the note added."""
giftCard: GiftCard
@@ -21561,7 +21571,7 @@ type GiftCardAddNote {
errors: [GiftCardError!]!
}
-input GiftCardAddNoteInput {
+input GiftCardAddNoteInput @doc(category: "Gift cards") {
"""Note message."""
message: String!
}
@@ -21575,7 +21585,7 @@ Note: this API is currently in Feature Preview and can be subject to changes at
Requires one of the following permissions: MANAGE_GIFT_CARD.
"""
-type GiftCardBulkCreate {
+type GiftCardBulkCreate @doc(category: "Gift cards") {
"""Returns how many objects were created."""
count: Int!
@@ -21584,7 +21594,7 @@ type GiftCardBulkCreate {
errors: [GiftCardError!]!
}
-input GiftCardBulkCreateInput {
+input GiftCardBulkCreateInput @doc(category: "Gift cards") {
"""The number of cards to issue."""
count: Int!
@@ -21610,7 +21620,7 @@ Note: this API is currently in Feature Preview and can be subject to changes at
Requires one of the following permissions: MANAGE_GIFT_CARD.
"""
-type GiftCardBulkDelete {
+type GiftCardBulkDelete @doc(category: "Gift cards") {
"""Returns how many objects were affected."""
count: Int!
errors: [GiftCardError!]!
@@ -21625,7 +21635,7 @@ Note: this API is currently in Feature Preview and can be subject to changes at
Requires one of the following permissions: MANAGE_GIFT_CARD.
"""
-type GiftCardBulkActivate {
+type GiftCardBulkActivate @doc(category: "Gift cards") {
"""Returns how many objects were affected."""
count: Int!
errors: [GiftCardError!]!
@@ -21640,7 +21650,7 @@ Note: this API is currently in Feature Preview and can be subject to changes at
Requires one of the following permissions: MANAGE_GIFT_CARD.
"""
-type GiftCardBulkDeactivate {
+type GiftCardBulkDeactivate @doc(category: "Gift cards") {
"""Returns how many objects were affected."""
count: Int!
errors: [GiftCardError!]!
@@ -21748,7 +21758,7 @@ Creates a new sale.
Requires one of the following permissions: MANAGE_DISCOUNTS.
"""
-type SaleCreate {
+type SaleCreate @doc(category: "Discounts") {
discountErrors: [DiscountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [DiscountError!]!
sale: Sale
@@ -21785,7 +21795,7 @@ enum DiscountErrorCode {
DUPLICATED_INPUT_ITEM
}
-input SaleInput {
+input SaleInput @doc(category: "Products") {
"""Voucher name."""
name: String
@@ -21817,7 +21827,7 @@ Deletes a sale.
Requires one of the following permissions: MANAGE_DISCOUNTS.
"""
-type SaleDelete {
+type SaleDelete @doc(category: "Discounts") {
discountErrors: [DiscountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [DiscountError!]!
sale: Sale
@@ -21828,7 +21838,7 @@ Deletes sales.
Requires one of the following permissions: MANAGE_DISCOUNTS.
"""
-type SaleBulkDelete {
+type SaleBulkDelete @doc(category: "Discounts") {
"""Returns how many objects were affected."""
count: Int!
discountErrors: [DiscountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -21840,7 +21850,7 @@ Updates a sale.
Requires one of the following permissions: MANAGE_DISCOUNTS.
"""
-type SaleUpdate {
+type SaleUpdate @doc(category: "Discounts") {
discountErrors: [DiscountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [DiscountError!]!
sale: Sale
@@ -21851,14 +21861,14 @@ Adds products, categories, collections to a voucher.
Requires one of the following permissions: MANAGE_DISCOUNTS.
"""
-type SaleAddCatalogues {
+type SaleAddCatalogues @doc(category: "Products") {
"""Sale of which catalogue IDs will be modified."""
sale: Sale
discountErrors: [DiscountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [DiscountError!]!
}
-input CatalogueInput {
+input CatalogueInput @doc(category: "Products") {
"""Products related to the discount."""
products: [ID!]
@@ -21881,7 +21891,7 @@ Removes products, categories, collections from a sale.
Requires one of the following permissions: MANAGE_DISCOUNTS.
"""
-type SaleRemoveCatalogues {
+type SaleRemoveCatalogues @doc(category: "Products") {
"""Sale of which catalogue IDs will be modified."""
sale: Sale
discountErrors: [DiscountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -21893,7 +21903,7 @@ Creates/updates translations for a sale.
Requires one of the following permissions: MANAGE_TRANSLATIONS.
"""
-type SaleTranslate {
+type SaleTranslate @doc(category: "Discounts") {
translationErrors: [TranslationError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [TranslationError!]!
sale: Sale
@@ -21904,14 +21914,14 @@ Manage sale's availability in channels.
Requires one of the following permissions: MANAGE_DISCOUNTS.
"""
-type SaleChannelListingUpdate {
+type SaleChannelListingUpdate @doc(category: "Products") {
"""An updated sale instance."""
sale: Sale
discountErrors: [DiscountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [DiscountError!]!
}
-input SaleChannelListingInput {
+input SaleChannelListingInput @doc(category: "Products") {
"""List of channels to which the sale should be assigned."""
addChannels: [SaleChannelListingAddInput!]
@@ -21919,7 +21929,7 @@ input SaleChannelListingInput {
removeChannels: [ID!]
}
-input SaleChannelListingAddInput {
+input SaleChannelListingAddInput @doc(category: "Products") {
"""ID of a channel."""
channelId: ID!
@@ -21932,7 +21942,7 @@ Creates a new voucher.
Requires one of the following permissions: MANAGE_DISCOUNTS.
"""
-type VoucherCreate {
+type VoucherCreate @doc(category: "Discounts") {
discountErrors: [DiscountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [DiscountError!]!
voucher: Voucher
@@ -21997,7 +22007,7 @@ Deletes a voucher.
Requires one of the following permissions: MANAGE_DISCOUNTS.
"""
-type VoucherDelete {
+type VoucherDelete @doc(category: "Discounts") {
discountErrors: [DiscountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [DiscountError!]!
voucher: Voucher
@@ -22008,7 +22018,7 @@ Deletes vouchers.
Requires one of the following permissions: MANAGE_DISCOUNTS.
"""
-type VoucherBulkDelete {
+type VoucherBulkDelete @doc(category: "Discounts") {
"""Returns how many objects were affected."""
count: Int!
discountErrors: [DiscountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -22020,7 +22030,7 @@ Updates a voucher.
Requires one of the following permissions: MANAGE_DISCOUNTS.
"""
-type VoucherUpdate {
+type VoucherUpdate @doc(category: "Discounts") {
discountErrors: [DiscountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [DiscountError!]!
voucher: Voucher
@@ -22031,7 +22041,7 @@ Adds products, categories, collections to a voucher.
Requires one of the following permissions: MANAGE_DISCOUNTS.
"""
-type VoucherAddCatalogues {
+type VoucherAddCatalogues @doc(category: "Products") {
"""Voucher of which catalogue IDs will be modified."""
voucher: Voucher
discountErrors: [DiscountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -22043,7 +22053,7 @@ Removes products, categories, collections from a voucher.
Requires one of the following permissions: MANAGE_DISCOUNTS.
"""
-type VoucherRemoveCatalogues {
+type VoucherRemoveCatalogues @doc(category: "Products") {
"""Voucher of which catalogue IDs will be modified."""
voucher: Voucher
discountErrors: [DiscountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -22055,7 +22065,7 @@ Creates/updates translations for a voucher.
Requires one of the following permissions: MANAGE_TRANSLATIONS.
"""
-type VoucherTranslate {
+type VoucherTranslate @doc(category: "Discounts") {
translationErrors: [TranslationError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [TranslationError!]!
voucher: Voucher
@@ -22066,14 +22076,14 @@ Manage voucher's availability in channels.
Requires one of the following permissions: MANAGE_DISCOUNTS.
"""
-type VoucherChannelListingUpdate {
+type VoucherChannelListingUpdate @doc(category: "Products") {
"""An updated voucher instance."""
voucher: Voucher
discountErrors: [DiscountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [DiscountError!]!
}
-input VoucherChannelListingInput {
+input VoucherChannelListingInput @doc(category: "Products") {
"""List of channels to which the voucher should be assigned."""
addChannels: [VoucherChannelListingAddInput!]
@@ -22081,7 +22091,7 @@ input VoucherChannelListingInput {
removeChannels: [ID!]
}
-input VoucherChannelListingAddInput {
+input VoucherChannelListingAddInput @doc(category: "Products") {
"""ID of a channel."""
channelId: ID!
@@ -22251,7 +22261,7 @@ enum UploadErrorCode {
}
"""Adds a gift card or a voucher to a checkout."""
-type CheckoutAddPromoCode {
+type CheckoutAddPromoCode @doc(category: "Checkout") {
"""The checkout with the added gift card or voucher."""
checkout: Checkout
checkoutErrors: [CheckoutError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -22313,14 +22323,14 @@ enum CheckoutErrorCode {
}
"""Update billing address in the existing checkout."""
-type CheckoutBillingAddressUpdate {
+type CheckoutBillingAddressUpdate @doc(category: "Checkout") {
"""An updated checkout."""
checkout: Checkout
checkoutErrors: [CheckoutError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [CheckoutError!]!
}
-input CheckoutAddressValidationRules {
+input CheckoutAddressValidationRules @doc(category: "Checkout") {
"""
Determines if an error should be raised when the provided address doesn't have all the required fields. The list of required fields is dynamic and depends on the country code (use the `addressValidationRules` query to fetch them). Note: country code is mandatory for all addresses regardless of the rules provided in this input.
"""
@@ -22340,7 +22350,7 @@ input CheckoutAddressValidationRules {
"""
Completes the checkout. As a result a new order is created and a payment charge is made. This action requires a successful payment before it can be performed. In case additional confirmation step as 3D secure is required confirmationNeeded flag will be set to True and no order created until payment is confirmed with second call of this mutation.
"""
-type CheckoutComplete {
+type CheckoutComplete @doc(category: "Checkout") {
"""Placed order."""
order: Order
@@ -22356,7 +22366,7 @@ type CheckoutComplete {
}
"""Create a new checkout."""
-type CheckoutCreate {
+type CheckoutCreate @doc(category: "Checkout") {
"""
Whether the checkout was created or the current active one was returned. Refer to checkoutLinesAdd and checkoutLinesUpdate to merge a cart with an active checkout.
"""
@@ -22366,7 +22376,7 @@ type CheckoutCreate {
checkout: Checkout
}
-input CheckoutCreateInput {
+input CheckoutCreateInput @doc(category: "Checkout") {
"""Slug of a channel in which to create a checkout."""
channel: String
@@ -22399,7 +22409,7 @@ input CheckoutCreateInput {
validationRules: CheckoutValidationRules
}
-input CheckoutLineInput {
+input CheckoutLineInput @doc(category: "Checkout") {
"""The number of items purchased."""
quantity: Int!
@@ -22432,7 +22442,7 @@ input CheckoutLineInput {
metadata: [MetadataInput!]
}
-input CheckoutValidationRules {
+input CheckoutValidationRules @doc(category: "Checkout") {
"""
The validation rules that can be applied to provided shipping address data.
"""
@@ -22449,7 +22459,7 @@ Sets the customer as the owner of the checkout.
Requires one of the following permissions: AUTHENTICATED_APP, AUTHENTICATED_USER.
"""
-type CheckoutCustomerAttach {
+type CheckoutCustomerAttach @doc(category: "Checkout") {
"""An updated checkout."""
checkout: Checkout
checkoutErrors: [CheckoutError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -22461,7 +22471,7 @@ Removes the user assigned as the owner of the checkout.
Requires one of the following permissions: AUTHENTICATED_APP, AUTHENTICATED_USER.
"""
-type CheckoutCustomerDetach {
+type CheckoutCustomerDetach @doc(category: "Checkout") {
"""An updated checkout."""
checkout: Checkout
checkoutErrors: [CheckoutError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -22469,7 +22479,7 @@ type CheckoutCustomerDetach {
}
"""Updates email address in the existing checkout object."""
-type CheckoutEmailUpdate {
+type CheckoutEmailUpdate @doc(category: "Checkout") {
"""An updated checkout."""
checkout: Checkout
checkoutErrors: [CheckoutError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -22477,7 +22487,7 @@ type CheckoutEmailUpdate {
}
"""Deletes a CheckoutLine."""
-type CheckoutLineDelete {
+type CheckoutLineDelete @doc(category: "Checkout") {
"""An updated checkout."""
checkout: Checkout
checkoutErrors: [CheckoutError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -22485,7 +22495,7 @@ type CheckoutLineDelete {
}
"""Deletes checkout lines."""
-type CheckoutLinesDelete {
+type CheckoutLinesDelete @doc(category: "Checkout") {
"""An updated checkout."""
checkout: Checkout
errors: [CheckoutError!]!
@@ -22494,7 +22504,7 @@ type CheckoutLinesDelete {
"""
Adds a checkout line to the existing checkout.If line was already in checkout, its quantity will be increased.
"""
-type CheckoutLinesAdd {
+type CheckoutLinesAdd @doc(category: "Checkout") {
"""An updated checkout."""
checkout: Checkout
checkoutErrors: [CheckoutError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -22502,14 +22512,14 @@ type CheckoutLinesAdd {
}
"""Updates checkout line in the existing checkout."""
-type CheckoutLinesUpdate {
+type CheckoutLinesUpdate @doc(category: "Checkout") {
"""An updated checkout."""
checkout: Checkout
checkoutErrors: [CheckoutError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [CheckoutError!]!
}
-input CheckoutLineUpdateInput {
+input CheckoutLineUpdateInput @doc(category: "Checkout") {
"""
ID of the product variant.
@@ -22540,7 +22550,7 @@ input CheckoutLineUpdateInput {
}
"""Remove a gift card or a voucher from a checkout."""
-type CheckoutRemovePromoCode {
+type CheckoutRemovePromoCode @doc(category: "Checkout") {
"""The checkout with the removed gift card or voucher."""
checkout: Checkout
checkoutErrors: [CheckoutError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -22548,7 +22558,7 @@ type CheckoutRemovePromoCode {
}
"""Create a new payment for given checkout."""
-type CheckoutPaymentCreate {
+type CheckoutPaymentCreate @doc(category: "Payments") {
"""Related checkout object."""
checkout: Checkout
@@ -22558,7 +22568,7 @@ type CheckoutPaymentCreate {
errors: [PaymentError!]!
}
-input PaymentInput {
+input PaymentInput @doc(category: "Payments") {
"""A gateway to use with that payment."""
gateway: String!
@@ -22609,7 +22619,7 @@ enum StorePaymentMethodEnum {
}
"""Update shipping address in the existing checkout."""
-type CheckoutShippingAddressUpdate {
+type CheckoutShippingAddressUpdate @doc(category: "Checkout") {
"""An updated checkout."""
checkout: Checkout
checkoutErrors: [CheckoutError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -22617,7 +22627,7 @@ type CheckoutShippingAddressUpdate {
}
"""Updates the shipping method of the checkout."""
-type CheckoutShippingMethodUpdate {
+type CheckoutShippingMethodUpdate @doc(category: "Checkout") {
"""An updated checkout."""
checkout: Checkout
checkoutErrors: [CheckoutError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -22631,14 +22641,14 @@ Added in Saleor 3.1.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type CheckoutDeliveryMethodUpdate {
+type CheckoutDeliveryMethodUpdate @doc(category: "Checkout") {
"""An updated checkout."""
checkout: Checkout
errors: [CheckoutError!]!
}
"""Update language code in the existing checkout."""
-type CheckoutLanguageCodeUpdate {
+type CheckoutLanguageCodeUpdate @doc(category: "Checkout") {
"""An updated checkout."""
checkout: Checkout
checkoutErrors: [CheckoutError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -22652,13 +22662,13 @@ Added in Saleor 3.2.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
-type OrderCreateFromCheckout {
+type OrderCreateFromCheckout @doc(category: "Checkout") {
"""Placed order."""
order: Order
errors: [OrderCreateFromCheckoutError!]!
}
-type OrderCreateFromCheckoutError {
+type OrderCreateFromCheckoutError @doc(category: "Checkout") {
"""
Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
"""
@@ -22700,7 +22710,7 @@ Creates new channel.
Requires one of the following permissions: MANAGE_CHANNELS.
"""
-type ChannelCreate {
+type ChannelCreate @doc(category: "Channels") {
channelErrors: [ChannelError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [ChannelError!]!
channel: Channel
@@ -22814,7 +22824,7 @@ Update a channel.
Requires one of the following permissions: MANAGE_CHANNELS.
Requires one of the following permissions when updating only orderSettings field: MANAGE_CHANNELS, MANAGE_ORDERS.
"""
-type ChannelUpdate {
+type ChannelUpdate @doc(category: "Channels") {
channelErrors: [ChannelError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [ChannelError!]!
channel: Channel
@@ -22883,7 +22893,7 @@ Delete a channel. Orders associated with the deleted channel will be moved to th
Requires one of the following permissions: MANAGE_CHANNELS.
"""
-type ChannelDelete {
+type ChannelDelete @doc(category: "Channels") {
channelErrors: [ChannelError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [ChannelError!]!
channel: Channel
@@ -22899,7 +22909,7 @@ Activate a channel.
Requires one of the following permissions: MANAGE_CHANNELS.
"""
-type ChannelActivate {
+type ChannelActivate @doc(category: "Channels") {
"""Activated channel."""
channel: Channel
channelErrors: [ChannelError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -22911,7 +22921,7 @@ Deactivate a channel.
Requires one of the following permissions: MANAGE_CHANNELS.
"""
-type ChannelDeactivate {
+type ChannelDeactivate @doc(category: "Channels") {
"""Deactivated channel."""
channel: Channel
channelErrors: [ChannelError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -22927,14 +22937,14 @@ Note: this API is currently in Feature Preview and can be subject to changes at
Requires one of the following permissions: MANAGE_CHANNELS.
"""
-type ChannelReorderWarehouses {
+type ChannelReorderWarehouses @doc(category: "Channels") {
"""Channel within the warehouses are reordered."""
channel: Channel
errors: [ChannelError!]!
}
"""Creates an attribute."""
-type AttributeCreate {
+type AttributeCreate @doc(category: "Attributes") {
attribute: Attribute
attributeErrors: [AttributeError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [AttributeError!]!
@@ -22963,7 +22973,7 @@ enum AttributeErrorCode {
UNIQUE
}
-input AttributeCreateInput {
+input AttributeCreateInput @doc(category: "Attributes") {
"""The input type to use for entering attribute values in the dashboard."""
inputType: AttributeInputTypeEnum
@@ -23026,7 +23036,7 @@ input AttributeCreateInput {
externalReference: String
}
-input AttributeValueCreateInput {
+input AttributeValueCreateInput @doc(category: "Attributes") {
"""
Represent value of the attribute value (e.g. color values for swatch attributes).
"""
@@ -23070,7 +23080,7 @@ Deletes an attribute.
Requires one of the following permissions: MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES.
"""
-type AttributeDelete {
+type AttributeDelete @doc(category: "Attributes") {
attributeErrors: [AttributeError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [AttributeError!]!
attribute: Attribute
@@ -23081,13 +23091,13 @@ Updates attribute.
Requires one of the following permissions: MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES.
"""
-type AttributeUpdate {
+type AttributeUpdate @doc(category: "Attributes") {
attribute: Attribute
attributeErrors: [AttributeError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [AttributeError!]!
}
-input AttributeUpdateInput {
+input AttributeUpdateInput @doc(category: "Attributes") {
"""Name of an attribute displayed in the interface."""
name: String
@@ -23144,7 +23154,7 @@ input AttributeUpdateInput {
externalReference: String
}
-input AttributeValueUpdateInput {
+input AttributeValueUpdateInput @doc(category: "Attributes") {
"""
Represent value of the attribute value (e.g. color values for swatch attributes).
"""
@@ -23188,7 +23198,7 @@ Creates/updates translations for an attribute.
Requires one of the following permissions: MANAGE_TRANSLATIONS.
"""
-type AttributeTranslate {
+type AttributeTranslate @doc(category: "Attributes") {
translationErrors: [TranslationError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [TranslationError!]!
attribute: Attribute
@@ -23199,7 +23209,7 @@ Deletes attributes.
Requires one of the following permissions: MANAGE_PAGE_TYPES_AND_ATTRIBUTES.
"""
-type AttributeBulkDelete {
+type AttributeBulkDelete @doc(category: "Attributes") {
"""Returns how many objects were affected."""
count: Int!
attributeErrors: [AttributeError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -23211,7 +23221,7 @@ Deletes values of attributes.
Requires one of the following permissions: MANAGE_PAGE_TYPES_AND_ATTRIBUTES.
"""
-type AttributeValueBulkDelete {
+type AttributeValueBulkDelete @doc(category: "Attributes") {
"""Returns how many objects were affected."""
count: Int!
attributeErrors: [AttributeError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -23223,7 +23233,7 @@ Creates a value for an attribute.
Requires one of the following permissions: MANAGE_PRODUCTS.
"""
-type AttributeValueCreate {
+type AttributeValueCreate @doc(category: "Attributes") {
"""The updated attribute."""
attribute: Attribute
attributeErrors: [AttributeError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -23236,7 +23246,7 @@ Deletes a value of an attribute.
Requires one of the following permissions: MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES.
"""
-type AttributeValueDelete {
+type AttributeValueDelete @doc(category: "Attributes") {
"""The updated attribute."""
attribute: Attribute
attributeErrors: [AttributeError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -23249,7 +23259,7 @@ Updates value of an attribute.
Requires one of the following permissions: MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES.
"""
-type AttributeValueUpdate {
+type AttributeValueUpdate @doc(category: "Attributes") {
"""The updated attribute."""
attribute: Attribute
attributeErrors: [AttributeError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -23262,7 +23272,7 @@ Creates/updates translations for an attribute value.
Requires one of the following permissions: MANAGE_TRANSLATIONS.
"""
-type AttributeValueTranslate {
+type AttributeValueTranslate @doc(category: "Attributes") {
translationErrors: [TranslationError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [TranslationError!]!
attributeValue: AttributeValue
@@ -23287,7 +23297,7 @@ Reorder the values of an attribute.
Requires one of the following permissions: MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES.
"""
-type AttributeReorderValues {
+type AttributeReorderValues @doc(category: "Attributes") {
"""Attribute from which values are reordered."""
attribute: Attribute
attributeErrors: [AttributeError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -23297,7 +23307,7 @@ type AttributeReorderValues {
"""
Creates a new app. Requires the following permissions: AUTHENTICATED_STAFF_USER and MANAGE_APPS.
"""
-type AppCreate {
+type AppCreate @doc(category: "Apps") {
"""The newly created authentication token."""
authToken: String
appErrors: [AppError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -23340,7 +23350,7 @@ enum AppErrorCode {
UNSUPPORTED_SALEOR_VERSION
}
-input AppInput {
+input AppInput @doc(category: "Apps") {
"""Name of the app."""
name: String
@@ -23353,7 +23363,7 @@ Updates an existing app.
Requires one of the following permissions: MANAGE_APPS.
"""
-type AppUpdate {
+type AppUpdate @doc(category: "Apps") {
appErrors: [AppError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [AppError!]!
app: App
@@ -23364,7 +23374,7 @@ Deletes an app.
Requires one of the following permissions: MANAGE_APPS.
"""
-type AppDelete {
+type AppDelete @doc(category: "Apps") {
appErrors: [AppError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [AppError!]!
app: App
@@ -23375,7 +23385,7 @@ Creates a new token.
Requires one of the following permissions: MANAGE_APPS.
"""
-type AppTokenCreate {
+type AppTokenCreate @doc(category: "Apps") {
"""The newly created authentication token."""
authToken: String
appErrors: [AppError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -23383,7 +23393,7 @@ type AppTokenCreate {
appToken: AppToken
}
-input AppTokenInput {
+input AppTokenInput @doc(category: "Apps") {
"""Name of the token."""
name: String
@@ -23396,14 +23406,14 @@ Deletes an authentication token assigned to app.
Requires one of the following permissions: MANAGE_APPS.
"""
-type AppTokenDelete {
+type AppTokenDelete @doc(category: "Apps") {
appErrors: [AppError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [AppError!]!
appToken: AppToken
}
"""Verify provided app token."""
-type AppTokenVerify {
+type AppTokenVerify @doc(category: "Apps") {
"""Determine if token is valid or not."""
valid: Boolean!
appErrors: [AppError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -23413,13 +23423,13 @@ type AppTokenVerify {
"""
Install new app by using app manifest. Requires the following permissions: AUTHENTICATED_STAFF_USER and MANAGE_APPS.
"""
-type AppInstall {
+type AppInstall @doc(category: "Apps") {
appErrors: [AppError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [AppError!]!
appInstallation: AppInstallation
}
-input AppInstallInput {
+input AppInstallInput @doc(category: "Apps") {
"""Name of the app to install."""
appName: String
@@ -23438,7 +23448,7 @@ Retry failed installation of new app.
Requires one of the following permissions: MANAGE_APPS.
"""
-type AppRetryInstall {
+type AppRetryInstall @doc(category: "Apps") {
appErrors: [AppError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [AppError!]!
appInstallation: AppInstallation
@@ -23449,7 +23459,7 @@ Delete failed installation.
Requires one of the following permissions: MANAGE_APPS.
"""
-type AppDeleteFailedInstallation {
+type AppDeleteFailedInstallation @doc(category: "Apps") {
appErrors: [AppError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [AppError!]!
appInstallation: AppInstallation
@@ -23460,14 +23470,14 @@ Fetch and validate manifest.
Requires one of the following permissions: MANAGE_APPS.
"""
-type AppFetchManifest {
+type AppFetchManifest @doc(category: "Apps") {
manifest: Manifest
appErrors: [AppError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [AppError!]!
}
"""The manifest definition."""
-type Manifest {
+type Manifest @doc(category: "Apps") {
identifier: String!
version: String!
name: String!
@@ -23523,7 +23533,7 @@ type Manifest {
author: String
}
-type AppManifestExtension {
+type AppManifestExtension @doc(category: "Apps") {
"""List of the app extension's permissions."""
permissions: [Permission!]!
@@ -23540,7 +23550,7 @@ type AppManifestExtension {
target: AppExtensionTargetEnum!
}
-type AppManifestWebhook {
+type AppManifestWebhook @doc(category: "Apps") {
"""The name of the webhook."""
name: String!
@@ -23557,7 +23567,7 @@ type AppManifestWebhook {
targetUrl: String!
}
-type AppManifestRequiredSaleorVersion {
+type AppManifestRequiredSaleorVersion @doc(category: "Apps") {
"""
Required Saleor version as semver range.
@@ -23582,7 +23592,7 @@ Activate the app.
Requires one of the following permissions: MANAGE_APPS.
"""
-type AppActivate {
+type AppActivate @doc(category: "Apps") {
appErrors: [AppError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [AppError!]!
app: App
@@ -23593,14 +23603,14 @@ Deactivate the app.
Requires one of the following permissions: MANAGE_APPS.
"""
-type AppDeactivate {
+type AppDeactivate @doc(category: "Apps") {
appErrors: [AppError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [AppError!]!
app: App
}
"""Create JWT token."""
-type CreateToken {
+type CreateToken @doc(category: "Authentication") {
"""JWT token, required to authenticate."""
token: String
@@ -23616,7 +23626,8 @@ type CreateToken {
errors: [AccountError!]!
}
-type AccountError {
+"""Represents errors in account mutations."""
+type AccountError @doc(category: "Users") {
"""
Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.
"""
@@ -23673,7 +23684,7 @@ enum AccountErrorCode {
"""
Refresh JWT token. Mutation tries to take refreshToken from the input.If it fails it will try to take refreshToken from the http-only cookie -refreshToken. csrfToken is required when refreshToken is provided as a cookie.
"""
-type RefreshToken {
+type RefreshToken @doc(category: "Authentication") {
"""JWT token, required to authenticate."""
token: String
@@ -23684,7 +23695,7 @@ type RefreshToken {
}
"""Verify JWT token."""
-type VerifyToken {
+type VerifyToken @doc(category: "Authentication") {
"""User assigned to token."""
user: User
@@ -23709,13 +23720,13 @@ Deactivate all JWT tokens of the currently authenticated user.
Requires one of the following permissions: AUTHENTICATED_USER.
"""
-type DeactivateAllUserTokens {
+type DeactivateAllUserTokens @doc(category: "Authentication") {
accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [AccountError!]!
}
-"""Prepare external authentication url for user by custom plugin."""
-type ExternalAuthenticationUrl {
+"""Prepare external authentication URL for user by custom plugin."""
+type ExternalAuthenticationUrl @doc(category: "Authentication") {
"""The data returned by authentication plugin."""
authenticationData: JSONString
accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -23723,7 +23734,7 @@ type ExternalAuthenticationUrl {
}
"""Obtain external access tokens for user by custom plugin."""
-type ExternalObtainAccessTokens {
+type ExternalObtainAccessTokens @doc(category: "Authentication") {
"""The token, required to authenticate."""
token: String
@@ -23740,7 +23751,7 @@ type ExternalObtainAccessTokens {
}
"""Refresh user's access by custom plugin."""
-type ExternalRefresh {
+type ExternalRefresh @doc(category: "Authentication") {
"""The token, required to authenticate."""
token: String
@@ -23757,7 +23768,7 @@ type ExternalRefresh {
}
"""Logout user by custom plugin."""
-type ExternalLogout {
+type ExternalLogout @doc(category: "Authentication") {
"""The data returned by authentication plugin."""
logoutData: JSONString
accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -23765,7 +23776,7 @@ type ExternalLogout {
}
"""Verify external authentication data by plugin."""
-type ExternalVerify {
+type ExternalVerify @doc(category: "Authentication") {
"""User assigned to data."""
user: User
@@ -23779,13 +23790,13 @@ type ExternalVerify {
}
"""Sends an email with the account password modification link."""
-type RequestPasswordReset {
+type RequestPasswordReset @doc(category: "Users") {
accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [AccountError!]!
}
"""Confirm user account with token sent by email during registration."""
-type ConfirmAccount {
+type ConfirmAccount @doc(category: "Users") {
"""An activated user account."""
user: User
accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -23795,7 +23806,7 @@ type ConfirmAccount {
"""
Sets the user's password from the token sent by email using the RequestPasswordReset mutation.
"""
-type SetPassword {
+type SetPassword @doc(category: "Users") {
"""JWT token, required to authenticate."""
token: String
@@ -23816,7 +23827,7 @@ Change the password of the logged in user.
Requires one of the following permissions: AUTHENTICATED_USER.
"""
-type PasswordChange {
+type PasswordChange @doc(category: "Users") {
"""A user instance with a new password."""
user: User
accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -23828,7 +23839,7 @@ Request email change of the logged in user.
Requires one of the following permissions: AUTHENTICATED_USER.
"""
-type RequestEmailChange {
+type RequestEmailChange @doc(category: "Users") {
"""A user instance."""
user: User
accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -23840,7 +23851,7 @@ Confirm the email change of the logged-in user.
Requires one of the following permissions: AUTHENTICATED_USER.
"""
-type ConfirmEmailChange {
+type ConfirmEmailChange @doc(category: "Users") {
"""A user instance with a new email."""
user: User
accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -23852,7 +23863,7 @@ Create a new address for the customer.
Requires one of the following permissions: AUTHENTICATED_USER.
"""
-type AccountAddressCreate {
+type AccountAddressCreate @doc(category: "Users") {
"""A user instance for which the address was created."""
user: User
accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -23863,7 +23874,7 @@ type AccountAddressCreate {
"""
Updates an address of the logged-in user. Requires one of the following permissions: MANAGE_USERS, IS_OWNER.
"""
-type AccountAddressUpdate {
+type AccountAddressUpdate @doc(category: "Users") {
"""A user object for which the address was edited."""
user: User
accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -23874,7 +23885,7 @@ type AccountAddressUpdate {
"""
Delete an address of the logged-in user. Requires one of the following permissions: MANAGE_USERS, IS_OWNER.
"""
-type AccountAddressDelete {
+type AccountAddressDelete @doc(category: "Users") {
"""A user instance for which the address was deleted."""
user: User
accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -23887,7 +23898,7 @@ Sets a default address for the authenticated user.
Requires one of the following permissions: AUTHENTICATED_USER.
"""
-type AccountSetDefaultAddress {
+type AccountSetDefaultAddress @doc(category: "Users") {
"""An updated user instance."""
user: User
accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -23895,7 +23906,7 @@ type AccountSetDefaultAddress {
}
"""Register a new user."""
-type AccountRegister {
+type AccountRegister @doc(category: "Users") {
"""Informs whether users need to confirm their email address."""
requiresConfirmation: Boolean
accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -23903,7 +23914,8 @@ type AccountRegister {
user: User
}
-input AccountRegisterInput {
+"""Fields required to create a user."""
+input AccountRegisterInput @doc(category: "Users") {
"""Given name."""
firstName: String
@@ -23936,13 +23948,14 @@ Updates the account of the logged-in user.
Requires one of the following permissions: AUTHENTICATED_USER.
"""
-type AccountUpdate {
+type AccountUpdate @doc(category: "Users") {
accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [AccountError!]!
user: User
}
-input AccountInput {
+"""Fields required to update the user."""
+input AccountInput @doc(category: "Users") {
"""Given name."""
firstName: String
@@ -23964,7 +23977,7 @@ Sends an email with the account removal link for the logged-in user.
Requires one of the following permissions: AUTHENTICATED_USER.
"""
-type AccountRequestDeletion {
+type AccountRequestDeletion @doc(category: "Users") {
accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [AccountError!]!
}
@@ -23974,7 +23987,7 @@ Remove user account.
Requires one of the following permissions: AUTHENTICATED_USER.
"""
-type AccountDelete {
+type AccountDelete @doc(category: "Users") {
accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [AccountError!]!
user: User
@@ -23985,7 +23998,7 @@ Creates user address.
Requires one of the following permissions: MANAGE_USERS.
"""
-type AddressCreate {
+type AddressCreate @doc(category: "Users") {
"""A user instance for which the address was created."""
user: User
accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -23998,7 +24011,7 @@ Updates an address.
Requires one of the following permissions: MANAGE_USERS.
"""
-type AddressUpdate {
+type AddressUpdate @doc(category: "Users") {
"""A user object for which the address was edited."""
user: User
accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -24011,7 +24024,7 @@ Deletes an address.
Requires one of the following permissions: MANAGE_USERS.
"""
-type AddressDelete {
+type AddressDelete @doc(category: "Users") {
"""A user instance for which the address was deleted."""
user: User
accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -24024,7 +24037,7 @@ Sets a default address for the given user.
Requires one of the following permissions: MANAGE_USERS.
"""
-type AddressSetDefault {
+type AddressSetDefault @doc(category: "Users") {
"""An updated user instance."""
user: User
accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -24036,7 +24049,7 @@ Creates a new customer.
Requires one of the following permissions: MANAGE_USERS.
"""
-type CustomerCreate {
+type CustomerCreate @doc(category: "Users") {
accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [AccountError!]!
user: User
@@ -24090,7 +24103,7 @@ Updates an existing customer.
Requires one of the following permissions: MANAGE_USERS.
"""
-type CustomerUpdate {
+type CustomerUpdate @doc(category: "Users") {
accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [AccountError!]!
user: User
@@ -24134,7 +24147,7 @@ Deletes a customer.
Requires one of the following permissions: MANAGE_USERS.
"""
-type CustomerDelete {
+type CustomerDelete @doc(category: "Users") {
accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [AccountError!]!
user: User
@@ -24145,7 +24158,7 @@ Deletes customers.
Requires one of the following permissions: MANAGE_USERS.
"""
-type CustomerBulkDelete {
+type CustomerBulkDelete @doc(category: "Users") {
"""Returns how many objects were affected."""
count: Int!
accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -24157,7 +24170,7 @@ Creates a new staff user. Apps are not allowed to perform this mutation.
Requires one of the following permissions: MANAGE_STAFF.
"""
-type StaffCreate {
+type StaffCreate @doc(category: "Users") {
staffErrors: [StaffError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [StaffError!]!
user: User
@@ -24188,7 +24201,8 @@ type StaffError {
users: [ID!]
}
-input StaffCreateInput {
+"""Fields required to create a staff user."""
+input StaffCreateInput @doc(category: "Users") {
"""Given name."""
firstName: String
@@ -24218,13 +24232,14 @@ Updates an existing staff user. Apps are not allowed to perform this mutation.
Requires one of the following permissions: MANAGE_STAFF.
"""
-type StaffUpdate {
+type StaffUpdate @doc(category: "Users") {
staffErrors: [StaffError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [StaffError!]!
user: User
}
-input StaffUpdateInput {
+"""Fields required to update a staff user."""
+input StaffUpdateInput @doc(category: "Users") {
"""Given name."""
firstName: String
@@ -24252,7 +24267,7 @@ Deletes a staff user. Apps are not allowed to perform this mutation.
Requires one of the following permissions: MANAGE_STAFF.
"""
-type StaffDelete {
+type StaffDelete @doc(category: "Users") {
staffErrors: [StaffError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [StaffError!]!
user: User
@@ -24263,7 +24278,7 @@ Deletes staff users. Apps are not allowed to perform this mutation.
Requires one of the following permissions: MANAGE_STAFF.
"""
-type StaffBulkDelete {
+type StaffBulkDelete @doc(category: "Users") {
"""Returns how many objects were affected."""
count: Int!
staffErrors: [StaffError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -24275,7 +24290,7 @@ Create a user avatar. Only for staff members. This mutation must be sent as a `m
Requires one of the following permissions: AUTHENTICATED_STAFF_USER.
"""
-type UserAvatarUpdate {
+type UserAvatarUpdate @doc(category: "Users") {
"""An updated user instance."""
user: User
accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -24287,7 +24302,7 @@ Deletes a user avatar. Only for staff members.
Requires one of the following permissions: AUTHENTICATED_STAFF_USER.
"""
-type UserAvatarDelete {
+type UserAvatarDelete @doc(category: "Users") {
"""An updated user instance."""
user: User
accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -24299,7 +24314,7 @@ Activate or deactivate users.
Requires one of the following permissions: MANAGE_USERS.
"""
-type UserBulkSetActive {
+type UserBulkSetActive @doc(category: "Users") {
"""Returns how many objects were affected."""
count: Int!
accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
@@ -24311,7 +24326,7 @@ Create new permission group. Apps are not allowed to perform this mutation.
Requires one of the following permissions: MANAGE_STAFF.
"""
-type PermissionGroupCreate {
+type PermissionGroupCreate @doc(category: "Users") {
permissionGroupErrors: [PermissionGroupError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [PermissionGroupError!]!
group: Group
@@ -24364,7 +24379,7 @@ Update permission group. Apps are not allowed to perform this mutation.
Requires one of the following permissions: MANAGE_STAFF.
"""
-type PermissionGroupUpdate {
+type PermissionGroupUpdate @doc(category: "Users") {
permissionGroupErrors: [PermissionGroupError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [PermissionGroupError!]!
group: Group
@@ -24392,7 +24407,7 @@ Delete permission group. Apps are not allowed to perform this mutation.
Requires one of the following permissions: MANAGE_STAFF.
"""
-type PermissionGroupDelete {
+type PermissionGroupDelete @doc(category: "Users") {
permissionGroupErrors: [PermissionGroupError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [PermissionGroupError!]!
group: Group
@@ -24420,7 +24435,7 @@ interface Event {
issuingPrincipal: IssuingPrincipal
"""The application receiving the webhook."""
- recipient: App
+ recipient: App @doc(category: "Apps")
}
union IssuingPrincipal = App | User
diff --git a/saleor/graphql/schema_printer.py b/saleor/graphql/schema_printer.py
index 5544ca4c35..b72b9b6851 100644
--- a/saleor/graphql/schema_printer.py
+++ b/saleor/graphql/schema_printer.py
@@ -5,6 +5,7 @@ Can be dropped once we upgrade from the legacy version of GraphQL Core.
from typing import Callable, Dict, List, Optional, Union, cast
+from graphene.types.definitions import GrapheneObjectType
from graphql.language.printer import print_ast
from graphql.type.definition import (
GraphQLArgument,
@@ -117,6 +118,22 @@ def is_schema_of_common_names(schema: GraphQLSchema) -> bool:
return not subscription_type or subscription_type.name == "Subscription"
+def print_object_directives(type_) -> str:
+ doc_category = getattr(type_.graphene_type, "doc_category", None)
+ return f' @doc(category: "{doc_category}")' if doc_category else ""
+
+
+def print_field_directives(field, name) -> str:
+ # Get doc_category for `type Query` fields.
+ doc_category = getattr(field.resolver, "doc_category", None)
+
+ # Get doc_category for `type Mutation` fields.
+ if not doc_category and hasattr(field.type, "graphene_type"):
+ doc_category = getattr(field.type.graphene_type, "doc_category", None)
+
+ return f' @doc(category: "{doc_category}")' if doc_category else ""
+
+
def print_type(type_: GraphQLNamedType) -> str:
if isinstance(type_, GraphQLScalarType):
type_ = type_
@@ -150,12 +167,14 @@ def print_implemented_interfaces(type_: GraphQLObjectType) -> str:
return " implements " + " & ".join(i.name for i in interfaces) if interfaces else ""
-def print_object(type_: GraphQLObjectType) -> str:
+def print_object(type_: GrapheneObjectType) -> str:
+ include_field_directives = type_.name in ["Mutation", "Query"]
return (
print_description(type_)
+ f"type {type_.name}"
+ print_implemented_interfaces(type_)
- + print_fields(type_)
+ + print_object_directives(type_)
+ + print_fields(type_, include_field_directives)
)
@@ -176,7 +195,12 @@ def print_enum(type_: GraphQLEnumType) -> str:
+ print_deprecated(v.deprecation_reason)
for i, v in enumerate(type_.values)
]
- return print_description(type_) + f"enum {type_.name}" + print_block(values)
+ return (
+ print_description(type_)
+ + f"enum {type_.name}"
+ + print_object_directives(type_)
+ + print_block(values)
+ )
def print_input_object(type_: GraphQLInputObjectType) -> str:
@@ -184,15 +208,24 @@ def print_input_object(type_: GraphQLInputObjectType) -> str:
print_description(field, " ", not i) + " " + print_input_value(name, field)
for i, (name, field) in enumerate(type_.fields.items())
]
- return print_description(type_) + f"input {type_.name}" + print_block(fields)
+ return (
+ print_description(type_)
+ + f"input {type_.name}"
+ + print_object_directives(type_)
+ + print_block(fields)
+ )
-def print_fields(type_: Union[GraphQLObjectType, GraphQLInterfaceType]) -> str:
+def print_fields(
+ type_: Union[GraphQLObjectType, GraphQLInterfaceType],
+ include_field_directives: bool = True,
+) -> str:
fields = [
print_description(field, " ", not i)
+ f" {name}"
+ print_args(field.args, " ")
+ f": {field.type}"
+ + (print_field_directives(field, name) if include_field_directives else "")
+ print_deprecated(field.deprecation_reason)
for i, (name, field) in enumerate(type_.fields.items())
]
diff --git a/saleor/graphql/shipping/mutations/shippings.py b/saleor/graphql/shipping/mutations/shippings.py
index 0a1c851d68..9aadb10e6e 100644
--- a/saleor/graphql/shipping/mutations/shippings.py
+++ b/saleor/graphql/shipping/mutations/shippings.py
@@ -21,10 +21,11 @@ from ....shipping.utils import (
)
from ...channel.types import ChannelContext
from ...core import ResolveInfo
+from ...core.doc_category import DOC_CATEGORY_SHIPPING
from ...core.fields import JSONString
from ...core.mutations import BaseMutation, ModelDeleteMutation, ModelMutation
from ...core.scalars import WeightScalar
-from ...core.types import NonNullList, ShippingError
+from ...core.types import BaseInputObjectType, NonNullList, ShippingError
from ...plugins.dataloaders import get_plugin_manager_promise
from ...product import types as product_types
from ...shipping import types as shipping_types
@@ -709,6 +710,7 @@ class ShippingPriceDelete(BaseMutation):
class Meta:
description = "Deletes a shipping price."
+ doc_category = DOC_CATEGORY_SHIPPING
permissions = (ShippingPermissions.MANAGE_SHIPPING,)
error_type_class = ShippingError
error_type_field = "shipping_errors"
@@ -734,13 +736,16 @@ class ShippingPriceDelete(BaseMutation):
)
-class ShippingPriceExcludeProductsInput(graphene.InputObjectType):
+class ShippingPriceExcludeProductsInput(BaseInputObjectType):
products = NonNullList(
graphene.ID,
description="List of products which will be excluded.",
required=True,
)
+ class Meta:
+ doc_category = DOC_CATEGORY_SHIPPING
+
class ShippingPriceExcludeProducts(BaseMutation):
shipping_method = graphene.Field(
@@ -750,13 +755,13 @@ class ShippingPriceExcludeProducts(BaseMutation):
class Arguments:
id = graphene.ID(required=True, description="ID of a shipping price.")
-
input = ShippingPriceExcludeProductsInput(
description="Exclude products input.", required=True
)
class Meta:
description = "Exclude products from shipping price."
+ doc_category = DOC_CATEGORY_SHIPPING
permissions = (ShippingPermissions.MANAGE_SHIPPING,)
error_type_class = ShippingError
error_type_field = "shipping_errors"
@@ -806,6 +811,7 @@ class ShippingPriceRemoveProductFromExclude(BaseMutation):
class Meta:
description = "Remove product from excluded list for shipping price."
+ doc_category = DOC_CATEGORY_SHIPPING
permissions = (ShippingPermissions.MANAGE_SHIPPING,)
error_type_class = ShippingError
error_type_field = "shipping_errors"
diff --git a/saleor/graphql/shipping/schema.py b/saleor/graphql/shipping/schema.py
index 685064e030..d0b18a70f8 100644
--- a/saleor/graphql/shipping/schema.py
+++ b/saleor/graphql/shipping/schema.py
@@ -5,6 +5,7 @@ from ...shipping import models
from ..channel.types import ChannelContext
from ..core import ResolveInfo
from ..core.connection import create_connection_slice, filter_connection_queryset
+from ..core.doc_category import DOC_CATEGORY_SHIPPING
from ..core.fields import FilterConnectionField, PermissionsField
from ..core.utils import from_global_id_or_error
from ..translations.mutations import ShippingPriceTranslate
@@ -36,6 +37,7 @@ class ShippingQueries(graphene.ObjectType):
),
description="Look up a shipping zone by ID.",
permissions=[ShippingPermissions.MANAGE_SHIPPING],
+ doc_category=DOC_CATEGORY_SHIPPING,
)
shipping_zones = FilterConnectionField(
ShippingZoneCountableConnection,
@@ -47,6 +49,7 @@ class ShippingQueries(graphene.ObjectType):
),
description="List of the shop's shipping zones.",
permissions=[ShippingPermissions.MANAGE_SHIPPING],
+ doc_category=DOC_CATEGORY_SHIPPING,
)
@staticmethod
diff --git a/saleor/graphql/shop/mutations.py b/saleor/graphql/shop/mutations.py
index c03893ad38..b23ea633ae 100644
--- a/saleor/graphql/shop/mutations.py
+++ b/saleor/graphql/shop/mutations.py
@@ -14,9 +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, PREVIEW_FEATURE
+from ..core.doc_category import DOC_CATEGORY_GIFT_CARDS, DOC_CATEGORY_ORDERS
from ..core.enums import WeightUnitsEnum
from ..core.mutations import BaseMutation, ModelDeleteMutation, ModelMutation
from ..core.types import (
+ BaseInputObjectType,
GiftCardSettingsError,
OrderSettingsError,
ShopError,
@@ -369,7 +371,7 @@ class StaffNotificationRecipientDelete(ModelDeleteMutation):
error_type_field = "shop_errors"
-class OrderSettingsUpdateInput(graphene.InputObjectType):
+class OrderSettingsUpdateInput(BaseInputObjectType):
automatically_confirm_all_new_orders = graphene.Boolean(
required=False,
description="When disabled, all new orders from checkout "
@@ -382,6 +384,9 @@ class OrderSettingsUpdateInput(graphene.InputObjectType):
"will be fulfilled automatically. By defualt set to True.",
)
+ class Meta:
+ doc_category = DOC_CATEGORY_ORDERS
+
class OrderSettingsUpdate(BaseMutation):
order_settings = graphene.Field(OrderSettings, description="Order settings.")
@@ -396,6 +401,7 @@ class OrderSettingsUpdate(BaseMutation):
"Update shop order settings across all channels. "
"Returns `orderSettings` for the first `channel` in alphabetical order. "
)
+ doc_category = DOC_CATEGORY_ORDERS
permissions = (OrderPermissions.MANAGE_ORDERS,)
error_type_class = OrderSettingsError
error_type_field = "order_settings_errors"
@@ -440,12 +446,15 @@ class OrderSettingsUpdate(BaseMutation):
return OrderSettingsUpdate(order_settings=order_settings)
-class GiftCardSettingsUpdateInput(graphene.InputObjectType):
+class GiftCardSettingsUpdateInput(BaseInputObjectType):
expiry_type = GiftCardSettingsExpiryTypeEnum(
description="Defines gift card default expiry settings."
)
expiry_period = TimePeriodInputType(description="Defines gift card expiry period.")
+ class Meta:
+ doc_category = DOC_CATEGORY_GIFT_CARDS
+
class GiftCardSettingsUpdate(BaseMutation):
gift_card_settings = graphene.Field(
@@ -459,6 +468,7 @@ class GiftCardSettingsUpdate(BaseMutation):
class Meta:
description = "Update gift card settings."
+ doc_category = DOC_CATEGORY_GIFT_CARDS
permissions = (GiftcardPermissions.MANAGE_GIFT_CARD,)
error_type_class = GiftCardSettingsError
diff --git a/saleor/graphql/shop/schema.py b/saleor/graphql/shop/schema.py
index 24cb5025f7..f34e749128 100644
--- a/saleor/graphql/shop/schema.py
+++ b/saleor/graphql/shop/schema.py
@@ -4,6 +4,7 @@ from ...channel import models as channel_models
from ...permission.enums import GiftcardPermissions, OrderPermissions
from ..channel.types import OrderSettings
from ..core.descriptions import DEPRECATED_IN_3X_FIELD, DEPRECATED_IN_3X_MUTATION
+from ..core.doc_category import DOC_CATEGORY_GIFT_CARDS, DOC_CATEGORY_ORDERS
from ..core.fields import PermissionsField
from ..site.dataloaders import load_site_callback
from ..translations.mutations import ShopSettingsTranslate
@@ -39,12 +40,14 @@ class ShopQueries(graphene.ObjectType):
"Use the `channel` query to fetch the `orderSettings` field instead."
),
permissions=[OrderPermissions.MANAGE_ORDERS],
+ doc_category=DOC_CATEGORY_ORDERS,
)
gift_card_settings = PermissionsField(
GiftCardSettings,
description="Gift card related settings from site settings.",
required=True,
permissions=[GiftcardPermissions.MANAGE_GIFT_CARD],
+ doc_category=DOC_CATEGORY_GIFT_CARDS,
)
def resolve_shop(self, _info):
diff --git a/saleor/graphql/tax/filters.py b/saleor/graphql/tax/filters.py
index b0b0f1a853..5dabd02b08 100644
--- a/saleor/graphql/tax/filters.py
+++ b/saleor/graphql/tax/filters.py
@@ -2,6 +2,7 @@ from django.db.models import Exists, OuterRef
from ...tax import models
from ..account.enums import CountryCodeEnum
+from ..core.doc_category import DOC_CATEGORY_TAXES
from ..core.filters import (
GlobalIDMultipleChoiceFilter,
ListObjectTypeFilter,
@@ -29,6 +30,7 @@ class TaxConfigurationFilter(MetadataFilterBase):
class TaxConfigurationFilterInput(FilterInputObjectType):
class Meta:
+ doc_category = DOC_CATEGORY_TAXES
filterset_class = TaxConfigurationFilter
@@ -45,4 +47,5 @@ class TaxClassFilter(MetadataFilterBase):
class TaxClassFilterInput(FilterInputObjectType):
class Meta:
+ doc_category = DOC_CATEGORY_TAXES
filterset_class = TaxClassFilter
diff --git a/saleor/graphql/tax/mutations/tax_class_create.py b/saleor/graphql/tax/mutations/tax_class_create.py
index 228507887b..cbc50f7167 100644
--- a/saleor/graphql/tax/mutations/tax_class_create.py
+++ b/saleor/graphql/tax/mutations/tax_class_create.py
@@ -4,8 +4,9 @@ from ....permission.enums import CheckoutPermissions
from ....tax import error_codes, models
from ...account.enums import CountryCodeEnum
from ...core.descriptions import ADDED_IN_39, PREVIEW_FEATURE
+from ...core.doc_category import DOC_CATEGORY_TAXES
from ...core.mutations import ModelMutation
-from ...core.types import Error, NonNullList
+from ...core.types import BaseInputObjectType, Error, NonNullList
from ..types import TaxClass
TaxClassCreateErrorCode = graphene.Enum.from_enum(error_codes.TaxClassCreateErrorCode)
@@ -19,8 +20,11 @@ class TaxClassCreateError(Error):
required=True,
)
+ class Meta:
+ doc_category = DOC_CATEGORY_TAXES
+
-class CountryRateInput(graphene.InputObjectType):
+class CountryRateInput(BaseInputObjectType):
country_code = CountryCodeEnum(
description="Country in which this rate applies.", required=True
)
@@ -32,14 +36,20 @@ class CountryRateInput(graphene.InputObjectType):
required=True,
)
+ class Meta:
+ doc_category = DOC_CATEGORY_TAXES
+
-class TaxClassCreateInput(graphene.InputObjectType):
+class TaxClassCreateInput(BaseInputObjectType):
name = graphene.String(description="Name of the tax class.", required=True)
create_country_rates = NonNullList(
CountryRateInput,
description="List of country-specific tax rates to create for this tax class.",
)
+ class Meta:
+ doc_category = DOC_CATEGORY_TAXES
+
class TaxClassCreate(ModelMutation):
class Arguments:
diff --git a/saleor/graphql/tax/mutations/tax_country_configuration_delete.py b/saleor/graphql/tax/mutations/tax_country_configuration_delete.py
index 48b223ad5c..26e9cd9124 100644
--- a/saleor/graphql/tax/mutations/tax_country_configuration_delete.py
+++ b/saleor/graphql/tax/mutations/tax_country_configuration_delete.py
@@ -6,6 +6,7 @@ from ....tax import error_codes, models
from ...account.enums import CountryCodeEnum
from ...core import ResolveInfo
from ...core.descriptions import ADDED_IN_39, PREVIEW_FEATURE
+from ...core.doc_category import DOC_CATEGORY_TAXES
from ...core.mutations import BaseMutation
from ...core.types import Error
from ..types import TaxCountryConfiguration
@@ -38,6 +39,7 @@ class TaxCountryConfigurationDelete(BaseMutation):
+ ADDED_IN_39
+ PREVIEW_FEATURE
)
+ doc_category = DOC_CATEGORY_TAXES
error_type_class = TaxCountryConfigurationDeleteError
permissions = (CheckoutPermissions.MANAGE_TAXES,)
diff --git a/saleor/graphql/tax/mutations/tax_country_configuration_update.py b/saleor/graphql/tax/mutations/tax_country_configuration_update.py
index 1aca798128..1e8935e848 100644
--- a/saleor/graphql/tax/mutations/tax_country_configuration_update.py
+++ b/saleor/graphql/tax/mutations/tax_country_configuration_update.py
@@ -11,8 +11,9 @@ from ....tax import error_codes, models
from ...account.enums import CountryCodeEnum
from ...core import ResolveInfo
from ...core.descriptions import ADDED_IN_39, PREVIEW_FEATURE
+from ...core.doc_category import DOC_CATEGORY_TAXES
from ...core.mutations import BaseMutation
-from ...core.types import Error, NonNullList
+from ...core.types import BaseInputObjectType, Error, NonNullList
from ...core.utils import from_global_id_or_error
from ..types import TaxCountryConfiguration
@@ -31,13 +32,19 @@ class TaxCountryConfigurationUpdateError(Error):
required=True,
)
+ class Meta:
+ doc_category = DOC_CATEGORY_TAXES
+
-class TaxClassRateInput(graphene.InputObjectType):
+class TaxClassRateInput(BaseInputObjectType):
tax_class_id = graphene.ID(
description="ID of a tax class for which to update the tax rate", required=False
)
rate = graphene.Float(description="Tax rate value.", required=False)
+ class Meta:
+ doc_category = DOC_CATEGORY_TAXES
+
class TaxCountryConfigurationUpdate(BaseMutation):
tax_country_configuration = graphene.Field(
@@ -66,6 +73,7 @@ class TaxCountryConfigurationUpdate(BaseMutation):
+ ADDED_IN_39
+ PREVIEW_FEATURE
)
+ doc_category = DOC_CATEGORY_TAXES
error_type_class = TaxCountryConfigurationUpdateError
permissions = (CheckoutPermissions.MANAGE_TAXES,)
diff --git a/saleor/graphql/tax/mutations/tax_exemption_manage.py b/saleor/graphql/tax/mutations/tax_exemption_manage.py
index a00159f9ab..131856d79c 100644
--- a/saleor/graphql/tax/mutations/tax_exemption_manage.py
+++ b/saleor/graphql/tax/mutations/tax_exemption_manage.py
@@ -11,6 +11,7 @@ from ....permission.enums import CheckoutPermissions
from ....tax import error_codes
from ...core import ResolveInfo
from ...core.descriptions import ADDED_IN_38, PREVIEW_FEATURE
+from ...core.doc_category import DOC_CATEGORY_TAXES
from ...core.types import Error
from ...core.types.taxes import TaxSourceObject
from ...discount.dataloaders import load_discounts
@@ -45,6 +46,7 @@ class TaxExemptionManage(BaseMutation):
+ ADDED_IN_38
+ PREVIEW_FEATURE
)
+ doc_category = DOC_CATEGORY_TAXES
error_type_class = TaxExemptionManageError
permissions = (CheckoutPermissions.MANAGE_TAXES,)
diff --git a/saleor/graphql/tax/schema.py b/saleor/graphql/tax/schema.py
index c825b1e948..70a0dc9e99 100644
--- a/saleor/graphql/tax/schema.py
+++ b/saleor/graphql/tax/schema.py
@@ -9,6 +9,7 @@ from ..account.enums import CountryCodeEnum
from ..core import ResolveInfo
from ..core.connection import create_connection_slice, filter_connection_queryset
from ..core.descriptions import ADDED_IN_39, PREVIEW_FEATURE
+from ..core.doc_category import DOC_CATEGORY_TAXES
from ..core.fields import FilterConnectionField, PermissionsField
from ..core.types import NonNullList
from ..core.utils import from_global_id_or_error
@@ -43,6 +44,7 @@ class TaxQueries(graphene.ObjectType):
AuthorizationFilters.AUTHENTICATED_STAFF_USER,
AuthorizationFilters.AUTHENTICATED_APP,
],
+ doc_category=DOC_CATEGORY_TAXES,
)
tax_configurations = FilterConnectionField(
TaxConfigurationCountableConnection,
@@ -54,6 +56,7 @@ class TaxQueries(graphene.ObjectType):
AuthorizationFilters.AUTHENTICATED_STAFF_USER,
AuthorizationFilters.AUTHENTICATED_APP,
],
+ doc_category=DOC_CATEGORY_TAXES,
)
tax_class = PermissionsField(
TaxClass,
@@ -65,6 +68,7 @@ class TaxQueries(graphene.ObjectType):
AuthorizationFilters.AUTHENTICATED_STAFF_USER,
AuthorizationFilters.AUTHENTICATED_APP,
],
+ doc_category=DOC_CATEGORY_TAXES,
)
tax_classes = FilterConnectionField(
TaxClassCountableConnection,
@@ -75,6 +79,7 @@ class TaxQueries(graphene.ObjectType):
AuthorizationFilters.AUTHENTICATED_STAFF_USER,
AuthorizationFilters.AUTHENTICATED_APP,
],
+ doc_category=DOC_CATEGORY_TAXES,
)
tax_country_configuration = PermissionsField(
TaxCountryConfiguration,
@@ -88,6 +93,7 @@ class TaxQueries(graphene.ObjectType):
AuthorizationFilters.AUTHENTICATED_STAFF_USER,
AuthorizationFilters.AUTHENTICATED_APP,
],
+ doc_category=DOC_CATEGORY_TAXES,
)
tax_country_configurations = PermissionsField(
NonNullList(
@@ -99,6 +105,7 @@ class TaxQueries(graphene.ObjectType):
AuthorizationFilters.AUTHENTICATED_STAFF_USER,
AuthorizationFilters.AUTHENTICATED_APP,
],
+ doc_category=DOC_CATEGORY_TAXES,
)
@staticmethod
diff --git a/saleor/graphql/tax/sorters.py b/saleor/graphql/tax/sorters.py
index 4fa3d1abd2..b59c8b971c 100644
--- a/saleor/graphql/tax/sorters.py
+++ b/saleor/graphql/tax/sorters.py
@@ -1,11 +1,13 @@
-import graphene
+from ..core.doc_category import DOC_CATEGORY_TAXES
+from ..core.types import BaseEnum, SortInputObjectType
-from ..core.types import SortInputObjectType
-
-class TaxClassSortField(graphene.Enum):
+class TaxClassSortField(BaseEnum):
NAME = ["name", "pk"]
+ class Meta:
+ doc_category = DOC_CATEGORY_TAXES
+
@property
def description(self):
if self.name in TaxClassSortField.__enum__._member_names_:
@@ -16,5 +18,6 @@ class TaxClassSortField(graphene.Enum):
class TaxClassSortingInput(SortInputObjectType):
class Meta:
+ doc_category = DOC_CATEGORY_TAXES
sort_enum = TaxClassSortField
type_name = "tax classes"
diff --git a/saleor/graphql/tax/types.py b/saleor/graphql/tax/types.py
index 654922ba26..62a0882159 100644
--- a/saleor/graphql/tax/types.py
+++ b/saleor/graphql/tax/types.py
@@ -6,7 +6,8 @@ from ..channel.types import Channel
from ..core import ResolveInfo
from ..core.connection import CountableConnection
from ..core.descriptions import ADDED_IN_39, PREVIEW_FEATURE
-from ..core.types import CountryDisplay, ModelObjectType, NonNullList
+from ..core.doc_category import DOC_CATEGORY_TAXES
+from ..core.types import BaseObjectType, CountryDisplay, ModelObjectType, NonNullList
from ..meta.types import ObjectWithMetadata
from .dataloaders import (
TaxClassByIdLoader,
@@ -72,6 +73,7 @@ class TaxConfiguration(ModelObjectType[models.TaxConfiguration]):
class TaxConfigurationCountableConnection(CountableConnection):
class Meta:
+ doc_category = DOC_CATEGORY_TAXES
node = TaxConfiguration
@@ -140,6 +142,7 @@ class TaxClass(ModelObjectType[models.TaxClass]):
class TaxClassCountableConnection(CountableConnection):
class Meta:
+ doc_category = DOC_CATEGORY_TAXES
node = TaxClass
@@ -175,7 +178,7 @@ class TaxClassCountryRate(ModelObjectType[models.TaxClassCountryRate]):
)
-class TaxCountryConfiguration(graphene.ObjectType):
+class TaxCountryConfiguration(BaseObjectType):
country = graphene.Field(
CountryDisplay,
required=True,
@@ -189,6 +192,7 @@ class TaxCountryConfiguration(graphene.ObjectType):
description = (
"Tax class rates grouped by country." + ADDED_IN_39 + PREVIEW_FEATURE
)
+ doc_category = DOC_CATEGORY_TAXES
@staticmethod
def resolve_country(root, _info: ResolveInfo, **kwargs):
diff --git a/saleor/graphql/warehouse/bulk_mutations/stock_bulk_update.py b/saleor/graphql/warehouse/bulk_mutations/stock_bulk_update.py
index 7259f0c845..6b6e2e5672 100644
--- a/saleor/graphql/warehouse/bulk_mutations/stock_bulk_update.py
+++ b/saleor/graphql/warehouse/bulk_mutations/stock_bulk_update.py
@@ -9,15 +9,21 @@ from ....permission.enums import ProductPermissions
from ....warehouse import models
from ....warehouse.error_codes import StockBulkUpdateErrorCode
from ...core.descriptions import ADDED_IN_313, PREVIEW_FEATURE
+from ...core.doc_category import DOC_CATEGORY_PRODUCTS
from ...core.enums import ErrorPolicyEnum
from ...core.mutations import BaseMutation
-from ...core.types import NonNullList, StockBulkUpdateError
+from ...core.types import (
+ BaseInputObjectType,
+ BaseObjectType,
+ NonNullList,
+ StockBulkUpdateError,
+)
from ...core.validators import validate_one_of_args_is_in_mutation
from ...plugins.dataloaders import get_plugin_manager_promise
from ..types import Stock
-class StockBulkResult(graphene.ObjectType):
+class StockBulkResult(BaseObjectType):
stock = graphene.Field(Stock, required=False, description="Stock data.")
errors = NonNullList(
StockBulkUpdateError,
@@ -25,8 +31,11 @@ class StockBulkResult(graphene.ObjectType):
description="List of errors occurred on create or update attempt.",
)
+ class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
+
-class StockBulkUpdateInput(graphene.InputObjectType):
+class StockBulkUpdateInput(BaseInputObjectType):
variant_id = graphene.ID(required=False, description="Variant ID.")
variant_external_reference = graphene.String(
required=False, description="Variant external reference."
@@ -39,6 +48,9 @@ class StockBulkUpdateInput(graphene.InputObjectType):
required=True, description="Quantity of items available for sell."
)
+ class Meta:
+ doc_category = DOC_CATEGORY_PRODUCTS
+
class StockBulkUpdate(BaseMutation):
count = graphene.Int(
@@ -74,6 +86,7 @@ class StockBulkUpdate(BaseMutation):
+ ADDED_IN_313
+ PREVIEW_FEATURE
)
+ doc_category = DOC_CATEGORY_PRODUCTS
permissions = (ProductPermissions.MANAGE_PRODUCTS,)
error_type_class = StockBulkUpdateError
diff --git a/saleor/graphql/warehouse/schema.py b/saleor/graphql/warehouse/schema.py
index b27b0be1bb..4de99d05f9 100644
--- a/saleor/graphql/warehouse/schema.py
+++ b/saleor/graphql/warehouse/schema.py
@@ -9,6 +9,7 @@ from ...warehouse import models
from ..core import ResolveInfo
from ..core.connection import create_connection_slice, filter_connection_queryset
from ..core.descriptions import ADDED_IN_310
+from ..core.doc_category import DOC_CATEGORY_PRODUCTS
from ..core.fields import FilterConnectionField, PermissionsField
from ..core.utils import from_global_id_or_error
from ..core.utils.resolvers import resolve_by_global_id_or_ext_ref
@@ -44,6 +45,7 @@ class WarehouseQueries(graphene.ObjectType):
OrderPermissions.MANAGE_ORDERS,
ShippingPermissions.MANAGE_SHIPPING,
],
+ doc_category=DOC_CATEGORY_PRODUCTS,
)
warehouses = FilterConnectionField(
WarehouseCountableConnection,
@@ -55,6 +57,7 @@ class WarehouseQueries(graphene.ObjectType):
OrderPermissions.MANAGE_ORDERS,
ShippingPermissions.MANAGE_SHIPPING,
],
+ doc_category=DOC_CATEGORY_PRODUCTS,
)
@staticmethod
@@ -84,12 +87,14 @@ class StockQueries(graphene.ObjectType):
description="Look up a stock by ID",
id=graphene.ID(required=True, description="ID of an warehouse"),
permissions=[ProductPermissions.MANAGE_PRODUCTS],
+ doc_category=DOC_CATEGORY_PRODUCTS,
)
stocks = FilterConnectionField(
StockCountableConnection,
description="List of stocks.",
filter=StockFilterInput(),
permissions=[ProductPermissions.MANAGE_PRODUCTS],
+ doc_category=DOC_CATEGORY_PRODUCTS,
)
@staticmethod
diff --git a/saleor/graphql/webhook/mutations/event_delivery_retry.py b/saleor/graphql/webhook/mutations/event_delivery_retry.py
index 6848d48404..620b066a6a 100644
--- a/saleor/graphql/webhook/mutations/event_delivery_retry.py
+++ b/saleor/graphql/webhook/mutations/event_delivery_retry.py
@@ -2,6 +2,7 @@ import graphene
from ....permission.enums import AppPermission
from ...core import ResolveInfo
+from ...core.doc_category import DOC_CATEGORY_WEBHOOKS
from ...core.mutations import BaseMutation
from ...core.types import WebhookError
from ...plugins.dataloaders import get_plugin_manager_promise
@@ -18,6 +19,7 @@ class EventDeliveryRetry(BaseMutation):
class Meta:
description = "Retries event delivery."
+ doc_category = DOC_CATEGORY_WEBHOOKS
permissions = (AppPermission.MANAGE_APPS,)
error_type_class = WebhookError
diff --git a/saleor/graphql/webhook/mutations/webhook_dry_run.py b/saleor/graphql/webhook/mutations/webhook_dry_run.py
index 07cd3eb4c5..f1207c3989 100644
--- a/saleor/graphql/webhook/mutations/webhook_dry_run.py
+++ b/saleor/graphql/webhook/mutations/webhook_dry_run.py
@@ -5,6 +5,7 @@ from ....permission.auth_filters import AuthorizationFilters
from ....webhook.error_codes import WebhookDryRunErrorCode
from ....webhook.event_types import WebhookEventAsyncType
from ...core.descriptions import ADDED_IN_311, PREVIEW_FEATURE
+from ...core.doc_category import DOC_CATEGORY_WEBHOOKS
from ...core.fields import JSONString
from ...core.mutations import BaseMutation
from ...core.types import WebhookDryRunError
@@ -40,6 +41,7 @@ class WebhookDryRun(BaseMutation):
+ ADDED_IN_311
+ PREVIEW_FEATURE
)
+ doc_category = DOC_CATEGORY_WEBHOOKS
permissions = (AuthorizationFilters.AUTHENTICATED_STAFF_USER,)
error_type_class = WebhookDryRunError
diff --git a/saleor/graphql/webhook/mutations/webhook_trigger.py b/saleor/graphql/webhook/mutations/webhook_trigger.py
index 72e7c03160..d1b36541b5 100644
--- a/saleor/graphql/webhook/mutations/webhook_trigger.py
+++ b/saleor/graphql/webhook/mutations/webhook_trigger.py
@@ -7,6 +7,7 @@ from ....permission.auth_filters import AuthorizationFilters
from ....webhook.error_codes import WebhookTriggerErrorCode
from ....webhook.event_types import WebhookEventAsyncType
from ...core.descriptions import ADDED_IN_311, PREVIEW_FEATURE
+from ...core.doc_category import DOC_CATEGORY_WEBHOOKS
from ...core.mutations import BaseMutation
from ...core.types.common import WebhookTriggerError
from ...core.utils import raise_validation_error
@@ -33,6 +34,7 @@ class WebhookTrigger(BaseMutation):
+ ADDED_IN_311
+ PREVIEW_FEATURE
)
+ doc_category = DOC_CATEGORY_WEBHOOKS
permissions = (AuthorizationFilters.AUTHENTICATED_STAFF_USER,)
error_type_class = WebhookTriggerError
diff --git a/saleor/graphql/webhook/schema.py b/saleor/graphql/webhook/schema.py
index d5e73670b7..9ed43237dd 100644
--- a/saleor/graphql/webhook/schema.py
+++ b/saleor/graphql/webhook/schema.py
@@ -5,7 +5,8 @@ from ...permission.enums import AppPermission
from ..app.dataloaders import app_promise_callback
from ..core import ResolveInfo
from ..core.descriptions import DEPRECATED_IN_3X_FIELD
-from ..core.fields import JSONString, PermissionsField
+from ..core.doc_category import DOC_CATEGORY_WEBHOOKS
+from ..core.fields import BaseField, JSONString, PermissionsField
from ..core.types import NonNullList
from .enums import WebhookSampleEventTypeEnum
from .mutations import (
@@ -21,7 +22,7 @@ from .types import Webhook, WebhookEvent
class WebhookQueries(graphene.ObjectType):
- webhook = graphene.Field(
+ webhook = BaseField(
Webhook,
id=graphene.Argument(
graphene.ID, required=True, description="ID of the webhook."
@@ -30,6 +31,7 @@ class WebhookQueries(graphene.ObjectType):
"Look up a webhook by ID. Requires one of the following permissions: "
f"{AppPermission.MANAGE_APPS.name}, {AuthorizationFilters.OWNER.name}."
),
+ doc_category=DOC_CATEGORY_WEBHOOKS,
)
webhook_events = PermissionsField(
NonNullList(WebhookEvent),
@@ -39,8 +41,9 @@ class WebhookQueries(graphene.ObjectType):
"`WebhookEventTypeSyncEnum` to get available event types."
),
permissions=[AppPermission.MANAGE_APPS],
+ doc_category=DOC_CATEGORY_WEBHOOKS,
)
- webhook_sample_payload = graphene.Field(
+ webhook_sample_payload = BaseField(
JSONString,
event_type=graphene.Argument(
WebhookSampleEventTypeEnum,
@@ -51,6 +54,7 @@ class WebhookQueries(graphene.ObjectType):
"Retrieve a sample payload for a given webhook event based on real data. It"
" can be useful for some integrations where sample payload is required."
),
+ doc_category=DOC_CATEGORY_WEBHOOKS,
)
@staticmethod