Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Remove deprecated GraphQL fields (#19482)
Lukasz Ostrowski7dfd808abe46
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex a871049ba1..1f7688e5d8 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -23,6 +23,9 @@ All notable, unreleased changes to this project will be documented in this file.- Added `stockAvailability` and `stocks` filters to the `productVariants` query `where` input, allowing variants to be filtered by their stock status and stock quantity for a given channel - #17689 by @ayesha-waris- `lines` input on the `checkoutCreate` mutation is no longer required. When omitted, a checkout with no lines is created.+- Removed the deprecated `availableShippingMethods` field from the `Order` type. Use `shippingMethods` instead.+- Removed the deprecated `variant` field from the `Product` type. Use the top-level `variant` query instead.+- Removed the deprecated `note` field from the `Checkout` type. Use `customerNote` instead.### Webhooksdiff --git a/saleor/graphql/checkout/tests/mutations/test_checkout_customer_note_update.py b/saleor/graphql/checkout/tests/mutations/test_checkout_customer_note_update.pyindex ed8cb25794..6c9e79fd9d 100644--- a/saleor/graphql/checkout/tests/mutations/test_checkout_customer_note_update.py+++ b/saleor/graphql/checkout/tests/mutations/test_checkout_customer_note_update.py@@ -17,7 +17,6 @@ CHECKOUT_CUSTOMER_NOTE_UPDATE_MUTATION = """checkoutCustomerNoteUpdate(id: $id, customerNote: $customerNote) {checkout {id,- notecustomerNote},errors {@@ -55,7 +54,7 @@ def test_checkout_customer_note_update(user_api_client, checkout_with_item):assert not data["errors"]checkout.refresh_from_db()assert checkout.note == customer_note- assert data["checkout"]["customerNote"] == data["checkout"]["note"] == customer_note+ assert data["checkout"]["customerNote"] == customer_noteassert checkout.last_change != previous_last_change@@ -95,7 +94,7 @@ def test_checkout_customer_note_update_when_line_without_listing(assert not data["errors"]checkout.refresh_from_db()assert checkout.note == customer_note- assert data["checkout"]["customerNote"] == data["checkout"]["note"] == customer_note+ assert data["checkout"]["customerNote"] == customer_noteassert checkout.last_change != previous_last_changediff --git a/saleor/graphql/checkout/types.py b/saleor/graphql/checkout/types.pyindex a594bc8acb..1c017ca1a3 100644--- a/saleor/graphql/checkout/types.py+++ b/saleor/graphql/checkout/types.py@@ -606,11 +606,6 @@ class Checkout(SyncWebhookControlContextModelObjectType[models.Checkout]):customer_note = graphene.String(required=True, description="The customer note for the checkout. ")- note = graphene.String(- required=True,- description="The note for the checkout.",- deprecation_reason="Use `customerNote` instead.",- )discount = graphene.Field(Money,description=(diff --git a/saleor/graphql/order/tests/benchmark/test_order.py b/saleor/graphql/order/tests/benchmark/test_order.pyindex cff384491e..c45a02bd0e 100644--- a/saleor/graphql/order/tests/benchmark/test_order.py+++ b/saleor/graphql/order/tests/benchmark/test_order.py@@ -19,7 +19,7 @@ FRAGMENT_DISCOUNTS = """"""FRAGMENT_SHIPPING_METHODS = """- fragment AvailableShippingMethods on ShippingMethod {+ fragment ShippingMethods on ShippingMethod {idprice {amount@@ -87,8 +87,8 @@ FRAGMENT_ORDER_DETAILS = (url}}- availableShippingMethods {- ...AvailableShippingMethods+ shippingMethods {+ ...ShippingMethods}subtotal {...Pricediff --git a/saleor/graphql/order/tests/queries/shared_query_fragments.py b/saleor/graphql/order/tests/queries/shared_query_fragments.pyindex 25f886051d..bf78bffc6d 100644--- a/saleor/graphql/order/tests/queries/shared_query_fragments.py+++ b/saleor/graphql/order/tests/queries/shared_query_fragments.py@@ -13,9 +13,6 @@ fragment order on Order {shippingMethods {id}- availableShippingMethods{- id- }errors {fieldorderLinesdiff --git a/saleor/graphql/order/tests/queries/test_order.py b/saleor/graphql/order/tests/queries/test_order.pyindex e1ceab49ee..675e3ddf51 100644--- a/saleor/graphql/order/tests/queries/test_order.py+++ b/saleor/graphql/order/tests/queries/test_order.py@@ -206,30 +206,6 @@ query OrdersQuery {amount}}- availableShippingMethods {- id- name- description- price{- amount- }- minimumOrderPrice {- amount- }- maximumOrderPrice{- amount- }- maximumDeliveryDays- minimumDeliveryDays- metadata{- key- value- }- privateMetadata{- key- value- }- }shippingMethods{idname@@ -437,12 +413,12 @@ def test_order_query(lines_qs=order.lines.all(), channel_id=order.channel.id)- assert len(order_data["availableShippingMethods"]) == (expected_methods.count())+ assert len(order_data["shippingMethods"]) == (expected_methods.count())assert len(order_data["availableCollectionPoints"]) == (expected_collection_points.count())- method = order_data["availableShippingMethods"][0]+ method = order_data["shippingMethods"][0]expected_method = expected_methods.first()expected_shipping_price = expected_method.channel_listings.get(channel_id=order.channel_id@@ -1438,9 +1414,9 @@ def test_order_query_in_pln_channel(country_code=order.shipping_address.country.code,channel_id=order.channel_id,)- assert len(order_data["availableShippingMethods"]) == (expected_methods.count())+ assert len(order_data["shippingMethods"]) == (expected_methods.count())- method = order_data["availableShippingMethods"][0]+ method = order_data["shippingMethods"][0]expected_method = expected_methods.first()expected_shipping_price = expected_method.channel_listings.get(channel_id=order.channel_iddiff --git a/saleor/graphql/order/tests/queries/test_order_excluded_shipping_methods.py b/saleor/graphql/order/tests/queries/test_order_excluded_shipping_methods.pyindex 8e9615a2a6..aadbefb4f5 100644--- a/saleor/graphql/order/tests/queries/test_order_excluded_shipping_methods.py+++ b/saleor/graphql/order/tests/queries/test_order_excluded_shipping_methods.py@@ -17,12 +17,6 @@ query OrderQuery($id: ID) {activemessage}- availableShippingMethods {- id- name- active- message- }}}"""@@ -143,45 +137,3 @@ def test_order_shipping_methods_skips_sync_webhook_for_non_editable_statuses(assert not mocked_webhook.calledassert len(shipping_methods) == 1assert shipping_methods[0]["active"]--- ("webhook_response", "expected_count"),- [- (lambda s: [ExcludedShippingMethod(str(s.id), "")], 0),- (lambda s: [], 1),- ],-)- "saleor.order.webhooks.exclude_shipping.excluded_shipping_methods_for_order"-)-def test_order_available_shipping_methods(- mocked_webhook,- staff_api_client,- order_with_lines,- permission_group_manage_orders,- settings,- webhook_response,- expected_count,-):- # given- settings.PLUGINS = ["saleor.plugins.webhook.plugin.WebhookPlugin"]- order_with_lines.status = OrderStatus.UNCONFIRMED- order_with_lines.save(update_fields=["status"])- shipping_method = order_with_lines.shipping_method-- def respond(*args, **kwargs):- return Promise.resolve(webhook_response(shipping_method))-- mocked_webhook.side_effect = respond- permission_group_manage_orders.user_set.add(staff_api_client.user)- # when- response = staff_api_client.post_graphql(- ORDER_QUERY_SHIPPING_METHOD,- variables={"id": to_global_id_or_none(order_with_lines)},- )- content = get_graphql_content(response)- order_data = content["data"]["order"]-- # then- assert len(order_data["availableShippingMethods"]) == expected_countdiff --git a/saleor/graphql/order/tests/queries/test_order_shipping_method.py b/saleor/graphql/order/tests/queries/test_order_shipping_method.pyindex 813b222526..c0ea801ade 100644--- a/saleor/graphql/order/tests/queries/test_order_shipping_method.py+++ b/saleor/graphql/order/tests/queries/test_order_shipping_method.py@@ -8,7 +8,7 @@ ORDERS_QUERY_SHIPPING_METHODS = """orders(first: 1) {edges {node {- availableShippingMethods {+ shippingMethods {nameprice {amount@@ -21,7 +21,7 @@ ORDERS_QUERY_SHIPPING_METHODS = """"""-def test_order_query_without_available_shipping_methods(+def test_order_query_without_shipping_methods(staff_api_client,permission_group_manage_orders,order,@@ -36,11 +36,11 @@ def test_order_query_without_available_shipping_methods(response = staff_api_client.post_graphql(ORDERS_QUERY_SHIPPING_METHODS)content = get_graphql_content(response)order_data = content["data"]["orders"]["edges"][0]["node"]- assert len(order_data["availableShippingMethods"]) == 0+ assert len(order_data["shippingMethods"]) == 0@pytest.mark.parametrize("minimum_order_weight_value", [0, 2, None])-def test_order_available_shipping_methods_with_weight_based_shipping_method(+def test_order_shipping_methods_with_weight_based_shipping_method(staff_api_client,order_line,shipping_method_weight_based,@@ -64,13 +64,11 @@ def test_order_available_shipping_methods_with_weight_based_shipping_method(content = get_graphql_content(response)order_data = content["data"]["orders"]["edges"][0]["node"]- shipping_methods = [- method["name"] for method in order_data["availableShippingMethods"]- ]+ shipping_methods = [method["name"] for method in order_data["shippingMethods"]]assert shipping_method.name in shipping_methods-def test_order_available_shipping_methods_weight_method_with_higher_minimal_weigh(+def test_order_shipping_methods_weight_method_with_higher_minimal_weight(staff_api_client,order_line,shipping_method_weight_based,@@ -91,13 +89,11 @@ def test_order_available_shipping_methods_weight_method_with_higher_minimal_weigcontent = get_graphql_content(response)order_data = content["data"]["orders"]["edges"][0]["node"]- shipping_methods = [- method["name"] for method in order_data["availableShippingMethods"]- ]+ shipping_methods = [method["name"] for method in order_data["shippingMethods"]]assert shipping_method.name not in shipping_methods-def test_order_query_shipping_zones_with_available_shipping_methods(+def test_order_query_shipping_zones_with_shipping_methods(staff_api_client,permission_group_manage_orders,fulfilled_order,@@ -107,7 +103,7 @@ def test_order_query_shipping_zones_with_available_shipping_methods(response = staff_api_client.post_graphql(ORDERS_QUERY_SHIPPING_METHODS)content = get_graphql_content(response)order_data = content["data"]["orders"]["edges"][0]["node"]- assert len(order_data["availableShippingMethods"]) == 1+ assert len(order_data["shippingMethods"]) == 1def test_order_query_shipping_zones_without_channel(@@ -123,7 +119,7 @@ def test_order_query_shipping_zones_without_channel(content = get_graphql_content(response)order_data = content["data"]["orders"]["edges"][0]["node"]- assert len(order_data["availableShippingMethods"]) == 0+ assert len(order_data["shippingMethods"]) == 0def test_order_query_shipping_methods_excluded_postal_codes(@@ -141,10 +137,10 @@ def test_order_query_shipping_methods_excluded_postal_codes(response = staff_api_client.post_graphql(ORDERS_QUERY_SHIPPING_METHODS)content = get_graphql_content(response)order_data = content["data"]["orders"]["edges"][0]["node"]- assert order_data["availableShippingMethods"] == []+ assert order_data["shippingMethods"] == []-def test_order_available_shipping_methods_query(+def test_order_shipping_methods_query(staff_api_client,permission_group_manage_orders,fulfilled_order,@@ -159,6 +155,6 @@ def test_order_available_shipping_methods_query(response = staff_api_client.post_graphql(ORDERS_QUERY_SHIPPING_METHODS)content = get_graphql_content(response)order_data = content["data"]["orders"]["edges"][0]["node"]- method = order_data["availableShippingMethods"][0]+ method = order_data["shippingMethods"][0]assert shipping_price.amount == method["price"]["amount"]diff --git a/saleor/graphql/order/types.py b/saleor/graphql/order/types.pyindex afdbc83f68..9a71a8efd3 100644--- a/saleor/graphql/order/types.py+++ b/saleor/graphql/order/types.py@@ -1658,12 +1658,6 @@ class Order(SyncWebhookControlContextModelObjectType[ModelObjectType[models.Orde),required=True,)- available_shipping_methods = NonNullList(- ShippingMethod,- description="Shipping methods that can be used with this order.",- required=False,- deprecation_reason="Use `shippingMethods`, this field will be removed in 4.0",- )shipping_methods = NonNullList(ShippingMethod,description="Shipping methods related to this order.",@@ -2757,16 +2751,6 @@ class Order(SyncWebhookControlContextModelObjectType[ModelObjectType[models.Orde(root.node.id, root.allow_sync_webhooks))- @classmethod- @traced_resolver- @prevent_sync_event_circular_query- def resolve_available_shipping_methods(- cls, root: SyncWebhookControlContext[models.Order], info- ):- return cls.resolve_shipping_methods(root, info).then(- lambda methods: [method for method in methods if method.active]- )-@classmethod@traced_resolverdef resolve_available_collection_points(diff --git a/saleor/graphql/product/tests/queries/test_product_query.py b/saleor/graphql/product/tests/queries/test_product_query.pyindex 25b697051d..af56a84e0c 100644--- a/saleor/graphql/product/tests/queries/test_product_query.py+++ b/saleor/graphql/product/tests/queries/test_product_query.py@@ -2512,138 +2512,6 @@ def test_query_product_media_for_federation(]-QUERY_PRODUCT_WITH_VARIANT = """- query Product($id: ID!, $channel: String, $variant_id: ID, $sku: String){- product(id: $id, channel: $channel){- variant(id: $variant_id, sku: $sku){- id- sku- }- }- }- """--- ("variant_id", "sku", "result"),- [(False, "123", "123"), (True, None, "123")],-)-def test_product_variant_field_filtering(- staff_api_client,- product,- variant_id,- sku,- result,- channel_USD,-):- # given- variant = product.variants.first()- variables = {- "id": graphene.Node.to_global_id("Product", product.pk),- "variant_id": (- graphene.Node.to_global_id("ProductVariant", variant.pk)- if variant_id- else None- ),- "sku": sku,- "channel": channel_USD.slug,- }-- # when- response = staff_api_client.post_graphql(- QUERY_PRODUCT_WITH_VARIANT,- variables,- )-- # then- content = get_graphql_content(response)- assert content["data"]["product"]["variant"]["sku"] == result---def test_product_variant_field_filtering_null_response(- staff_api_client,- product,- channel_USD,-):- # given- sku = "not_existing"- variant_id = None-- variables = {- "id": graphene.Node.to_global_id("Product", product.pk),- "variant_id": variant_id,- "sku": sku,- "channel": channel_USD.slug,- }-- # when- response = staff_api_client.post_graphql(- QUERY_PRODUCT_WITH_VARIANT,- variables,- )-- # then- content = get_graphql_content(response)- assert content["data"]["product"]["variant"] is None---def test_product_variant_field_filtering_argument_required_error(- staff_api_client,- product,- channel_USD,-):- # given- sku = None- variant_id = None-- variables = {- "id": graphene.Node.to_global_id("Product", product.pk),- "variant_id": variant_id,- "sku": sku,- "channel": channel_USD.slug,- }-- # when- response = staff_api_client.post_graphql(- QUERY_PRODUCT_WITH_VARIANT,- variables,- )-- # then- content = get_graphql_content(response, ignore_errors=True)- error_message = "At least one of arguments is required"- assert error_message in content["errors"][0]["message"]---def test_product_variant_field_filtering_argument_cannot_be_combined_error(- staff_api_client,- product,- channel_USD,-):- # given- sku = "123"- variant = product.variants.first()- variant_id = graphene.Node.to_global_id("ProductVariant", variant.pk)-- variables = {- "id": graphene.Node.to_global_id("Product", product.pk),- "variant_id": variant_id,- "sku": sku,- "channel": channel_USD.slug,- }-- # when- response = staff_api_client.post_graphql(- QUERY_PRODUCT_WITH_VARIANT,- variables,- )-- # then- content = get_graphql_content(response, ignore_errors=True)- error_message = "Argument 'id' cannot be combined"- assert error_message in content["errors"][0]["message"]--QUERY_PRODUCT_WITH_SORTED_MEDIA = """query Product($id: ID!, $channel: String, $sort_by: MediaSortingInput){product(id: $id, channel: $channel){diff --git a/saleor/graphql/product/types/products.py b/saleor/graphql/product/types/products.pyindex b27d406f1e..227be765d7 100644--- a/saleor/graphql/product/types/products.py+++ b/saleor/graphql/product/types/products.py@@ -94,9 +94,6 @@ from ...core.types import ()from ...core.types.context import ChannelContextTypefrom ...core.utils import from_global_id_or_error-from ...core.validators import (- validate_one_of_args_is_in_query,-)from ...meta.types import ObjectWithMetadatafrom ...order.dataloaders import (OrderByIdLoader,@@ -1033,13 +1030,6 @@ class Product(ChannelContextType[models.Product]):description="Get a single product image by ID.",deprecation_reason="Use the `mediaById` field instead.",)- variant = graphene.Field(- ProductVariant,- id=graphene.Argument(graphene.ID, description="ID of the variant."),- sku=graphene.Argument(graphene.String, description="SKU of the variant."),- description="Get a single variant by SKU or ID.",- deprecation_reason="Use top-level `variant` query.",- )variants = NonNullList(ProductVariant,description=(@@ -1479,40 +1469,6 @@ class Product(ChannelContextType[models.Product]):def resolve_images(root: ChannelContext[models.Product], info):return ImagesByProductIdLoader(info.context).load(root.node.id)- @staticmethod- def resolve_variant(root: ChannelContext[models.Product], info, id=None, sku=None):- validate_one_of_args_is_in_query("id", id, "sku", sku)-- def get_product_variant(- product_variants,- ) -> ProductVariant | None:- if id:- id_type, variant_id = graphene.Node.from_global_id(id)- if id_type != "ProductVariant":- return None-- return next(- (- variant- for variant in product_variants- if variant.node.id == int(variant_id)- ),- None,- )- if sku:- return next(- (- variant- for variant in product_variants- if variant.node.sku == sku- ),- None,- )- return None-- variants = Product.resolve_variants(root, info)- return variants.then(get_product_variant)-@staticmethoddef resolve_variants(root: ChannelContext[models.Product], info):requestor = get_user_or_app_from_context(info.context)diff --git a/saleor/graphql/query_cost_map.py b/saleor/graphql/query_cost_map.pyindex cdd9d86a29..d860616021 100644--- a/saleor/graphql/query_cost_map.py+++ b/saleor/graphql/query_cost_map.py@@ -294,7 +294,6 @@ COST_MAP = {},"Order": {"availableCollectionPoints": {"complexity": 1},- "availableShippingMethods": {"complexity": 1},"billingAddress": {"complexity": 1},"channel": {"complexity": 1},"deliveryMethod": {"complexity": 1},diff --git a/saleor/graphql/schema.graphql b/saleor/graphql/schema.graphqlindex 7f0e7a39a5..866e32e845 100644--- a/saleor/graphql/schema.graphql+++ b/saleor/graphql/schema.graphql@@ -3608,9 +3608,6 @@ type Checkout implements Node & ObjectWithMetadata @doc(category: "Checkout") {"""The customer note for the checkout."""customerNote: String!- """The note for the checkout."""- note: String! @deprecated(reason: "Use `customerNote` instead.")-"""The total discount applied to the checkout. Note: Only discount created via voucher are included in this field."""@@ -6894,15 +6891,6 @@ type Product implements Node & ObjectWithMetadata & ObjectWithAttributes @doc(caid: ID!): ProductImage @deprecated(reason: "Use the `mediaById` field instead.")- """Get a single variant by SKU or ID."""- variant(- """ID of the variant."""- id: ID-- """SKU of the variant."""- sku: String- ): ProductVariant @deprecated(reason: "Use top-level `variant` query.")-"""List of variants for the product. Requires the following permissions to include the unpublished items: MANAGE_ORDERS, MANAGE_DISCOUNTS, MANAGE_PRODUCTS."""@@ -11763,9 +11751,6 @@ type Order implements Node & ObjectWithMetadata @doc(category: "Orders") {"""actions: [OrderAction!]!- """Shipping methods that can be used with this order."""- availableShippingMethods: [ShippingMethod!] @deprecated(reason: "Use `shippingMethods`, this field will be removed in 4.0")-"""Shipping methods related to this order."""shippingMethods: [ShippingMethod!]!diff --git a/saleor/graphql/shop/tests/benchmark/test_homepage.py b/saleor/graphql/shop/tests/benchmark/test_homepage.pyindex ae19b9e697..a695310795 100644--- a/saleor/graphql/shop/tests/benchmark/test_homepage.py+++ b/saleor/graphql/shop/tests/benchmark/test_homepage.py@@ -17,7 +17,7 @@ def test_retrieve_shop(api_client, channel_USD, count_queries):country}availableShippingMethods(channel: $channel) {- ...AvailableShippingMethods+ ...ShippingMethods}countries {countrydiff --git a/saleor/order/tests/webhooks/subscriptions/test_exclude_shipping.py b/saleor/order/tests/webhooks/subscriptions/test_exclude_shipping.pyindex 61c79e6e0b..02344ee5df 100644--- a/saleor/order/tests/webhooks/subscriptions/test_exclude_shipping.py+++ b/saleor/order/tests/webhooks/subscriptions/test_exclude_shipping.py@@ -26,21 +26,6 @@ subscription{}"""-ORDER_FILTER_SHIPPING_METHODS_AVAILABLE_SHIPPING_METHODS = """-subscription{- event{- ...on OrderFilterShippingMethods{- order{- id- availableShippingMethods{- id- }- }- }- }-}-"""-ORDER_FILTER_SHIPPING_METHODS_CIRCULAR_SHIPPING_METHODS = """subscription{event{@@ -75,16 +60,6 @@ def subscription_with_shipping_methods()-def subscription_with_available_ship_methods(- subscription_webhook,-):- return subscription_webhook(- ORDER_FILTER_SHIPPING_METHODS_AVAILABLE_SHIPPING_METHODS,- WebhookEventSyncType.ORDER_FILTER_SHIPPING_METHODS,- )--def test_order_filter_shipping_methods(order_line_with_one_allocation,subscription_with_filter_shipping_methods_webhook,@@ -153,31 +128,6 @@ def test_order_filter_shipping_methods_no_methods_in_channel(assert delivery.webhook == subscription_with_filter_shipping_methods_webhook-def test_order_filter_shipping_methods_with_circular_call_for_available_methods(- order_line_with_one_allocation,- subscription_with_available_ship_methods,-):- # given- event_type = WebhookEventSyncType.ORDER_FILTER_SHIPPING_METHODS- order = order_line_with_one_allocation.order-- # when- delivery = create_delivery_for_subscription_sync_event(- event_type,- (order, []),- subscription_with_available_ship_methods,- )-- # then- payload = json.loads(delivery.payload.get_payload())-- assert len(payload["errors"]) == 1- assert (- payload["errors"][0]["message"]- == "Resolving this field is not allowed in synchronous events."- )--def test_order_filter_shipping_methods_with_circular_call_for_shipping_methods(order_line_with_one_allocation,subscription_with_shipping_methods,diff --git a/saleor/order/tests/webhooks/test_exclude_shipping.py b/saleor/order/tests/webhooks/test_exclude_shipping.pyindex f198b967bf..f9582f399b 100644--- a/saleor/order/tests/webhooks/test_exclude_shipping.py+++ b/saleor/order/tests/webhooks/test_exclude_shipping.py@@ -30,12 +30,6 @@ query OrderQuery($id: ID) {activemessage}- availableShippingMethods {- id- name- active- message- }}}"""diff --git a/saleor/tests/e2e/orders/test_cannot_fullfill_order_with_invalid_shipping_method.py b/saleor/tests/e2e/orders/test_cannot_fullfill_order_with_invalid_shipping_method.pyindex 31f084bd9b..9522ea94b9 100644--- a/saleor/tests/e2e/orders/test_cannot_fullfill_order_with_invalid_shipping_method.py+++ b/saleor/tests/e2e/orders/test_cannot_fullfill_order_with_invalid_shipping_method.py@@ -144,6 +144,7 @@ def test_cannot_fullfill_order_with_invalid_shipping_method_core_0203(order_id,)- assert (- order_details["availableShippingMethods"][0]["id"] == second_shipping_method_id- )+ active_shipping_methods = [+ method for method in order_details["shippingMethods"] if method["active"]+ ]+ assert active_shipping_methods[0]["id"] == second_shipping_method_iddiff --git a/saleor/tests/e2e/orders/utils/order_by_checkout_id_query.py b/saleor/tests/e2e/orders/utils/order_by_checkout_id_query.pyindex 1a07c92464..83e0451f47 100644--- a/saleor/tests/e2e/orders/utils/order_by_checkout_id_query.py+++ b/saleor/tests/e2e/orders/utils/order_by_checkout_id_query.py@@ -8,10 +8,6 @@ query OrderByCheckoutIdDetails($checkout_id: ID!) {node {chargeStatusauthorizeStatus- availableShippingMethods {- id- active- }paymentStatusisPaidpayments {diff --git a/saleor/tests/e2e/orders/utils/order_query.py b/saleor/tests/e2e/orders/utils/order_query.pyindex e7ed2cf2af..1a2dd32639 100644--- a/saleor/tests/e2e/orders/utils/order_query.py+++ b/saleor/tests/e2e/orders/utils/order_query.py@@ -6,10 +6,6 @@ ORDER_QUERY = ("""query OrderDetails($id: ID!) {order(id: $id) {- availableShippingMethods {- id- active- }paymentStatusauthorizeStatuschargeStatus@@ -42,6 +38,7 @@ query OrderDetails($id: ID!) {}shippingMethods {id+ active}shippingAddress {...Address