GraphQL mutation that assigns a shipping zone to a warehouse, validating warehouse count and permissions. Reuse for warehouse-shipping zone association in Saleor.
# Source: https://github.com/saleor/saleor | License: BSD-3-Clause | Copyright 2020-2023, Saleor Commerce # Provided via justclaw.it.com; keep this notice with the code. from collections import defaultdict import graphene from django.core.exceptions import ValidationError from ....channel import models as channel_models from ....permission.enums import ProductPermissions from ....warehouse import models from ....warehouse.error_codes import WarehouseErrorCode from ....warehouse.validation import validate_warehouse_count from ...account.i18n import I18nMixin from ...core import ResolveInfo from ...core.mutations import DeprecatedModelMutation from ...core.types import NonNullList, WarehouseError from ...shipping.types import ShippingZone from ..types import Warehouse class WarehouseShip ... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key