Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Add info to bulk checkout&order queries about skipping external requests (#17450)
Maciej Korycinskic0423c3cd496
diff --git a/saleor/graphql/account/types.py b/saleor/graphql/account/types.pyindex 09ca8cf638..c284fd3715 100644--- a/saleor/graphql/account/types.py+++ b/saleor/graphql/account/types.py@@ -376,7 +376,12 @@ class User(ModelObjectType[models.User]):)checkouts = ConnectionField(CheckoutCountableConnection,- description="Returns checkouts assigned to this user.",+ description=(+ "Returns checkouts assigned to this user. The query will not initiate any "+ "external requests, including fetching external shipping methods, "+ "filtering available shipping methods, or performing external tax "+ "calculations."+ ),channel=graphene.String(description="Slug of a channel for which the data should be returned."),@@ -393,7 +398,10 @@ class User(ModelObjectType[models.User]):orders = ConnectionField("saleor.graphql.order.types.OrderCountableConnection",description=(- "List of user's orders. Requires one of the following permissions: "+ "List of user's orders. The query will not initiate any external requests, "+ "including filtering available shipping methods, or performing external "+ "tax calculations. Requires one of the following"+ " permissions: "f"{AccountPermissions.MANAGE_STAFF.name}, "f"{AuthorizationFilters.OWNER.name}."),diff --git a/saleor/graphql/checkout/schema.py b/saleor/graphql/checkout/schema.pyindex 9540e11c47..e1a5b89263 100644--- a/saleor/graphql/checkout/schema.py+++ b/saleor/graphql/checkout/schema.py@@ -77,12 +77,20 @@ class CheckoutQueries(graphene.ObjectType):CheckoutPermissions.MANAGE_CHECKOUTS,PaymentPermissions.HANDLE_PAYMENTS,],- description="List of checkouts.",+ description=(+ "List of checkouts. The query will not initiate any external requests, "+ "including fetching external shipping methods, filtering available "+ "shipping methods, or performing external tax calculations."+ ),doc_category=DOC_CATEGORY_CHECKOUT,)checkout_lines = ConnectionField(CheckoutLineCountableConnection,- description="List of checkout lines.",+ description=(+ "List of checkout lines. The query will not initiate any external "+ "requests, including fetching external shipping methods, filtering "+ "available shipping methods, or performing external tax calculations."+ ),permissions=[CheckoutPermissions.MANAGE_CHECKOUTS,],diff --git a/saleor/graphql/order/schema.py b/saleor/graphql/order/schema.pyindex c916f1e5ee..c45710d048 100644--- a/saleor/graphql/order/schema.py+++ b/saleor/graphql/order/schema.py@@ -125,7 +125,11 @@ class OrderQueries(graphene.ObjectType):channel=graphene.String(description="Slug of a channel for which the data should be returned."),- description="List of orders.",+ description=(+ "List of orders. The query will not initiate any external requests, "+ "including filtering available shipping methods, or performing external "+ "tax calculations."+ ),permissions=[OrderPermissions.MANAGE_ORDERS,],@@ -135,7 +139,11 @@ class OrderQueries(graphene.ObjectType):OrderCountableConnection,sort_by=OrderSortingInput(description="Sort draft orders."),filter=OrderDraftFilterInput(description="Filtering options for draft orders."),- description="List of draft orders.",+ description=(+ "List of draft orders. The query will not initiate any external requests, "+ "including filtering available shipping methods, or performing external "+ "tax calculations."+ ),permissions=[OrderPermissions.MANAGE_ORDERS,],diff --git a/saleor/graphql/schema.graphql b/saleor/graphql/schema.graphqlindex 459f267656..c23ac22352 100644--- a/saleor/graphql/schema.graphql+++ b/saleor/graphql/schema.graphql@@ -772,7 +772,7 @@ type Query {): Order @doc(category: "Orders")"""- List of orders.+ List of orders. The query will not initiate any external requests, including filtering available shipping methods, or performing external tax calculations.Requires one of the following permissions: MANAGE_ORDERS."""@@ -804,7 +804,7 @@ type Query {): OrderCountableConnection @doc(category: "Orders")"""- List of draft orders.+ List of draft orders. The query will not initiate any external requests, including filtering available shipping methods, or performing external tax calculations.Requires one of the following permissions: MANAGE_ORDERS."""@@ -1254,7 +1254,7 @@ type Query {): Checkout @doc(category: "Checkout")"""- List of checkouts.+ List of checkouts. The query will not initiate any external requests, including fetching external shipping methods, filtering available shipping methods, or performing external tax calculations.Requires one of the following permissions: MANAGE_CHECKOUTS, HANDLE_PAYMENTS."""@@ -1286,7 +1286,7 @@ type Query {): CheckoutCountableConnection @doc(category: "Checkout")"""- List of checkout lines.+ List of checkout lines. The query will not initiate any external requests, including fetching external shipping methods, filtering available shipping methods, or performing external tax calculations.Requires one of the following permissions: MANAGE_CHECKOUTS."""@@ -9817,7 +9817,9 @@ type User implements Node & ObjectWithMetadata @doc(category: "Users") {channel: String): [ID!]- """Returns checkouts assigned to this user."""+ """+ Returns checkouts assigned to this user. The query will not initiate any external requests, including fetching external shipping methods, filtering available shipping methods, or performing external tax calculations.+ """checkouts("""Slug of a channel for which the data should be returned."""channel: String@@ -9866,7 +9868,7 @@ type User implements Node & ObjectWithMetadata @doc(category: "Users") {note: String"""- List of user's orders. Requires one of the following permissions: MANAGE_STAFF, OWNER.+ List of user's orders. The query will not initiate any external requests, including filtering available shipping methods, or performing external tax calculations. Requires one of the following permissions: MANAGE_STAFF, OWNER."""orders("""Return the elements in the list that come before the specified cursor."""