Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Drop deprecated queries and mutations (#7199)
Iga Karbowiak856c6e390a08
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex a900436dcc..027662fffa 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -118,6 +118,21 @@ All notable, unreleased changes to this project will be documented in this file.- `ShippingPriceInput` was extended with `description` field- Extended `shippingPriceUpdate`, `shippingPriceCreate` mutation to add/edit description- Input field in `shippingPriceTranslate` changed to `ShippingPriceTranslationInput`+- Drop deprecated queries and mutations - #7199 by @IKarbowiak+ - drop `url` field from `Category` type+ - drop `url` field from `Category` type+ - drop `url` field from `Product` type+ - drop `localized` fild from `Money` type+ - drop `permissions` field from `User` type+ - drop `navigation` field from `Shop` type+ - drop `isActive` from `AppInput`+ - drop `value` from `AttributeInput`+ - drop `customerId` from `checkoutCustomerAttach`+ - drop `stockAvailability` argument from `products` query+ - drop `created` and `status` arguments from `orders` query+ - drop `created` argument from `draftOrders` query+ - drop `productType` from `ProductFilter`+ - deprecate mutations' `<name>Errors`, typed `errors` fields and remove deprecation### Otherdiff --git a/saleor/graphql/account/tests/benchmark/test_account.py b/saleor/graphql/account/tests/benchmark/test_account.pyindex 0175ad5f6b..9c1fa139ff 100644--- a/saleor/graphql/account/tests/benchmark/test_account.py+++ b/saleor/graphql/account/tests/benchmark/test_account.py@@ -34,7 +34,6 @@ def test_query_staff_user(staff_user.avatar = avatar_mockstaff_user.save()- # update query in #5389 (deprecated 'permissions' field)query = """query User($id: ID!) {user(id: $id) {@@ -90,10 +89,6 @@ def test_query_staff_user(avatar {url}- permissions {- code- name- }userPermissions {codename@@ -135,7 +130,7 @@ def test_staff_create() {staffCreate(input: {email: $email, redirectUrl: $redirect_url,addGroups: $add_groups }) {- staffErrors {+ errors {fieldcodepermissions@@ -149,9 +144,6 @@ def test_staff_create(userPermissions {code}- permissions {- code- }permissionGroups {namepermissions {@@ -183,7 +175,7 @@ def test_staff_create(assert User.objects.filter(is_staff=True).count() == staff_count + 1assert data["user"]- assert not data["staffErrors"]+ assert not data["errors"]@pytest.mark.django_db@@ -204,7 +196,7 @@ def test_staff_update_groups_and_permissions(staffUpdate(id: $id,input: $input) {- staffErrors {+ errors {fieldcodemessage@@ -215,9 +207,6 @@ def test_staff_update_groups_and_permissions(userPermissions {code}- permissions {- code- }permissionGroups {name}@@ -263,7 +252,7 @@ def test_staff_update_groups_and_permissions()content = get_graphql_content(response)data = content["data"]["staffUpdate"]- assert data["staffErrors"] == []+ assert data["errors"] == []assert len(data["user"]["userPermissions"]) == 3assert {perm["code"].lower() for perm in data["user"]["userPermissions"]} == {permission_manage_orders.codename,@@ -275,13 +264,6 @@ def test_staff_update_groups_and_permissions(group2.name,group3.name,}- # deprecated, to remove in #5389- assert len(data["user"]["permissions"]) == 3- assert {perm["code"].lower() for perm in data["user"]["permissions"]} == {- permission_manage_orders.codename,- permission_manage_products.codename,- permission_manage_staff.codename,- }@pytest.mark.django_db@@ -299,7 +281,7 @@ def test_delete_staff_members(mutation staffBulkDelete($ids: [ID]!) {staffBulkDelete(ids: $ids) {count- staffErrors{+ errors{codefieldpermissions@@ -339,7 +321,7 @@ def test_delete_staff_members(response = staff_api_client.post_graphql(query, variables)content = get_graphql_content(response)data = content["data"]["staffBulkDelete"]- errors = data["staffErrors"]+ errors = data["errors"]assert not errorsassert data["count"] == 2diff --git a/saleor/graphql/account/tests/benchmark/test_permission_group.py b/saleor/graphql/account/tests/benchmark/test_permission_group.pyindex c48e10eb39..2e2768e2ce 100644--- a/saleor/graphql/account/tests/benchmark/test_permission_group.py+++ b/saleor/graphql/account/tests/benchmark/test_permission_group.py@@ -34,7 +34,7 @@ def test_permission_group_create(}}- permissionGroupErrors{+ errors{fieldcodepermissions@@ -61,7 +61,7 @@ def test_permission_group_create(data = content["data"]["permissionGroupCreate"]groups = Group.objects.all()- assert data["permissionGroupErrors"] == []+ assert data["errors"] == []assert len(groups) == group_count + 1@@ -91,7 +91,7 @@ def test_permission_group_update(code}}- permissionGroupErrors{+ errors{fieldcodepermissions@@ -134,7 +134,7 @@ def test_permission_group_update(data = content["data"]["permissionGroupUpdate"]groups = Group.objects.all()- assert data["permissionGroupErrors"] == []+ assert data["errors"] == []assert len(groups) == group_count@@ -167,7 +167,7 @@ def test_permission_group_update_remove_users_with_manage_staff(}}- permissionGroupErrors{+ errors{fieldcodepermissions@@ -236,7 +236,7 @@ def test_permission_group_delete(code}}- permissionGroupErrors{+ errors{fieldcodeusersdiff --git a/saleor/graphql/account/tests/mutations/test_external_authentication.py b/saleor/graphql/account/tests/mutations/test_external_authentication.pyindex 8a1b4fa5e7..46536e96b8 100644--- a/saleor/graphql/account/tests/mutations/test_external_authentication.py+++ b/saleor/graphql/account/tests/mutations/test_external_authentication.py@@ -7,7 +7,7 @@ MUTATION_EXTERNAL_AUTHENTICATION = """mutation externalAuthenticationUrl($pluginId: String!, $input: JSONString!){externalAuthenticationUrl(pluginId: $pluginId, input: $input){authenticationData- accountErrors{+ errors{fieldmessage}diff --git a/saleor/graphql/account/tests/mutations/test_external_logout.py b/saleor/graphql/account/tests/mutations/test_external_logout.pyindex 465a7845b8..ee3d0e73e3 100644--- a/saleor/graphql/account/tests/mutations/test_external_logout.py+++ b/saleor/graphql/account/tests/mutations/test_external_logout.py@@ -7,7 +7,7 @@ MUTATION_EXTERNAL_LOGOUT = """mutation externalLogout($pluginId: String!, $input: JSONString!){externalLogout(pluginId: $pluginId, input: $input){logoutData- accountErrors{+ errors{fieldmessage}diff --git a/saleor/graphql/account/tests/mutations/test_external_obtain_access_tokens.py b/saleor/graphql/account/tests/mutations/test_external_obtain_access_tokens.pyindex f6b16f8b40..2a02c6558a 100644--- a/saleor/graphql/account/tests/mutations/test_external_obtain_access_tokens.py+++ b/saleor/graphql/account/tests/mutations/test_external_obtain_access_tokens.py@@ -13,7 +13,7 @@ MUTATION_EXTERNAL_REFRESH = """user{}- accountErrors{+ errors{fieldmessage}diff --git a/saleor/graphql/account/tests/mutations/test_external_refresh.py b/saleor/graphql/account/tests/mutations/test_external_refresh.pyindex 1748e141eb..9a809f6844 100644--- a/saleor/graphql/account/tests/mutations/test_external_refresh.py+++ b/saleor/graphql/account/tests/mutations/test_external_refresh.py@@ -13,7 +13,7 @@ MUTATION_EXTERNAL_REFRESH = """user{}- accountErrors{+ errors{fieldmessage}diff --git a/saleor/graphql/account/tests/mutations/test_external_verify.py b/saleor/graphql/account/tests/mutations/test_external_verify.pyindex ae3b520917..f8664ac20e 100644--- a/saleor/graphql/account/tests/mutations/test_external_verify.py+++ b/saleor/graphql/account/tests/mutations/test_external_verify.py@@ -11,7 +11,7 @@ MUTATION_EXTERNAL_VERIFY = """}isValid- accountErrors{+ errors{fieldmessage}diff --git a/saleor/graphql/account/tests/mutations/test_token_create.py b/saleor/graphql/account/tests/mutations/test_token_create.pyindex 1fb633d97d..d884a8cdf2 100644--- a/saleor/graphql/account/tests/mutations/test_token_create.py+++ b/saleor/graphql/account/tests/mutations/test_token_create.py@@ -26,7 +26,7 @@ MUTATION_CREATE_TOKEN = """fieldmessage}- accountErrors {+ errors {fieldmessagecode@@ -46,7 +46,7 @@ def test_create_token(api_client, customer_user, settings):user_email = data["user"]["email"]assert customer_user.email == user_email- assert content["data"]["tokenCreate"]["accountErrors"] == []+ assert content["data"]["tokenCreate"]["errors"] == []token = data["token"]refreshToken = data["refreshToken"]@@ -96,7 +96,7 @@ def test_create_token_invalid_password(api_client, customer_user):expected_error_code = AccountErrorCode.INVALID_CREDENTIALS.value.upper()response = api_client.post_graphql(MUTATION_CREATE_TOKEN, variables)content = get_graphql_content(response)- response_error = content["data"]["tokenCreate"]["accountErrors"][0]+ response_error = content["data"]["tokenCreate"]["errors"][0]assert response_error["code"] == expected_error_codeassert response_error["field"] == "email"@@ -106,6 +106,6 @@ def test_create_token_invalid_email(api_client, customer_user):expected_error_code = AccountErrorCode.INVALID_CREDENTIALS.value.upper()response = api_client.post_graphql(MUTATION_CREATE_TOKEN, variables)content = get_graphql_content(response)- response_error = content["data"]["tokenCreate"]["accountErrors"][0]+ response_error = content["data"]["tokenCreate"]["errors"][0]assert response_error["code"] == expected_error_codeassert response_error["field"] == "email"diff --git a/saleor/graphql/account/tests/mutations/test_token_refresh.py b/saleor/graphql/account/tests/mutations/test_token_refresh.pyindex 03a84b3755..9cdd4b0f61 100644--- a/saleor/graphql/account/tests/mutations/test_token_refresh.py+++ b/saleor/graphql/account/tests/mutations/test_token_refresh.py@@ -18,7 +18,7 @@ MUTATION_TOKEN_REFRESH = """mutation tokenRefresh($token: String, $csrf_token: String){tokenRefresh(refreshToken: $token, csrfToken: $csrf_token){token- accountErrors{+ errors{code}}@@ -37,7 +37,7 @@ def test_refresh_token_get_token_from_cookie(api_client, customer_user, settingscontent = get_graphql_content(response)data = content["data"]["tokenRefresh"]- errors = data["accountErrors"]+ errors = data["errors"]assert not errorstoken = data.get("token")@@ -62,7 +62,7 @@ def test_refresh_token_get_token_from_input(api_client, customer_user, settings)content = get_graphql_content(response)data = content["data"]["tokenRefresh"]- errors = data["accountErrors"]+ errors = data["errors"]assert not errorstoken = data.get("token")@@ -83,7 +83,7 @@ def test_refresh_token_get_token_missing_token(api_client, customer_user):content = get_graphql_content(response)data = content["data"]["tokenRefresh"]- errors = data["accountErrors"]+ errors = data["errors"]token = data.get("token")assert not token@@ -101,7 +101,7 @@ def test_access_token_used_as_a_refresh_token(api_client, customer_user):content = get_graphql_content(response)data = content["data"]["tokenRefresh"]- errors = data["accountErrors"]+ errors = data["errors"]token = data.get("token")assert not token@@ -119,7 +119,7 @@ def test_access_app_token_used_as_a_refresh_token(api_client, app, customer_usercontent = get_graphql_content(response)data = content["data"]["tokenRefresh"]- errors = data["accountErrors"]+ errors = data["errors"]token = data.get("token")assert not token@@ -138,7 +138,7 @@ def test_refresh_token_get_token_incorrect_csrf_token(api_client, customer_user)content = get_graphql_content(response)data = content["data"]["tokenRefresh"]- errors = data["accountErrors"]+ errors = data["errors"]token = data.get("token")assert not token@@ -161,7 +161,7 @@ def test_refresh_token_when_expired(api_client, customer_user):content = get_graphql_content(response)data = content["data"]["tokenRefresh"]- errors = data["accountErrors"]+ errors = data["errors"]token = data.get("token")assert not token@@ -183,7 +183,7 @@ def test_refresh_token_when_incorrect_token(api_client, customer_user):content = get_graphql_content(response)data = content["data"]["tokenRefresh"]- errors = data["accountErrors"]+ errors = data["errors"]token = data.get("token")assert not token@@ -205,7 +205,7 @@ def test_refresh_token_when_user_deactivated_token(api_client, customer_user):content = get_graphql_content(response)data = content["data"]["tokenRefresh"]- errors = data["accountErrors"]+ errors = data["errors"]assert not data["token"]assert len(errors) == 1diff --git a/saleor/graphql/account/tests/mutations/test_token_verify.py b/saleor/graphql/account/tests/mutations/test_token_verify.pyindex bf9a639ba9..99e23845d1 100644--- a/saleor/graphql/account/tests/mutations/test_token_verify.py+++ b/saleor/graphql/account/tests/mutations/test_token_verify.py@@ -16,7 +16,7 @@ MUTATION_TOKEN_VERIFY = """code}}- accountErrors{+ errors{code}}@@ -68,7 +68,7 @@ def test_verify_token_incorrect_token(api_client):response = api_client.post_graphql(MUTATION_TOKEN_VERIFY, variables)content = get_graphql_content(response)data = content["data"]["tokenVerify"]- errors = data["accountErrors"]+ errors = data["errors"]assert len(errors) == 1assert errors[0]["code"] == AccountErrorCode.JWT_DECODE_ERROR.nameassert data["isValid"] is False@@ -82,7 +82,7 @@ def test_verify_token_invalidated_by_user(api_client, customer_user):response = api_client.post_graphql(MUTATION_TOKEN_VERIFY, variables)content = get_graphql_content(response)data = content["data"]["tokenVerify"]- errors = data["accountErrors"]+ errors = data["errors"]assert data["isValid"] is Falseassert len(errors) == 1diff --git a/saleor/graphql/account/tests/mutations/test_tokens_deactivate_all.py b/saleor/graphql/account/tests/mutations/test_tokens_deactivate_all.pyindex e18522c36b..4606c37b3a 100644--- a/saleor/graphql/account/tests/mutations/test_tokens_deactivate_all.py+++ b/saleor/graphql/account/tests/mutations/test_tokens_deactivate_all.py@@ -11,7 +11,7 @@ from .test_token_refresh import MUTATION_TOKEN_REFRESHMUTATION_DEACTIVATE_ALL_USER_TOKENS = """mutation{tokensDeactivateAll{- accountErrors{+ errors{fieldmessagecode@@ -48,7 +48,7 @@ def test_deactivate_all_user_tokens_access_token(user_api_client, customer_user)user_api_client.token = tokenresponse = user_api_client.post_graphql(MUTATION_DEACTIVATE_ALL_USER_TOKENS)content = get_graphql_content(response)- errors = content["data"]["tokensDeactivateAll"]["accountErrors"]+ errors = content["data"]["tokensDeactivateAll"]["errors"]assert not errorsquery = "{me { id }}"@@ -72,7 +72,7 @@ def test_deactivate_all_user_token_refresh_token(response = user_api_client.post_graphql(MUTATION_DEACTIVATE_ALL_USER_TOKENS)content = get_graphql_content(response)- errors = content["data"]["tokensDeactivateAll"]["accountErrors"]+ errors = content["data"]["tokensDeactivateAll"]["errors"]assert not errorsvariables = {"token": refresh_token, "csrf_token": csrf_token}@@ -80,7 +80,7 @@ def test_deactivate_all_user_token_refresh_token(content = get_graphql_content(response)data = content["data"]["tokenRefresh"]- errors = data["accountErrors"]+ errors = data["errors"]assert data["token"] is Noneassert len(errors) == 1diff --git a/saleor/graphql/account/tests/test_account.py b/saleor/graphql/account/tests/test_account.pyindex c154c6e544..3fd06fda84 100644--- a/saleor/graphql/account/tests/test_account.py+++ b/saleor/graphql/account/tests/test_account.py@@ -2,7 +2,7 @@ import reimport uuidfrom collections import defaultdictfrom datetime import timedelta-from unittest.mock import MagicMock, Mock, patch+from unittest.mock import ANY, MagicMock, Mock, patchfrom urllib.parse import urlencodeimport graphene@@ -137,9 +137,6 @@ FULL_USER_QUERY = """avatar {url}- permissions {- code- }userPermissions {codesourcePermissionGroups(userId: $id) {@@ -419,12 +416,6 @@ def test_query_staff_user(expected_data = {"code": perm.codename, "groups": source_groups}assert expected_data in formated_user_permissions_result- # deprecated, to remove in #5389- assert len(data["permissions"]) == 4- assert {perm["code"].lower() for perm in data["permissions"]} == set(- all_permissions.values_list("codename", flat=True)- )-def test_query_staff_user_with_order_and_without_manage_orders_perm(staff_api_client,@@ -969,7 +960,7 @@ ACCOUNT_REGISTER_MUTATION = """metadata: $metadata}) {- accountErrors {+ errors {fieldmessagecode@@ -1018,7 +1009,7 @@ def test_customer_register(mocked_notify, mocked_generator, api_client):}assert new_user.metadata == {"meta": "data"}assert new_user.language_code == "pl"- assert not data["accountErrors"]+ assert not data["errors"]mocked_notify.assert_called_once_with(NotifyEventType.ACCOUNT_CONFIRMATION, payload=expected_payload)@@ -1026,9 +1017,9 @@ def test_customer_register(mocked_notify, mocked_generator, api_client):response = api_client.post_graphql(query, variables)content = get_graphql_content(response)data = content["data"][mutation_name]- assert data["accountErrors"]- assert data["accountErrors"][0]["field"] == "email"- assert data["accountErrors"][0]["code"] == AccountErrorCode.UNIQUE.name+ assert data["errors"]+ assert data["errors"][0]["field"] == "email"+ assert data["errors"][0]["code"] == AccountErrorCode.UNIQUE.namecustomer_creation_event = account_events.CustomerEvent.objects.get()assert customer_creation_event.type == account_events.CustomerEvents.ACCOUNT_CREATED@@ -1041,7 +1032,7 @@ def test_customer_register_disabled_email_confirmation(mocked_notify, api_clientemail = "[email protected]"variables = {"email": email, "password": "Password"}response = api_client.post_graphql(ACCOUNT_REGISTER_MUTATION, variables)- errors = response.json()["data"]["accountRegister"]["accountErrors"]+ errors = response.json()["data"]["accountRegister"]["errors"]assert errors == []created_user = User.objects.get()@@ -1056,7 +1047,7 @@ def test_customer_register_disabled_email_confirmation(mocked_notify, api_clientdef test_customer_register_no_redirect_url(mocked_notify, api_client):variables = {"email": "[email protected]", "password": "Password"}response = api_client.post_graphql(ACCOUNT_REGISTER_MUTATION, variables)- errors = response.json()["data"]["accountRegister"]["accountErrors"]+ errors = response.json()["data"]["accountRegister"]["errors"]assert "redirectUrl" in map(lambda error: error["field"], errors)mocked_notify.assert_not_called()@@ -1077,12 +1068,9 @@ CUSTOMER_CREATE_MUTATION = """languageCode: $languageCode}) {errors {- field- message- }- accountErrors {fieldcode+ message}user {id@@ -1232,9 +1220,10 @@ def test_customer_create_with_invalid_url(staff_api_client, permission_manage_us)content = get_graphql_content(response)data = content["data"]["customerCreate"]- assert data["accountErrors"][0] == {+ assert data["errors"][0] == {"field": "redirectUrl","code": AccountErrorCode.INVALID.name,+ "message": ANY,}staff_user = User.objects.filter(email=email)assert not staff_user@@ -1250,9 +1239,10 @@ def test_customer_create_with_not_allowed_url()content = get_graphql_content(response)data = content["data"]["customerCreate"]- assert data["accountErrors"][0] == {+ assert data["errors"][0] == {"field": "redirectUrl","code": AccountErrorCode.INVALID.name,+ "message": ANY,}staff_user = User.objects.filter(email=email)assert not staff_user@@ -1550,7 +1540,7 @@ ACCOUNT_REQUEST_DELETION_MUTATION = """fieldmessage}- accountErrors {+ errors {codefield}@@ -1636,9 +1626,10 @@ def test_account_request_deletion_storefront_hosts_not_allowed(content = get_graphql_content(response)data = content["data"]["accountRequestDeletion"]assert len(data["errors"]) == 1- assert data["accountErrors"][0] == {+ assert data["errors"][0] == {"field": "redirectUrl","code": AccountErrorCode.INVALID.name,+ "message": ANY,}mocked_notify.assert_not_called()@@ -1850,7 +1841,7 @@ STAFF_CREATE_MUTATION = """staffCreate(input: {email: $email, redirectUrl: $redirect_url,addGroups: $add_groups}) {- staffErrors {+ errors {fieldcodepermissions@@ -1864,9 +1855,6 @@ STAFF_CREATE_MUTATION = """userPermissions {code}- permissions {- code- }permissionGroups {namepermissions {@@ -1910,7 +1898,7 @@ def test_staff_create()content = get_graphql_content(response)data = content["data"]["staffCreate"]- assert data["staffErrors"] == []+ assert data["errors"] == []assert data["user"]["email"] == emailassert data["user"]["isStaff"]assert data["user"]["isActive"]@@ -1922,10 +1910,6 @@ def test_staff_create(permissions = data["user"]["userPermissions"]assert {perm["code"].lower() for perm in permissions} == expected_perms- # deprecated, to remove in #5389- permissions = data["user"]["permissions"]- assert {perm["code"].lower() for perm in permissions} == expected_perms-staff_user = User.objects.get(email=email)assert staff_user.is_staff@@ -2010,7 +1994,7 @@ def test_staff_create_out_of_scope_group()content = get_graphql_content(response)data = content["data"]["staffCreate"]- errors = data["staffErrors"]+ errors = data["errors"]assert not data["user"]assert len(errors) == 1@@ -2030,7 +2014,7 @@ def test_staff_create_out_of_scope_group(content = get_graphql_content(response)data = content["data"]["staffCreate"]- assert data["staffErrors"] == []+ assert data["errors"] == []assert data["user"]["email"] == emailassert data["user"]["isStaff"]assert data["user"]["isActive"]@@ -2041,10 +2025,6 @@ def test_staff_create_out_of_scope_group(permissions = data["user"]["userPermissions"]assert {perm["code"].lower() for perm in permissions} == expected_perms- # deprecated, to remove in #5389- permissions = data["user"]["permissions"]- assert {perm["code"].lower() for perm in permissions} == expected_perms-staff_user = User.objects.get(email=email)assert staff_user.is_staff@@ -2097,7 +2077,7 @@ def test_staff_create_send_password_with_url()content = get_graphql_content(response)data = content["data"]["staffCreate"]- assert not data["staffErrors"]+ assert not data["errors"]staff_user = User.objects.get(email=email)assert staff_user.is_staff@@ -2129,7 +2109,7 @@ def test_staff_create_without_send_password()content = get_graphql_content(response)data = content["data"]["staffCreate"]- assert not data["staffErrors"]+ assert not data["errors"]User.objects.get(email=email)@@ -2143,7 +2123,7 @@ def test_staff_create_with_invalid_url()content = get_graphql_content(response)data = content["data"]["staffCreate"]- assert data["staffErrors"][0] == {+ assert data["errors"][0] == {"field": "redirectUrl","code": AccountErrorCode.INVALID.name,"permissions": None,@@ -2163,7 +2143,7 @@ def test_staff_create_with_not_allowed_url()content = get_graphql_content(response)data = content["data"]["staffCreate"]- assert data["staffErrors"][0] == {+ assert data["errors"][0] == {"field": "redirectUrl","code": AccountErrorCode.INVALID.name,"permissions": None,@@ -2179,7 +2159,7 @@ STAFF_UPDATE_MUTATIONS = """staffUpdate(id: $id,input: $input) {- staffErrors {+ errors {fieldcodemessage@@ -2190,9 +2170,6 @@ STAFF_UPDATE_MUTATIONS = """userPermissions {code}- permissions {- code- }permissionGroups {name}@@ -2215,11 +2192,9 @@ def test_staff_update(staff_api_client, permission_manage_staff, media_root):)content = get_graphql_content(response)data = content["data"]["staffUpdate"]- assert data["staffErrors"] == []+ assert data["errors"] == []assert data["user"]["userPermissions"] == []assert not data["user"]["isActive"]- # deprecated, to remove in #5389- assert data["user"]["permissions"] == []def test_staff_update_app_no_permission(@@ -2276,7 +2251,7 @@ def test_staff_update_groups_and_permissions()content = get_graphql_content(response)data = content["data"]["staffUpdate"]- assert data["staffErrors"] == []+ assert data["errors"] == []assert {perm["code"].lower() for perm in data["user"]["userPermissions"]} == {permission_manage_orders.codename,}@@ -2284,10 +2259,6 @@ def test_staff_update_groups_and_permissions(group2.name,group3.name,}- # deprecated, to remove in #5389- assert {perm["code"].lower() for perm in data["user"]["permissions"]} == {- permission_manage_orders.codename,- }def test_staff_update_out_of_scope_user(@@ -2313,9 +2284,9 @@ def test_staff_update_out_of_scope_user(content = get_graphql_content(response)data = content["data"]["staffUpdate"]assert not data["user"]- assert len(data["staffErrors"]) == 1- assert data["staffErrors"][0]["field"] == "id"- assert data["staffErrors"][0]["code"] == AccountErrorCode.OUT_OF_SCOPE_USER.name+ assert len(data["errors"]) == 1+ assert data["errors"][0]["field"] == "id"+ assert data["errors"][0]["code"] == AccountErrorCode.OUT_OF_SCOPE_USER.name# for superuserresponse = superuser_api_client.post_graphql(query, variables)@@ -2323,7 +2294,7 @@ def test_staff_update_out_of_scope_user(data = content["data"]["staffUpdate"]assert data["user"]["email"] == staff_user.emailassert data["user"]["isActive"] is False- assert not data["staffErrors"]+ assert not data["errors"]def test_staff_update_out_of_scope_groups(@@ -2374,7 +2345,7 @@ def test_staff_update_out_of_scope_groups()content = get_graphql_content(response)data = content["data"]["staffUpdate"]- errors = data["staffErrors"]+ errors = data["errors"]assert not data["user"]assert len(errors) == 2@@ -2400,7 +2371,7 @@ def test_staff_update_out_of_scope_groups(response = superuser_api_client.post_graphql(query, variables)content = get_graphql_content(response)data = content["data"]["staffUpdate"]- errors = data["staffErrors"]+ errors = data["errors"]assert not errorsassert data["user"]["email"] == staff_user.emailassert {group["name"] for group in data["user"]["permissionGroups"]} == {@@ -2449,7 +2420,7 @@ def test_staff_update_duplicated_input_items()content = get_graphql_content(response)data = content["data"]["staffUpdate"]- errors = data["staffErrors"]+ errors = data["errors"]assert len(errors) == 1assert errors[0]["field"] is None@@ -2480,7 +2451,7 @@ def test_staff_update_doesnt_change_existing_avatar()content = get_graphql_content(response)data = content["data"]["staffUpdate"]- assert data["staffErrors"] == []+ assert data["errors"] == []staff_user.refresh_from_db()assert not staff_user.avatar@@ -2528,7 +2499,7 @@ def test_staff_update_deactivate_with_manage_staff_left_not_manageable_perms()content = get_graphql_content(response)data = content["data"]["staffUpdate"]- errors = data["staffErrors"]+ errors = data["errors"]assert not data["user"]assert len(errors) == 1@@ -2541,7 +2512,7 @@ def test_staff_update_deactivate_with_manage_staff_left_not_manageable_perms(response = superuser_api_client.post_graphql(query, variables)content = get_graphql_content(response)data = content["data"]["staffUpdate"]- errors = data["staffErrors"]+ errors = data["errors"]staff_user1.refresh_from_db()assert data["user"]["email"] == staff_user1.email@@ -2586,7 +2557,7 @@ def test_staff_update_deactivate_with_manage_staff_all_perms_manageable()content = get_graphql_content(response)data = content["data"]["staffUpdate"]- errors = data["staffErrors"]+ errors = data["errors"]staff_user1.refresh_from_db()assert not errors@@ -2596,7 +2567,7 @@ def test_staff_update_deactivate_with_manage_staff_all_perms_manageable(STAFF_DELETE_MUTATION = """mutation DeleteStaff($id: ID!) {staffDelete(id: $id) {- staffErrors {+ errors {fieldcodemessage@@ -2621,7 +2592,7 @@ def test_staff_delete(staff_api_client, permission_manage_staff):)content = get_graphql_content(response)data = content["data"]["staffDelete"]- assert data["staffErrors"] == []+ assert data["errors"] == []assert not User.objects.filter(pk=staff_user.id).exists()@@ -2645,7 +2616,7 @@ def test_staff_delete_with_avatar()content = get_graphql_content(response)data = content["data"]["staffDelete"]- assert data["staffErrors"] == []+ assert data["errors"] == []assert not User.objects.filter(pk=staff_user.id).exists()delete_versatile_image_mock.assert_called_once_with(staff_user.avatar)@@ -2686,16 +2657,16 @@ def test_staff_delete_out_of_scope_user(content = get_graphql_content(response)data = content["data"]["staffDelete"]assert not data["user"]- assert len(data["staffErrors"]) == 1- assert data["staffErrors"][0]["field"] == "id"- assert data["staffErrors"][0]["code"] == AccountErrorCode.OUT_OF_SCOPE_USER.name+ assert len(data["errors"]) == 1+ assert data["errors"][0]["field"] == "id"+ assert data["errors"][0]["code"] == AccountErrorCode.OUT_OF_SCOPE_USER.name# for superuserresponse = superuser_api_client.post_graphql(query, variables)content = get_graphql_content(response)data = content["data"]["staffDelete"]- assert data["staffErrors"] == []+ assert data["errors"] == []assert not User.objects.filter(pk=staff_user.id).exists()@@ -2739,7 +2710,7 @@ def test_staff_delete_left_not_manageable_permissions()content = get_graphql_content(response)data = content["data"]["staffDelete"]- errors = data["staffErrors"]+ errors = data["errors"]assert len(errors) == 1assert errors[0]["field"] == "id"@@ -2755,7 +2726,7 @@ def test_staff_delete_left_not_manageable_permissions(response = superuser_api_client.post_graphql(query, variables)content = get_graphql_content(response)data = content["data"]["staffDelete"]- errors = data["staffErrors"]+ errors = data["errors"]assert not errorsassert not User.objects.filter(pk=staff_user1.id).exists()@@ -2796,7 +2767,7 @@ def test_staff_delete_all_permissions_manageable()content = get_graphql_content(response)data = content["data"]["staffDelete"]- errors = data["staffErrors"]+ errors = data["errors"]assert len(errors) == 0assert not User.objects.filter(pk=staff_user1.id).exists()@@ -2865,7 +2836,7 @@ SET_PASSWORD_MUTATION = """fieldmessage}- accountErrors {+ errors {fieldmessagecode@@ -2907,7 +2878,7 @@ def test_set_password_invalid_token(user_api_client, customer_user):errors = content["data"]["setPassword"]["errors"]assert errors[0]["message"] == INVALID_TOKEN- account_errors = content["data"]["setPassword"]["accountErrors"]+ account_errors = content["data"]["setPassword"]["errors"]assert account_errors[0]["message"] == INVALID_TOKENassert account_errors[0]["code"] == AccountErrorCode.INVALID.name@@ -2920,7 +2891,7 @@ def test_set_password_invalid_email(user_api_client):assert len(errors) == 1assert errors[0]["field"] == "email"- account_errors = content["data"]["setPassword"]["accountErrors"]+ account_errors = content["data"]["setPassword"]["errors"]assert len(account_errors) == 1assert account_errors[0]["field"] == "email"assert account_errors[0]["code"] == AccountErrorCode.NOT_FOUND.name@@ -2948,7 +2919,7 @@ def test_set_password_invalid_password(user_api_client, customer_user, settings))assert errors[1]["message"] == "This password is entirely numeric."- account_errors = content["data"]["setPassword"]["accountErrors"]+ account_errors = content["data"]["setPassword"]["errors"]assert account_errors[0]["code"] == str_to_enum("password_too_short")assert account_errors[1]["code"] == str_to_enum("password_entirely_numeric")@@ -3407,7 +3378,7 @@ REQUEST_PASSWORD_RESET_MUTATION = """CONFIRM_ACCOUNT_MUTATION = """mutation ConfirmAccount($email: String!, $token: String!) {confirmAccount(email: $email, token: $token) {- accountErrors {+ errors {fieldcode}@@ -3460,7 +3431,7 @@ def test_account_confirmation(}response = api_client.post_graphql(CONFIRM_ACCOUNT_MUTATION, variables)content = get_graphql_content(response)- assert not content["data"]["confirmAccount"]["accountErrors"]+ assert not content["data"]["confirmAccount"]["errors"]assert content["data"]["confirmAccount"]["user"]["email"] == customer_user.emailcustomer_user.refresh_from_db()match_orders_with_new_user_mock.assert_called_once_with(customer_user)@@ -3478,9 +3449,9 @@ def test_account_confirmation_invalid_user(}response = user_api_client.post_graphql(CONFIRM_ACCOUNT_MUTATION, variables)content = get_graphql_content(response)- assert content["data"]["confirmAccount"]["accountErrors"][0]["field"] == "email"+ assert content["data"]["confirmAccount"]["errors"][0]["field"] == "email"assert (- content["data"]["confirmAccount"]["accountErrors"][0]["code"]+ content["data"]["confirmAccount"]["errors"][0]["code"]== AccountErrorCode.NOT_FOUND.name)match_orders_with_new_user_mock.assert_not_called()@@ -3493,9 +3464,9 @@ def test_account_confirmation_invalid_token(variables = {"email": customer_user.email, "token": "invalid_token"}response = user_api_client.post_graphql(CONFIRM_ACCOUNT_MUTATION, variables)content = get_graphql_content(response)- assert content["data"]["confirmAccount"]["accountErrors"][0]["field"] == "token"+ assert content["data"]["confirmAccount"]["errors"][0]["field"] == "token"assert (- content["data"]["confirmAccount"]["accountErrors"][0]["code"]+ content["data"]["confirmAccount"]["errors"][0]["code"]== AccountErrorCode.INVALID.name)match_orders_with_new_user_mock.assert_not_called()@@ -4515,7 +4486,7 @@ mutation requestEmailChange(user {}- accountErrors {+ errors {codemessagefield@@ -4551,7 +4522,7 @@ def test_request_email_change_to_existing_email(content = get_graphql_content(response)data = content["data"]["requestEmailChange"]assert not data["user"]- assert data["accountErrors"] == [+ assert data["errors"] == [{"code": "UNIQUE","message": "Email is used by other user.",@@ -4573,7 +4544,7 @@ def test_request_email_change_with_invalid_redirect_url(content = get_graphql_content(response)data = content["data"]["requestEmailChange"]assert not data["user"]- assert data["accountErrors"] == [+ assert data["errors"] == [{"code": "INVALID","message": "Invalid URL. Please check if URL is in RFC 1808 format.",@@ -4592,8 +4563,8 @@ def test_request_email_change_with_invalid_password(user_api_client, customer_uscontent = get_graphql_content(response)data = content["data"]["requestEmailChange"]assert not data["user"]- assert data["accountErrors"][0]["code"] == AccountErrorCode.INVALID_CREDENTIALS.name- assert data["accountErrors"][0]["field"] == "password"+ assert data["errors"][0]["code"] == AccountErrorCode.INVALID_CREDENTIALS.name+ assert data["errors"][0]["field"] == "password"EMAIL_UPDATE_QUERY = """@@ -4602,7 +4573,7 @@ mutation emailUpdate($token: String!) {user {}- accountErrors {+ errors {codemessagefield@@ -4642,7 +4613,7 @@ def test_email_update_to_existing_email(user_api_client, customer_user, staff_uscontent = get_graphql_content(response)data = content["data"]["confirmEmailChange"]assert not data["user"]- assert data["accountErrors"] == [+ assert data["errors"] == [{"code": "UNIQUE","message": "Email is used by other user.",diff --git a/saleor/graphql/account/tests/test_account_permission_group.py b/saleor/graphql/account/tests/test_account_permission_group.pyindex 309a4062e1..c50d75832b 100644--- a/saleor/graphql/account/tests/test_account_permission_group.py+++ b/saleor/graphql/account/tests/test_account_permission_group.py@@ -24,7 +24,7 @@ PERMISSION_GROUP_CREATE_MUTATION = """}}- permissionGroupErrors{+ errors{fieldcodepermissions@@ -86,7 +86,7 @@ def test_permission_group_create_mutation(== {user.email for user in staff_users}== set(group.user_set.all().values_list("email", flat=True)))- assert data["permissionGroupErrors"] == []+ assert data["errors"] == []def test_permission_group_create_app_no_permission(@@ -209,7 +209,7 @@ def test_permission_group_create_mutation_lack_of_permission()content = get_graphql_content(response)data = content["data"]["permissionGroupCreate"]- errors = data["permissionGroupErrors"]+ errors = data["errors"]assert len(errors) == 1assert errors[0]["field"] == "addPermissions"@@ -224,7 +224,7 @@ def test_permission_group_create_mutation_lack_of_permission(response = superuser_api_client.post_graphql(query, variables)content = get_graphql_content(response)data = content["data"]["permissionGroupCreate"]- errors = data["permissionGroupErrors"]+ errors = data["errors"]assert not errorsgroup = Group.objects.get()@@ -265,7 +265,7 @@ def test_permission_group_create_mutation_group_exists()content = get_graphql_content(response)data = content["data"]["permissionGroupCreate"]- errors = data["permissionGroupErrors"]+ errors = data["errors"]permission_group_data = data["group"]assert permission_group_data is None@@ -319,7 +319,7 @@ def test_permission_group_create_mutation_add_customer_user()content = get_graphql_content(response)data = content["data"]["permissionGroupCreate"]- errors = data["permissionGroupErrors"]+ errors = data["errors"]assert errorsassert len(errors) == 1@@ -333,7 +333,7 @@ def test_permission_group_create_mutation_add_customer_user(response = superuser_api_client.post_graphql(query, variables)content = get_graphql_content(response)data = content["data"]["permissionGroupCreate"]- errors = data["permissionGroupErrors"]+ errors = data["errors"]assert errorsassert len(errors) == 1@@ -373,7 +373,7 @@ def test_permission_group_create_mutation_lack_of_permission_and_customer_user()content = get_graphql_content(response)data = content["data"]["permissionGroupCreate"]- errors = data["permissionGroupErrors"]+ errors = data["errors"]assert errorsassert len(errors) == 2@@ -422,7 +422,7 @@ def test_permission_group_create_mutation_requestor_does_not_have_all_users_perm)content = get_graphql_content(response)data = content["data"]["permissionGroupCreate"]- errors = data["permissionGroupErrors"]+ errors = data["errors"]assert not errorsgroup_name = variables["input"]["name"]@@ -460,7 +460,7 @@ PERMISSION_GROUP_UPDATE_MUTATION = """}}- permissionGroupErrors{+ errors{fieldcodepermissions@@ -530,7 +530,7 @@ def test_permission_group_update_mutation(== permissions_codes)assert set(group1.user_set.all().values_list("email", flat=True)) == users- assert data["permissionGroupErrors"] == []+ assert data["errors"] == []def test_permission_group_update_mutation_removing_perm_left_not_manageable_perms(@@ -562,7 +562,7 @@ def test_permission_group_update_mutation_removing_perm_left_not_manageable_perm)content = get_graphql_content(response)data = content["data"]["permissionGroupUpdate"]- errors = data["permissionGroupErrors"]+ errors = data["errors"]assert not data["group"]assert len(errors) == 1@@ -626,7 +626,7 @@ def test_permission_group_update_mutation_superuser_can_remove_any_perms(== permissions_codes)assert set(group.user_set.all().values_list("email", flat=True)) == users- assert data["permissionGroupErrors"] == []+ assert data["errors"] == []def test_permission_group_update_mutation_app_no_permission(@@ -686,7 +686,7 @@ def test_permission_group_update_mutation_remove_me_from_last_group(content = get_graphql_content(response)data = content["data"]["permissionGroupUpdate"]permission_group_data = data["group"]- errors = data["permissionGroupErrors"]+ errors = data["errors"]assert not permission_group_dataassert len(errors) == 1@@ -735,7 +735,7 @@ def test_permission_group_update_mutation_remove_me_from_not_last_group(content = get_graphql_content(response)data = content["data"]["permissionGroupUpdate"]permission_group_data = data["group"]- errors = data["permissionGroupErrors"]+ errors = data["errors"]assert not errorsassert staff_user_id not in permission_group_data["users"]@@ -780,7 +780,7 @@ def test_permission_group_update_mutation_remove_last_user_from_group(content = get_graphql_content(response)data = content["data"]["permissionGroupUpdate"]permission_group_data = data["group"]- errors = data["permissionGroupErrors"]+ errors = data["errors"]assert not errorsassert staff_user.groups.count() == 0@@ -829,7 +829,7 @@ def test_permission_group_update_mutation_only_name(set(group.permissions.all().values_list("codename", flat=True))== permissions_codes)- assert data["permissionGroupErrors"] == []+ assert data["errors"] == []def test_permission_group_update_mutation_only_name_other_fields_with_none(@@ -880,7 +880,7 @@ def test_permission_group_update_mutation_only_name_other_fields_with_none(set(group.permissions.all().values_list("codename", flat=True))== permissions_codes)- assert data["permissionGroupErrors"] == []+ assert data["errors"] == []def test_permission_group_update_mutation_with_name_which_exists(@@ -909,7 +909,7 @@ def test_permission_group_update_mutation_with_name_which_exists(content = get_graphql_content(response)data = content["data"]["permissionGroupUpdate"]permission_group_data = data["group"]- errors = data["permissionGroupErrors"]+ errors = data["errors"]group.refresh_from_db()assert not permission_group_data@@ -953,7 +953,7 @@ def test_permission_group_update_mutation_only_permissions(permission["name"] for permission in permission_group_data["permissions"]}assert set(group.permissions.all().values_list("name", flat=True)) == permissions- assert data["permissionGroupErrors"] == []+ assert data["errors"] == []def test_permission_group_update_mutation_no_input_data(@@ -972,7 +972,7 @@ def test_permission_group_update_mutation_no_input_data(response = staff_api_client.post_graphql(query, variables)content = get_graphql_content(response)data = content["data"]["permissionGroupUpdate"]- errors = data["permissionGroupErrors"]+ errors = data["errors"]permission_group_data = data["group"]assert errors == []@@ -1013,7 +1013,7 @@ def test_permission_group_update_mutation_user_cannot_manage_group()content = get_graphql_content(response)data = content["data"]["permissionGroupUpdate"]- errors = data["permissionGroupErrors"]+ errors = data["errors"]assert len(errors) == 1assert errors[0]["code"] == PermissionGroupErrorCode.OUT_OF_SCOPE_PERMISSION.name@@ -1023,7 +1023,7 @@ def test_permission_group_update_mutation_user_cannot_manage_group(response = superuser_api_client.post_graphql(query, variables)content = get_graphql_content(response)data = content["data"]["permissionGroupUpdate"]- errors = data["permissionGroupErrors"]+ errors = data["errors"]group_name = variables["input"]["name"]group = Group.objects.get(name=group_name)@@ -1073,7 +1073,7 @@ def test_permission_group_update_mutation_user_in_list_to_add_and_remove()content = get_graphql_content(response)data = content["data"]["permissionGroupUpdate"]- errors = data["permissionGroupErrors"]+ errors = data["errors"]assert len(errors) == 1assert errors[0]["code"] == PermissionGroupErrorCode.DUPLICATED_INPUT_ITEM.name@@ -1120,7 +1120,7 @@ def test_permission_group_update_mutation_permissions_in_list_to_add_and_remove()content = get_graphql_content(response)data = content["data"]["permissionGroupUpdate"]- errors = data["permissionGroupErrors"]+ errors = data["errors"]assert len(errors) == 1assert errors[0]["code"] == PermissionGroupErrorCode.DUPLICATED_INPUT_ITEM.name@@ -1174,7 +1174,7 @@ def test_permission_group_update_mutation_permissions_and_users_duplicated()content = get_graphql_content(response)data = content["data"]["permissionGroupUpdate"]- errors = data["permissionGroupErrors"]+ errors = data["errors"]assert len(errors) == 2assert {error["code"] for error in errors} == {@@ -1224,7 +1224,7 @@ def test_permission_group_update_mutation_user_add_customer_user()content = get_graphql_content(response)data = content["data"]["permissionGroupUpdate"]- errors = data["permissionGroupErrors"]+ errors = data["errors"]assert len(errors) == 1assert errors[0]["code"] == PermissionGroupErrorCode.ASSIGN_NON_STAFF_MEMBER.name@@ -1236,7 +1236,7 @@ def test_permission_group_update_mutation_user_add_customer_user(response = superuser_api_client.post_graphql(query, variables)content = get_graphql_content(response)data = content["data"]["permissionGroupUpdate"]- errors = data["permissionGroupErrors"]+ errors = data["errors"]assert len(errors) == 1assert errors[0]["code"] == PermissionGroupErrorCode.ASSIGN_NON_STAFF_MEMBER.name@@ -1278,7 +1278,7 @@ def test_permission_group_update_mutation_lack_of_permission()content = get_graphql_content(response)data = content["data"]["permissionGroupUpdate"]- errors = data["permissionGroupErrors"]+ errors = data["errors"]assert len(errors) == 1assert errors[0]["code"] == PermissionGroupErrorCode.OUT_OF_SCOPE_PERMISSION.name@@ -1290,7 +1290,7 @@ def test_permission_group_update_mutation_lack_of_permission(response = superuser_api_client.post_graphql(query, variables)content = get_graphql_content(response)data = content["data"]["permissionGroupUpdate"]- errors = data["permissionGroupErrors"]+ errors = data["errors"]assert not errorsgroup_name = variables["input"]["name"]@@ -1358,7 +1358,7 @@ def test_permission_group_update_mutation_out_of_scope_users()content = get_graphql_content(response)data = content["data"]["permissionGroupUpdate"]- errors = data["permissionGroupErrors"]+ errors = data["errors"]assert errorsassert data["group"] is None@@ -1373,7 +1373,7 @@ def test_permission_group_update_mutation_out_of_scope_users(response = superuser_api_client.post_graphql(query, variables)content = get_graphql_content(response)data = content["data"]["permissionGroupUpdate"]- errors = data["permissionGroupErrors"]+ errors = data["errors"]assert not errorsgroup = Group.objects.get()@@ -1434,7 +1434,7 @@ def test_permission_group_update_mutation_multiple_errors()content = get_graphql_content(response)data = content["data"]["permissionGroupUpdate"]- errors = data["permissionGroupErrors"]+ errors = data["errors"]assert len(errors) == 3expected_errors = [@@ -1504,7 +1504,7 @@ def test_permission_group_update_mutation_remove_all_users_manageable_perms()content = get_graphql_content(response)data = content["data"]["permissionGroupUpdate"]- errors = data["permissionGroupErrors"]+ errors = data["errors"]assert not errorsassert data["group"]@@ -1555,7 +1555,7 @@ def test_permission_group_update_mutation_remove_all_group_users_not_manageable_)content = get_graphql_content(response)data = content["data"]["permissionGroupUpdate"]- errors = data["permissionGroupErrors"]+ errors = data["errors"]assert not data["group"]assert len(errors) == 1@@ -1570,7 +1570,7 @@ def test_permission_group_update_mutation_remove_all_group_users_not_manageable_response = superuser_api_client.post_graphql(query, variables)content = get_graphql_content(response)data = content["data"]["permissionGroupUpdate"]- errors = data["permissionGroupErrors"]+ errors = data["errors"]assert not errorsgroup1.refresh_from_db()@@ -1617,7 +1617,7 @@ def test_permission_group_update_mutation_remove_group_users_add_with_manage_stu)content = get_graphql_content(response)data = content["data"]["permissionGroupUpdate"]- errors = data["permissionGroupErrors"]+ errors = data["errors"]group_data = data["group"]assert not errors@@ -1655,7 +1655,7 @@ def test_group_update_mutation_remove_some_users_from_group_with_manage_stuff()content = get_graphql_content(response)data = content["data"]["permissionGroupUpdate"]- errors = data["permissionGroupErrors"]+ errors = data["errors"]group_data = data["group"]assert not errors@@ -1699,7 +1699,7 @@ def test_group_update_mutation_remove_some_users_from_group_user_with_manage_stu)content = get_graphql_content(response)data = content["data"]["permissionGroupUpdate"]- errors = data["permissionGroupErrors"]+ errors = data["errors"]group_data = data["group"]assert not errors@@ -1746,7 +1746,7 @@ def test_permission_group_update_mutation_remove_user_with_manage_staff()content = get_graphql_content(response)data = content["data"]["permissionGroupUpdate"]- errors = data["permissionGroupErrors"]+ errors = data["errors"]assert not data["group"]assert len(errors) == 1@@ -1797,7 +1797,7 @@ def test_permission_group_update_mutation_remove_user_with_manage_staff_add_user)content = get_graphql_content(response)data = content["data"]["permissionGroupUpdate"]- errors = data["permissionGroupErrors"]+ errors = data["errors"]group_data = data["group"]assert not errors@@ -1822,7 +1822,7 @@ PERMISSION_GROUP_DELETE_MUTATION = """code}}- permissionGroupErrors{+ errors{fieldcodeusers@@ -1865,7 +1865,7 @@ def test_group_delete_mutation()content = get_graphql_content(response)data = content["data"]["permissionGroupDelete"]- errors = data["permissionGroupErrors"]+ errors = data["errors"]permission_group_data = data["group"]assert errors == []@@ -1927,7 +1927,7 @@ def test_group_delete_mutation_out_of_scope_permission()content = get_graphql_content(response)data = content["data"]["permissionGroupDelete"]- errors = data["permissionGroupErrors"]+ errors = data["errors"]permission_group_data = data["group"]assert not permission_group_data@@ -1938,7 +1938,7 @@ def test_group_delete_mutation_out_of_scope_permission(response = superuser_api_client.post_graphql(query, variables)content = get_graphql_content(response)data = content["data"]["permissionGroupDelete"]- errors = data["permissionGroupErrors"]+ errors = data["errors"]permission_group_data = data["group"]assert not errors@@ -1992,7 +1992,7 @@ def test_group_delete_mutation_left_not_manageable_permission()content = get_graphql_content(response)data = content["data"]["permissionGroupDelete"]- errors = data["permissionGroupErrors"]+ errors = data["errors"]assert not data["group"]assert len(errors) == 1@@ -2007,7 +2007,7 @@ def test_group_delete_mutation_left_not_manageable_permission(response = superuser_api_client.post_graphql(query, variables)content = get_graphql_content(response)data = content["data"]["permissionGroupDelete"]- errors = data["permissionGroupErrors"]+ errors = data["errors"]assert not errorsassert not Group.objects.filter(pk=group1.pk).exists()@@ -2031,7 +2031,7 @@ def test_group_delete_mutation_delete_last_group()content = get_graphql_content(response)data = content["data"]["permissionGroupDelete"]- errors = data["permissionGroupErrors"]+ errors = data["errors"]assert not data["group"]assert len(errors) == 1@@ -2069,7 +2069,7 @@ def test_group_delete_mutation_delete_last_group_with_manage_staff()content = get_graphql_content(response)data = content["data"]["permissionGroupDelete"]- errors = data["permissionGroupErrors"]+ errors = data["errors"]assert not data["group"]assert len(errors) == 1@@ -2113,7 +2113,7 @@ def test_group_delete_mutation_cannot_remove_requestor_last_group(response = staff_api_client.post_graphql(query, variables)content = get_graphql_content(response)data = content["data"]["permissionGroupDelete"]- errors = data["permissionGroupErrors"]+ errors = data["errors"]assert errors[0]["field"] == "id"assert (diff --git a/saleor/graphql/account/tests/test_bulk_delete.py b/saleor/graphql/account/tests/test_bulk_delete.pyindex 65620a68d5..c92745ae88 100644--- a/saleor/graphql/account/tests/test_bulk_delete.py+++ b/saleor/graphql/account/tests/test_bulk_delete.py@@ -62,7 +62,7 @@ STAFF_BULK_DELETE_MUTATION = """mutation staffBulkDelete($ids: [ID]!) {staffBulkDelete(ids: $ids) {count- staffErrors{+ errors{codefieldpermissions@@ -92,7 +92,7 @@ def test_delete_staff_members(content = get_graphql_content(response)data = content["data"]["staffBulkDelete"]assert data["count"] == 2- assert not data["staffErrors"]+ assert not data["errors"]assert not User.objects.filter(id__in=[user.id for user in [staff_1, staff_2]]).exists()@@ -159,7 +159,7 @@ def test_delete_staff_members_left_not_manageable_permissions(response = staff_api_client.post_graphql(query, variables)content = get_graphql_content(response)data = content["data"]["staffBulkDelete"]- errors = data["staffErrors"]+ errors = data["errors"]assert len(errors) == 1assert data["count"] == 0@@ -213,7 +213,7 @@ def test_delete_staff_members_superuser_can_delete_when_delete_left_notmanageablresponse = superuser_api_client.post_graphql(query, variables)content = get_graphql_content(response)data = content["data"]["staffBulkDelete"]- errors = data["staffErrors"]+ errors = data["errors"]assert not errorsassert data["count"] == 2@@ -262,7 +262,7 @@ def test_delete_staff_members_all_permissions_manageable(response = staff_api_client.post_graphql(query, variables)content = get_graphql_content(response)data = content["data"]["staffBulkDelete"]- errors = data["staffErrors"]+ errors = data["errors"]assert not errorsassert data["count"] == 2@@ -315,7 +315,7 @@ def test_delete_staff_members_out_of_scope_users(response = staff_api_client.post_graphql(query, variables)content = get_graphql_content(response)data = content["data"]["staffBulkDelete"]- errors = data["staffErrors"]+ errors = data["errors"]assert len(errors) == 1assert data["count"] == 0@@ -375,7 +375,7 @@ def test_delete_staff_members_superuser_can_delete__out_of_scope_users(response = superuser_api_client.post_graphql(query, variables)content = get_graphql_content(response)data = content["data"]["staffBulkDelete"]- errors = data["staffErrors"]+ errors = data["errors"]assert not errorsassert data["count"] == 2diff --git a/saleor/graphql/account/types.py b/saleor/graphql/account/types.pyindex 8363e1b3a9..0321de9021 100644--- a/saleor/graphql/account/types.py+++ b/saleor/graphql/account/types.py@@ -204,6 +204,7 @@ class User(CountableDjangoObjectType):Checkout,description="Returns the last open checkout of this user.",deprecation_reason=(+ "Will be removed in Saleor 4.0. ""Use the `checkout_tokens` field to fetch the user checkouts."),)@@ -222,14 +223,6 @@ class User(CountableDjangoObjectType):orders = PrefetchingConnectionField("saleor.graphql.order.types.Order", description="List of user's orders.")- # deprecated, to remove in #5389- permissions = graphene.List(- Permission,- description="List of user's permissions.",- deprecation_reason=(- "Will be removed in Saleor 2.11." "Use the `userPermissions` instead."- ),- )user_permissions = graphene.List(UserPermission, description="List of user's permissions.")@@ -309,14 +302,6 @@ class User(CountableDjangoObjectType):def resolve_gift_cards(root: models.User, info, **_kwargs):return root.gift_cards.all()- @staticmethod- @traced_resolver- def resolve_permissions(root: models.User, _info, **_kwargs):- # deprecated, to remove in #5389- from .resolvers import resolve_permissions-- return resolve_permissions(root)-@staticmethod@traced_resolverdef resolve_user_permissions(root: models.User, _info, **_kwargs):diff --git a/saleor/graphql/app/mutations.py b/saleor/graphql/app/mutations.pyindex 2778f379e9..5346cb9258 100644--- a/saleor/graphql/app/mutations.py+++ b/saleor/graphql/app/mutations.py@@ -29,10 +29,6 @@ from .utils import ensure_can_manage_permissionsclass AppInput(graphene.InputObjectType):name = graphene.String(description="Name of the app.")- is_active = graphene.Boolean(- description="DEPRECATED: Use the `appActivate` and `appDeactivate` mutations "- "instead. This field will be removed after 2020-07-31.",- )permissions = graphene.List(PermissionEnum,description="List of permission code names to assign to this app.",diff --git a/saleor/graphql/app/tests/mutations/test_app_activate.py b/saleor/graphql/app/tests/mutations/test_app_activate.pyindex 4a5b7e3a88..48db014149 100644--- a/saleor/graphql/app/tests/mutations/test_app_activate.py+++ b/saleor/graphql/app/tests/mutations/test_app_activate.py@@ -10,7 +10,7 @@ APP_ACTIVATE_MUTATION = """idisActive}- appErrors{+ errors{fieldmessagecode@@ -129,7 +129,7 @@ def test_app_has_more_permission_than_user_requestor(# thencontent = get_graphql_content(response)app_data = content["data"]["appActivate"]["app"]- app_errors = content["data"]["appActivate"]["appErrors"]+ app_errors = content["data"]["appActivate"]["errors"]app.refresh_from_db()assert not app_errors@@ -158,7 +158,7 @@ def test_app_has_more_permission_than_app_requestor(# thencontent = get_graphql_content(response)app_data = content["data"]["appActivate"]["app"]- app_errors = content["data"]["appActivate"]["appErrors"]+ app_errors = content["data"]["appActivate"]["errors"]app.refresh_from_db()assert not app_errorsdiff --git a/saleor/graphql/app/tests/mutations/test_app_create.py b/saleor/graphql/app/tests/mutations/test_app_create.pyindex a5b73a70e0..e5495469de 100644--- a/saleor/graphql/app/tests/mutations/test_app_create.py+++ b/saleor/graphql/app/tests/mutations/test_app_create.py@@ -5,9 +5,9 @@ from ....tests.utils import assert_no_permission, get_graphql_contentAPP_CREATE_MUTATION = """mutation AppCreate(- $name: String, $is_active: Boolean $permissions: [PermissionEnum]){+ $name: String, $permissions: [PermissionEnum]){appCreate(input:- {name: $name, isActive: $is_active, permissions: $permissions})+ {name: $name, permissions: $permissions}){authTokenapp{@@ -22,7 +22,7 @@ APP_CREATE_MUTATION = """authToken}}- appErrors{+ errors{fieldmessagecode@@ -44,7 +44,6 @@ def test_app_create_mutation(variables = {"name": "New integration",- "is_active": True,"permissions": [PermissionEnum.MANAGE_PRODUCTS.name],}response = staff_api_client.post_graphql(@@ -73,7 +72,6 @@ def test_app_create_mutation_for_app(variables = {"name": "New integration",- "is_active": True,"permissions": [PermissionEnum.MANAGE_PRODUCTS.name],}response = app_api_client.post_graphql(query, variables=variables)@@ -102,7 +100,6 @@ def test_app_create_mutation_out_of_scope_permissions(variables = {"name": "New integration",- "is_active": True,"permissions": [PermissionEnum.MANAGE_PRODUCTS.name],}@@ -110,7 +107,7 @@ def test_app_create_mutation_out_of_scope_permissions(content = get_graphql_content(response)data = content["data"]["appCreate"]- errors = data["appErrors"]+ errors = data["errors"]assert not data["app"]assert len(errors) == 1error = errors[0]@@ -129,7 +126,6 @@ def test_app_create_mutation_superuser_can_create_app_with_any_perms(variables = {"name": "New integration",- "is_active": True,"permissions": [PermissionEnum.MANAGE_PRODUCTS.name],}@@ -154,7 +150,6 @@ def test_app_create_mutation_for_app_out_of_scope_permissions(variables = {"name": "New integration",- "is_active": True,"permissions": [PermissionEnum.MANAGE_PRODUCTS.name],}response = app_api_client.post_graphql(@@ -163,7 +158,7 @@ def test_app_create_mutation_for_app_out_of_scope_permissions(content = get_graphql_content(response)data = content["data"]["appCreate"]- errors = data["appErrors"]+ errors = data["errors"]assert not data["app"]assert len(errors) == 1error = errors[0]@@ -181,7 +176,6 @@ def test_app_create_mutation_no_permissions(query = APP_CREATE_MUTATIONvariables = {"name": "New integration",- "is_active": True,"permissions": [PermissionEnum.MANAGE_PRODUCTS.name],}response = staff_api_client.post_graphql(query, variables=variables)diff --git a/saleor/graphql/app/tests/mutations/test_app_deactivate.py b/saleor/graphql/app/tests/mutations/test_app_deactivate.pyindex b9e0a81d7d..2aa09332ce 100644--- a/saleor/graphql/app/tests/mutations/test_app_deactivate.py+++ b/saleor/graphql/app/tests/mutations/test_app_deactivate.py@@ -10,7 +10,7 @@ APP_DEACTIVATE_MUTATION = """idisActive}- appErrors{+ errors{fieldmessagecode@@ -129,7 +129,7 @@ def test_app_has_more_permission_than_user_requestor(# thencontent = get_graphql_content(response)app_data = content["data"]["appDeactivate"]["app"]- app_errors = content["data"]["appDeactivate"]["appErrors"]+ app_errors = content["data"]["appDeactivate"]["errors"]app.refresh_from_db()assert not app_errors@@ -158,7 +158,7 @@ def test_app_has_more_permission_than_app_requestor(# thencontent = get_graphql_content(response)app_data = content["data"]["appDeactivate"]["app"]- app_errors = content["data"]["appDeactivate"]["appErrors"]+ app_errors = content["data"]["appDeactivate"]["errors"]app.refresh_from_db()assert not app_errorsdiff --git a/saleor/graphql/app/tests/mutations/test_app_delete.py b/saleor/graphql/app/tests/mutations/test_app_delete.pyindex d76e1e916e..08f440a743 100644--- a/saleor/graphql/app/tests/mutations/test_app_delete.py+++ b/saleor/graphql/app/tests/mutations/test_app_delete.py@@ -7,7 +7,7 @@ from ....tests.utils import get_graphql_contentAPP_DELETE_MUTATION = """mutation appDelete($id: ID!){appDelete(id: $id){- appErrors{+ errors{fieldmessagecode@@ -40,7 +40,7 @@ def test_app_delete(data = content["data"]["appDelete"]assert data["app"]- assert not data["appErrors"]+ assert not data["errors"]assert not App.objects.filter(id=app.id)@@ -64,7 +64,7 @@ def test_app_delete_for_app(data = content["data"]["appDelete"]assert data["app"]- assert not data["appErrors"]+ assert not data["errors"]assert not App.objects.filter(id=app.id).exists()@@ -88,7 +88,7 @@ def test_app_delete_out_of_scope_app(content = get_graphql_content(response)data = content["data"]["appDelete"]- errors = data["appErrors"]+ errors = data["errors"]assert not data["app"]assert len(errors) == 1error = errors[0]@@ -114,7 +114,7 @@ def test_app_delete_superuser_can_delete_any_app(data = content["data"]["appDelete"]assert data["app"]- assert not data["appErrors"]+ assert not data["errors"]assert not App.objects.filter(id=app.id).exists()@@ -135,7 +135,7 @@ def test_app_delete_for_app_out_of_scope_app(content = get_graphql_content(response)data = content["data"]["appDelete"]- errors = data["appErrors"]+ errors = data["errors"]assert not data["app"]assert len(errors) == 1error = errors[0]diff --git a/saleor/graphql/app/tests/mutations/test_app_delete_failed_installation.py b/saleor/graphql/app/tests/mutations/test_app_delete_failed_installation.pyindex d4e001a07a..d31383fce7 100644--- a/saleor/graphql/app/tests/mutations/test_app_delete_failed_installation.py+++ b/saleor/graphql/app/tests/mutations/test_app_delete_failed_installation.py@@ -8,7 +8,7 @@ from ....tests.utils import get_graphql_contentDELETE_FAILED_INSTALLATION_MUTATION = """mutation AppDeleteFailedInstallation($id: ID!){appDeleteFailedInstallation(id:$id){- appErrors{+ errors{fieldmessagecode@@ -166,9 +166,7 @@ def test_cannot_drop_installation_if_status_is_different_than_failed(content = get_graphql_content(response)AppInstallation.objects.get()- app_installation_errors = content["data"]["appDeleteFailedInstallation"][- "appErrors"- ]+ app_installation_errors = content["data"]["appDeleteFailedInstallation"]["errors"]assert len(app_installation_errors) == 1assert app_installation_errors[0]["field"] == "id"diff --git a/saleor/graphql/app/tests/mutations/test_app_fetch_manifest.py b/saleor/graphql/app/tests/mutations/test_app_fetch_manifest.pyindex 876f1bd6c1..074e197a1c 100644--- a/saleor/graphql/app/tests/mutations/test_app_fetch_manifest.py+++ b/saleor/graphql/app/tests/mutations/test_app_fetch_manifest.py@@ -24,7 +24,7 @@ mutation AppFetchManifest($manifest_url: String!){code}}- appErrors{+ errors{fieldmessagecode@@ -47,7 +47,7 @@ def test_app_fetch_manifest(staff_api_client, staff_user, permission_manage_appsvariables=variables,)content = get_graphql_content(response)- errors = content["data"]["appFetchManifest"]["appErrors"]+ errors = content["data"]["appFetchManifest"]["errors"]manifest = content["data"]["appFetchManifest"]["manifest"]assert not errorsassert manifest["identifier"] == "app2"@@ -95,7 +95,7 @@ def test_app_fetch_manifest_incorrect_permission_in_manifest(variables=variables,)content = get_graphql_content(response)- errors = content["data"]["appFetchManifest"]["appErrors"]+ errors = content["data"]["appFetchManifest"]["errors"]manifest = content["data"]["appFetchManifest"]["manifest"]assert len(errors) == 1assert errors[0] == {@@ -121,7 +121,7 @@ def test_app_fetch_manifest_unable_to_connect(variables=variables,)content = get_graphql_content(response)- errors = content["data"]["appFetchManifest"]["appErrors"]+ errors = content["data"]["appFetchManifest"]["errors"]assert len(errors) == 1assert errors[0] == {@@ -146,7 +146,7 @@ def test_app_fetch_manifest_wrong_format_of_response(variables=variables,)content = get_graphql_content(response)- errors = content["data"]["appFetchManifest"]["appErrors"]+ errors = content["data"]["appFetchManifest"]["errors"]assert len(errors) == 1assert errors[0] == {@@ -174,7 +174,7 @@ def test_app_fetch_manifest_handle_exception(variables=variables,)content = get_graphql_content(response)- errors = content["data"]["appFetchManifest"]["appErrors"]+ errors = content["data"]["appFetchManifest"]["errors"]assert len(errors) == 1assert errors[0] == {diff --git a/saleor/graphql/app/tests/mutations/test_app_install.py b/saleor/graphql/app/tests/mutations/test_app_install.pyindex b38221f7df..c6d40e861d 100644--- a/saleor/graphql/app/tests/mutations/test_app_install.py+++ b/saleor/graphql/app/tests/mutations/test_app_install.py@@ -19,7 +19,7 @@ INSTALL_APP_MUTATION = """appNamemanifestUrl}- appErrors{+ errors{fieldmessagecode@@ -109,7 +109,7 @@ def test_app_install_mutation_out_of_scope_permissions(content = get_graphql_content(response)data = content["data"]["appInstall"]- errors = data["appErrors"]+ errors = data["errors"]assert not data["appInstallation"]assert len(errors) == 1error = errors[0]@@ -136,7 +136,7 @@ def test_install_app_mutation_by_app_out_of_scope_permissions(content = get_graphql_content(response)data = content["data"]["appInstall"]- errors = data["appErrors"]+ errors = data["errors"]assert not data["appInstallation"]assert len(errors) == 1error = errors[0]diff --git a/saleor/graphql/app/tests/mutations/test_app_retry_install.py b/saleor/graphql/app/tests/mutations/test_app_retry_install.pyindex 5ee1bae2a9..def20e6a90 100644--- a/saleor/graphql/app/tests/mutations/test_app_retry_install.py+++ b/saleor/graphql/app/tests/mutations/test_app_retry_install.py@@ -17,7 +17,7 @@ RETRY_INSTALL_APP_MUTATION = """appNamemanifestUrl}- appErrors{+ errors{fieldmessagecode@@ -131,7 +131,7 @@ def test_retry_install_app_mutation_app_has_more_permission_than_user_requestor(content = get_graphql_content(response)data = content["data"]["appRetryInstall"]- errors = data["appErrors"]+ errors = data["errors"]assert not errorsapp_installation = AppInstallation.objects.get()@@ -173,7 +173,7 @@ def test_retry_install_app_mutation_app_has_more_permission_than_app_requestor(content = get_graphql_content(response)data = content["data"]["appRetryInstall"]- errors = data["appErrors"]+ errors = data["errors"]assert not errorsapp_installation = AppInstallation.objects.get()@@ -215,7 +215,7 @@ def test_cannot_retry_installation_if_status_is_different_than_failed(AppInstallation.objects.get()app_installation_data = content["data"]["appRetryInstall"]["appInstallation"]- app_installation_errors = content["data"]["appRetryInstall"]["appErrors"]+ app_installation_errors = content["data"]["appRetryInstall"]["errors"]assert not app_installation_dataassert len(app_installation_errors) == 1assert app_installation_errors[0]["field"] == "id"diff --git a/saleor/graphql/app/tests/mutations/test_app_token_create.py b/saleor/graphql/app/tests/mutations/test_app_token_create.pyindex 4cefafe3df..e699d5db63 100644--- a/saleor/graphql/app/tests/mutations/test_app_token_create.py+++ b/saleor/graphql/app/tests/mutations/test_app_token_create.py@@ -13,7 +13,7 @@ mutation appTokenCreate($input: AppTokenInput!) {authTokenid}- appErrors{+ errors{fieldmessagecode@@ -98,7 +98,7 @@ def test_app_token_create_out_of_scope_app(content = get_graphql_content(response)data = content["data"]["appTokenCreate"]- errors = data["appErrors"]+ errors = data["errors"]assert not data["appToken"]assert len(errors) == 1error = errors[0]@@ -149,7 +149,7 @@ def test_app_token_create_as_app_out_of_scope_app()content = get_graphql_content(response)data = content["data"]["appTokenCreate"]- errors = data["appErrors"]+ errors = data["errors"]assert not data["appToken"]assert len(errors) == 1error = errors[0]diff --git a/saleor/graphql/app/tests/mutations/test_app_token_delete.py b/saleor/graphql/app/tests/mutations/test_app_token_delete.pyindex 418f8151ef..17a3a413fd 100644--- a/saleor/graphql/app/tests/mutations/test_app_token_delete.py+++ b/saleor/graphql/app/tests/mutations/test_app_token_delete.py@@ -7,7 +7,7 @@ from ....tests.utils import assert_no_permission, get_graphql_contentAPP_TOKEN_DELETE_MUTATION = """mutation appTokenDelete($id: ID!){appTokenDelete(id: $id){- appErrors{+ errors{fieldmessagecode@@ -98,7 +98,7 @@ def test_app_token_delete_out_of_scope_app(content = get_graphql_content(response)data = content["data"]["appTokenDelete"]- errors = data["appErrors"]+ errors = data["errors"]assert not data["appToken"]assert len(errors) == 1@@ -126,7 +126,7 @@ def test_app_token_delete_superuser_can_delete_token_for_any_app(content = get_graphql_content(response)data = content["data"]["appTokenDelete"]- errors = data["appErrors"]+ errors = data["errors"]assert data["appToken"]assert not errors@@ -151,7 +151,7 @@ def test_app_token_delete_for_app_out_of_scope_app(content = get_graphql_content(response)data = content["data"]["appTokenDelete"]- errors = data["appErrors"]+ errors = data["errors"]assert not data["appToken"]assert len(errors) == 1diff --git a/saleor/graphql/app/tests/mutations/test_app_update.py b/saleor/graphql/app/tests/mutations/test_app_update.pyindex b79ea06150..7b0827ae1c 100644--- a/saleor/graphql/app/tests/mutations/test_app_update.py+++ b/saleor/graphql/app/tests/mutations/test_app_update.py@@ -6,10 +6,9 @@ from ....core.enums import PermissionEnumfrom ....tests.utils import assert_no_permission, get_graphql_contentAPP_UPDATE_MUTATION = """-mutation AppUpdate($id: ID!, $is_active: Boolean,- $permissions: [PermissionEnum]){+mutation AppUpdate($id: ID!, $permissions: [PermissionEnum]){appUpdate(id: $id,- input:{isActive: $is_active, permissions:$permissions}){+ input:{permissions:$permissions}){app{isActiveid@@ -22,7 +21,7 @@ mutation AppUpdate($id: ID!, $is_active: Boolean,}name}- appErrors{+ errors{fieldmessagecode@@ -47,7 +46,6 @@ def test_app_update_mutation(variables = {"id": id,- "is_active": False,"permissions": [PermissionEnum.MANAGE_PRODUCTS.name,PermissionEnum.MANAGE_USERS.name,@@ -64,7 +62,6 @@ def test_app_update_mutation(tokens = app.tokens.all()assert app_data["isActive"] == app.is_active- assert app.is_active is Falseassert len(tokens_data) == 1assert tokens_data[0]["authToken"] == tokens.get().auth_token[-4:]assert set(app.permissions.all()) == {@@ -97,7 +94,6 @@ def test_app_update_mutation_for_app(variables = {"id": id,- "is_active": False,"permissions": [PermissionEnum.MANAGE_PRODUCTS.name,PermissionEnum.MANAGE_USERS.name,@@ -112,7 +108,6 @@ def test_app_update_mutation_for_app(tokens = app.tokens.all()assert app_data["isActive"] == app.is_active- assert app.is_active is Falseassert len(tokens_data) == 1assert tokens_data[0]["authToken"] == tokens.get().auth_token[-4:]assert set(app.permissions.all()) == {@@ -136,7 +131,6 @@ def test_app_update_mutation_out_of_scope_permissions(variables = {"id": id,- "is_active": False,"permissions": [PermissionEnum.MANAGE_PRODUCTS.name,PermissionEnum.MANAGE_USERS.name,@@ -147,7 +141,7 @@ def test_app_update_mutation_out_of_scope_permissions(content = get_graphql_content(response)data = content["data"]["appUpdate"]- errors = data["appErrors"]+ errors = data["errors"]assert not data["app"]assert len(errors) == 1error = errors[0]@@ -169,7 +163,6 @@ def test_app_update_mutation_superuser_can_add_any_permissions_to_app(variables = {"id": id,- "is_active": False,"permissions": [PermissionEnum.MANAGE_PRODUCTS.name,PermissionEnum.MANAGE_USERS.name,@@ -186,7 +179,6 @@ def test_app_update_mutation_superuser_can_add_any_permissions_to_app(tokens = app.tokens.all()assert app_data["isActive"] == app.is_active- assert app.is_active is Falseassert len(tokens_data) == 1assert tokens_data[0]["authToken"] == tokens.get().auth_token[-4:]assert set(app.permissions.all()) == {@@ -215,7 +207,6 @@ def test_app_update_mutation_for_app_out_of_scope_permissions(variables = {"id": id,- "is_active": False,"permissions": [PermissionEnum.MANAGE_PRODUCTS.name,PermissionEnum.MANAGE_USERS.name,@@ -225,7 +216,7 @@ def test_app_update_mutation_for_app_out_of_scope_permissions(content = get_graphql_content(response)data = content["data"]["appUpdate"]- errors = data["appErrors"]+ errors = data["errors"]assert not data["app"]assert len(errors) == 1error = errors[0]@@ -255,7 +246,6 @@ def test_app_update_mutation_out_of_scope_app(variables = {"id": id,- "is_active": False,"permissions": [PermissionEnum.MANAGE_PRODUCTS.name,PermissionEnum.MANAGE_USERS.name,@@ -266,7 +256,7 @@ def test_app_update_mutation_out_of_scope_app(content = get_graphql_content(response)data = content["data"]["appUpdate"]- errors = data["appErrors"]+ errors = data["errors"]assert not data["app"]assert len(errors) == 1error = errors[0]@@ -289,7 +279,6 @@ def test_app_update_mutation_superuser_can_update_any_app(variables = {"id": id,- "is_active": False,"permissions": [PermissionEnum.MANAGE_PRODUCTS.name,PermissionEnum.MANAGE_USERS.name,@@ -306,7 +295,6 @@ def test_app_update_mutation_superuser_can_update_any_app(tokens = app.tokens.all()assert app_data["isActive"] == app.is_active- assert app.is_active is Falseassert len(tokens_data) == 1assert tokens_data[0]["authToken"] == tokens.get().auth_token[-4:]assert set(app.permissions.all()) == {@@ -335,7 +323,6 @@ def test_app_update_mutation_for_app_out_of_scope_app(variables = {"id": id,- "is_active": False,"permissions": [PermissionEnum.MANAGE_PRODUCTS.name,PermissionEnum.MANAGE_USERS.name,@@ -345,7 +332,7 @@ def test_app_update_mutation_for_app_out_of_scope_app(content = get_graphql_content(response)data = content["data"]["appUpdate"]- errors = data["appErrors"]+ errors = data["errors"]assert not data["app"]assert len(errors) == 1error = errors[0]@@ -358,7 +345,6 @@ def test_app_update_no_permission(app, staff_api_client, staff_user):id = graphene.Node.to_global_id("App", app.id)variables = {"id": id,- "is_active": False,"permissions": [PermissionEnum.MANAGE_PRODUCTS.name],}response = staff_api_client.post_graphql(query, variables=variables)diff --git a/saleor/graphql/attribute/tests/mutations/test_attribute_create.py b/saleor/graphql/attribute/tests/mutations/test_attribute_create.pyindex a8cd5b103f..c828f036a5 100644--- a/saleor/graphql/attribute/tests/mutations/test_attribute_create.py+++ b/saleor/graphql/attribute/tests/mutations/test_attribute_create.py@@ -10,7 +10,7 @@ CREATE_ATTRIBUTE_MUTATION = """$input: AttributeCreateInput!){attributeCreate(input: $input) {- attributeErrors {+ errors {fieldmessagecode@@ -74,7 +74,7 @@ def test_create_attribute_and_attribute_values(# thencontent = get_graphql_content(response)- assert not content["data"]["attributeCreate"]["attributeErrors"]+ assert not content["data"]["attributeCreate"]["errors"]data = content["data"]["attributeCreate"]# Check if the attribute was correctly created@@ -123,7 +123,7 @@ def test_create_attribute_with_file_input_type(# thencontent = get_graphql_content(response)- assert not content["data"]["attributeCreate"]["attributeErrors"]+ assert not content["data"]["attributeCreate"]["errors"]data = content["data"]["attributeCreate"]# Check if the attribute was correctly created@@ -176,7 +176,7 @@ def test_create_attribute_with_reference_input_type(# thencontent = get_graphql_content(response)- assert not content["data"]["attributeCreate"]["attributeErrors"]+ assert not content["data"]["attributeCreate"]["errors"]data = content["data"]["attributeCreate"]# Check if the attribute was correctly created@@ -225,7 +225,7 @@ def test_create_attribute_with_reference_input_type_entity_type_not_given(# thencontent = get_graphql_content(response)data = content["data"]["attributeCreate"]- errors = data["attributeErrors"]+ errors = data["errors"]assert not data["attribute"]assert len(errors) == 1@@ -263,7 +263,7 @@ def test_create_page_attribute_and_attribute_values(# thencontent = get_graphql_content(response)- assert not content["data"]["attributeCreate"]["attributeErrors"]+ assert not content["data"]["attributeCreate"]["errors"]data = content["data"]["attributeCreate"]# Check if the attribute was correctly created@@ -318,7 +318,7 @@ def test_create_attribute_with_file_input_type_and_values(# thencontent = get_graphql_content(response)data = content["data"]["attributeCreate"]- errors = data["attributeErrors"]+ errors = data["errors"]assert not data["attribute"]assert len(errors) == 1@@ -359,7 +359,7 @@ def test_create_attribute_with_file_input_type_correct_attribute_settings(# thencontent = get_graphql_content(response)- assert not content["data"]["attributeCreate"]["attributeErrors"]+ assert not content["data"]["attributeCreate"]["errors"]data = content["data"]["attributeCreate"]# Check if the attribute was correctly created@@ -411,7 +411,7 @@ def test_create_attribute_with_file_input_type_and_invalid_settings(# thencontent = get_graphql_content(response)data = content["data"]["attributeCreate"]- errors = data["attributeErrors"]+ errors = data["errors"]assert not data["attribute"]assert len(errors) == 4@@ -464,7 +464,7 @@ def test_create_attribute_with_reference_input_type_invalid_settings(# thencontent = get_graphql_content(response)data = content["data"]["attributeCreate"]- errors = data["attributeErrors"]+ errors = data["errors"]assert not data["attribute"]assert len(errors) == 4@@ -519,7 +519,7 @@ def test_create_attribute_with_file_input_type_and_invalid_one_settings_value(# thencontent = get_graphql_content(response)data = content["data"]["attributeCreate"]- errors = data["attributeErrors"]+ errors = data["errors"]assert not data["attribute"]assert len(errors) == 1@@ -570,7 +570,7 @@ def test_create_attribute_with_reference_input_type_invalid_one_settings_value(# thencontent = get_graphql_content(response)data = content["data"]["attributeCreate"]- errors = data["attributeErrors"]+ errors = data["errors"]assert not data["attribute"]assert len(errors) == 1@@ -615,7 +615,7 @@ def test_create_attribute_with_reference_input_type_values_given(# thencontent = get_graphql_content(response)data = content["data"]["attributeCreate"]- errors = data["attributeErrors"]+ errors = data["errors"]assert not data["attribute"]assert len(errors) == 1@@ -647,7 +647,7 @@ def test_create_attribute_with_given_slug(mutation createAttribute($name: String!, $slug: String, $type: AttributeTypeEnum!) {attributeCreate(input: {name: $name, slug: $slug, type: $type}) {- attributeErrors {+ errors {fieldmessagecode@@ -670,7 +670,7 @@ def test_create_attribute_with_given_slug(content = get_graphql_content(staff_api_client.post_graphql(query, variables))# then- assert not content["data"]["attributeCreate"]["attributeErrors"]+ assert not content["data"]["attributeCreate"]["errors"]assert content["data"]["attributeCreate"]["attribute"]["slug"] == expected_slug@@ -704,7 +704,7 @@ def test_create_attribute_value_name_and_slug_with_unicode(# thencontent = get_graphql_content(response)data = content["data"]["attributeCreate"]- assert not data["attributeErrors"]+ assert not data["errors"]assert data["attribute"]["name"] == nameassert data["attribute"]["slug"] == slug@@ -758,7 +758,7 @@ def test_create_attribute_and_attribute_values_errors(# thencontent = get_graphql_content(response)- errors = content["data"]["attributeCreate"]["attributeErrors"]+ errors = content["data"]["attributeCreate"]["errors"]assert errorsassert errors[0]["field"] == "values"assert errors[0]["message"] == error_msgdiff --git a/saleor/graphql/attribute/tests/mutations/test_attribute_update.py b/saleor/graphql/attribute/tests/mutations/test_attribute_update.pyindex c670fa1f54..965a0e2959 100644--- a/saleor/graphql/attribute/tests/mutations/test_attribute_update.py+++ b/saleor/graphql/attribute/tests/mutations/test_attribute_update.py@@ -12,7 +12,7 @@ UPDATE_ATTRIBUTE_MUTATION = """attributeUpdate(id: $id,input: $input) {- attributeErrors {+ errors {fieldmessagecode@@ -94,7 +94,7 @@ def test_update_attribute_remove_and_add_values(content = get_graphql_content(response)attribute.refresh_from_db()data = content["data"]["attributeUpdate"]- assert not data["attributeErrors"]+ assert not data["errors"]assert data["attribute"]["name"] == name == attribute.nameassert not attribute.values.filter(pk=attribute_value_id).exists()assert attribute.values.filter(name=attribute_value_name).exists()@@ -157,7 +157,7 @@ def test_update_attribute_with_file_input_type(content = get_graphql_content(response)attribute.refresh_from_db()data = content["data"]["attributeUpdate"]- assert not data["attributeErrors"]+ assert not data["errors"]assert data["attribute"]["name"] == name == attribute.name@@ -191,7 +191,7 @@ def test_update_attribute_with_file_input_type_and_values(content = get_graphql_content(response)attribute.refresh_from_db()data = content["data"]["attributeUpdate"]- errors = data["attributeErrors"]+ errors = data["errors"]assert not data["attribute"]assert len(errors) == 1assert errors[0]["field"] == "addValues"@@ -231,7 +231,7 @@ def test_update_attribute_with_file_input_type_invalid_settings(content = get_graphql_content(response)attribute.refresh_from_db()data = content["data"]["attributeUpdate"]- errors = data["attributeErrors"]+ errors = data["errors"]assert not data["attribute"]assert len(errors) == 4assert {error["field"] for error in errors} == {@@ -250,7 +250,7 @@ UPDATE_ATTRIBUTE_SLUG_MUTATION = """id: $id,input: {slug: $slug}) {- attributeErrors {+ errors {fieldmessagecode@@ -301,7 +301,7 @@ def test_update_attribute_slug(content = get_graphql_content(response)attribute.refresh_from_db()data = content["data"]["attributeUpdate"]- errors = data["attributeErrors"]+ errors = data["errors"]if not error_message:assert data["attribute"]["name"] == name == attribute.nameassert data["attribute"]["slug"] == input_slug == attribute.slug@@ -343,7 +343,7 @@ def test_update_attribute_slug_exists(content = get_graphql_content(response)attribute.refresh_from_db()data = content["data"]["attributeUpdate"]- errors = data["attributeErrors"]+ errors = data["errors"]assert errorsassert data["attribute"] is None@@ -380,7 +380,7 @@ def test_update_attribute_slug_and_name(id: $id,input: {slug: $slug, name: $name}) {- attributeErrors {+ errors {fieldmessagecode@@ -412,7 +412,7 @@ def test_update_attribute_slug_and_name(content = get_graphql_content(response)attribute.refresh_from_db()data = content["data"]["attributeUpdate"]- errors = data["attributeErrors"]+ errors = data["errors"]if not error_message:assert data["attribute"]["name"] == input_name == attribute.nameassert data["attribute"]["slug"] == input_slug == attribute.slug@@ -468,7 +468,7 @@ def test_update_attribute_and_add_attribute_values_errors(# thencontent = get_graphql_content(response)- errors = content["data"]["attributeUpdate"]["attributeErrors"]+ errors = content["data"]["attributeUpdate"]["errors"]assert errorsassert errors[0]["field"] == "addValues"assert errors[0]["message"] == error_msg@@ -499,7 +499,7 @@ def test_update_attribute_and_remove_others_attribute_value(# thencontent = get_graphql_content(response)- errors = content["data"]["attributeUpdate"]["attributeErrors"]+ errors = content["data"]["attributeUpdate"]["errors"]assert errorsassert errors[0]["field"] == "removeValues"assert errors[0]["code"] == AttributeErrorCode.INVALID.namediff --git a/saleor/graphql/attribute/tests/mutations/test_attribute_value_create.py b/saleor/graphql/attribute/tests/mutations/test_attribute_value_create.pyindex 35367a3fb6..261e9d324f 100644--- a/saleor/graphql/attribute/tests/mutations/test_attribute_value_create.py+++ b/saleor/graphql/attribute/tests/mutations/test_attribute_value_create.py@@ -30,7 +30,7 @@ CREATE_ATTRIBUTE_VALUE_MUTATION = """$attributeId: ID!, $name: String!, $value: String) {attributeValueCreate(attribute: $attributeId, input: {name: $name, value: $value}) {- attributeErrors {+ errors {fieldmessagecode@@ -69,7 +69,7 @@ def test_create_attribute_value(# thencontent = get_graphql_content(response)data = content["data"]["attributeValueCreate"]- assert not data["attributeErrors"]+ assert not data["errors"]attr_data = data["attributeValue"]assert attr_data["name"] == name@@ -96,9 +96,9 @@ def test_create_attribute_value_not_unique_name(# thencontent = get_graphql_content(response)data = content["data"]["attributeValueCreate"]- assert data["attributeErrors"]- assert data["attributeErrors"][0]["code"] == AttributeErrorCode.ALREADY_EXISTS.name- assert data["attributeErrors"][0]["field"] == "name"+ assert data["errors"]+ assert data["errors"][0]["code"] == AttributeErrorCode.ALREADY_EXISTS.name+ assert data["errors"][0]["field"] == "name"def test_create_attribute_value_capitalized_name(@@ -119,6 +119,6 @@ def test_create_attribute_value_capitalized_name(# thencontent = get_graphql_content(response)data = content["data"]["attributeValueCreate"]- assert data["attributeErrors"]- assert data["attributeErrors"][0]["code"] == AttributeErrorCode.ALREADY_EXISTS.name- assert data["attributeErrors"][0]["field"] == "name"+ assert data["errors"]+ assert data["errors"][0]["code"] == AttributeErrorCode.ALREADY_EXISTS.name+ assert data["errors"][0]["field"] == "name"diff --git a/saleor/graphql/attribute/tests/mutations/test_attribute_value_update.py b/saleor/graphql/attribute/tests/mutations/test_attribute_value_update.pyindex 04a32526e6..3fccb08644 100644--- a/saleor/graphql/attribute/tests/mutations/test_attribute_value_update.py+++ b/saleor/graphql/attribute/tests/mutations/test_attribute_value_update.py@@ -9,7 +9,7 @@ mutation AttributeValueUpdate($id: ID!, $name: String!) {attributeValueUpdate(id: $id, input: {name: $name}) {- attributeErrors {+ errors {fieldmessagecode@@ -75,7 +75,7 @@ def test_update_attribute_value_name_not_unique(# thencontent = get_graphql_content(response)data = content["data"]["attributeValueUpdate"]- assert data["attributeErrors"]- assert data["attributeErrors"][0]["message"]- assert data["attributeErrors"][0]["field"] == "name"- assert data["attributeErrors"][0]["code"] == AttributeErrorCode.ALREADY_EXISTS.name+ assert data["errors"]+ assert data["errors"][0]["message"]+ assert data["errors"][0]["field"] == "name"+ assert data["errors"][0]["code"] == AttributeErrorCode.ALREADY_EXISTS.namediff --git a/saleor/graphql/attribute/types.py b/saleor/graphql/attribute/types.pyindex 50ee230259..948b51278b 100644--- a/saleor/graphql/attribute/types.py+++ b/saleor/graphql/attribute/types.py@@ -171,13 +171,6 @@ class SelectedAttribute(graphene.ObjectType):class AttributeInput(graphene.InputObjectType):slug = graphene.String(required=True, description=AttributeDescriptions.SLUG)- value = graphene.String(- required=False,- description=(- "[Deprecated] Internal representation of a value (unique per attribute). "- "This field will be removed after 2020-07-31."- ),- ) # deprecatedvalues = graphene.List(graphene.String, required=False, description=AttributeValueDescriptions.SLUG)diff --git a/saleor/graphql/channel/tests/test_channel_availability.py b/saleor/graphql/channel/tests/test_channel_availability.pyindex e284dbd4cc..dd7d3ec4c6 100644--- a/saleor/graphql/channel/tests/test_channel_availability.py+++ b/saleor/graphql/channel/tests/test_channel_availability.py@@ -11,7 +11,7 @@ CHANNEL_ACTIVATE_MUTATION = """nameisActive}- channelErrors{+ errors{fieldcodemessage@@ -40,7 +40,7 @@ def test_channel_activate_mutation(# thendata = content["data"]["channelActivate"]- assert not data["channelErrors"]+ assert not data["errors"]assert data["channel"]["name"] == channel_USD.nameassert data["channel"]["isActive"] is True@@ -62,8 +62,8 @@ def test_channel_activate_mutation_on_activated_channel(# thendata = content["data"]["channelActivate"]- assert data["channelErrors"][0]["field"] == "id"- assert data["channelErrors"][0]["code"] == ChannelErrorCode.INVALID.name+ assert data["errors"][0]["field"] == "id"+ assert data["errors"][0]["code"] == ChannelErrorCode.INVALID.nameCHANNEL_DEACTIVATE_MUTATION = """@@ -74,7 +74,7 @@ CHANNEL_DEACTIVATE_MUTATION = """nameisActive}- channelErrors{+ errors{fieldcodemessage@@ -101,7 +101,7 @@ def test_channel_deactivate_mutation(# thendata = content["data"]["channelDeactivate"]- assert not data["channelErrors"]+ assert not data["errors"]assert data["channel"]["name"] == channel_USD.nameassert data["channel"]["isActive"] is False@@ -125,5 +125,5 @@ def test_channel_deactivate_mutation_on_deactivated_channel(# thendata = content["data"]["channelDeactivate"]- assert data["channelErrors"][0]["field"] == "id"- assert data["channelErrors"][0]["code"] == ChannelErrorCode.INVALID.name+ assert data["errors"][0]["field"] == "id"+ assert data["errors"][0]["code"] == ChannelErrorCode.INVALID.namediff --git a/saleor/graphql/channel/tests/test_channel_create_mutations.py b/saleor/graphql/channel/tests/test_channel_create_mutations.pyindex 0904cf1798..f1375f3380 100644--- a/saleor/graphql/channel/tests/test_channel_create_mutations.py+++ b/saleor/graphql/channel/tests/test_channel_create_mutations.py@@ -17,7 +17,7 @@ CHANNEL_CREATE_MUTATION = """id}}- channelErrors{+ errors{fieldcodemessage@@ -47,7 +47,7 @@ def test_channel_create_mutation_as_staff_user(# thendata = content["data"]["channelCreate"]- assert not data["channelErrors"]+ assert not data["errors"]channel_data = data["channel"]channel = Channel.objects.get()assert channel_data["name"] == channel.name == name@@ -75,7 +75,7 @@ def test_channel_create_mutation_as_app(# thendata = content["data"]["channelCreate"]- assert not data["channelErrors"]+ assert not data["errors"]channel_data = data["channel"]channel = Channel.objects.get()assert channel_data["name"] == channel.name == name@@ -160,7 +160,7 @@ def test_channel_create_mutation_with_duplicated_slug(content = get_graphql_content(response)# then- error = content["data"]["channelCreate"]["channelErrors"][0]+ error = content["data"]["channelCreate"]["errors"][0]assert error["field"] == "slug"assert error["code"] == ChannelErrorCode.UNIQUE.name@@ -196,7 +196,7 @@ def test_channel_create_mutation_with_shipping_zones(# thendata = content["data"]["channelCreate"]- assert not data["channelErrors"]+ assert not data["errors"]channel_data = data["channel"]channel = Channel.objects.get(id=graphene.Node.from_global_id(channel_data["id"])[1]diff --git a/saleor/graphql/channel/tests/test_channel_delete_mutations.py b/saleor/graphql/channel/tests/test_channel_delete_mutations.pyindex e5013a58f7..f73fd69cc5 100644--- a/saleor/graphql/channel/tests/test_channel_delete_mutations.py+++ b/saleor/graphql/channel/tests/test_channel_delete_mutations.py@@ -15,7 +15,7 @@ CHANNEL_DELETE_MUTATION = """slugcurrencyCode}- channelErrors{+ errors{fieldcodemessage@@ -71,7 +71,7 @@ def test_channel_delete_mutation_with_the_same_channel_and_target_channel_id(permissions=(permission_manage_channels,),)content = get_graphql_content(response)- error = content["data"]["channelDelete"]["channelErrors"][0]+ error = content["data"]["channelDelete"]["errors"][0]assert error["field"] == "targetChannel"assert error["code"] == ChannelErrorCode.CHANNEL_TARGET_ID_MUST_BE_DIFFERENT.name@@ -100,7 +100,7 @@ def test_channel_delete_mutation_without_migration_channel_with_orders(content = get_graphql_content(response)# then- error = content["data"]["channelDelete"]["channelErrors"][0]+ error = content["data"]["channelDelete"]["errors"][0]assert error["field"] == "id"assert error["code"] == ChannelErrorCode.CHANNEL_WITH_ORDERS.nameassert Channel.objects.filter(slug=channel_USD.slug).exists()@@ -128,7 +128,7 @@ def test_channel_delete_mutation_without_orders_in_channel(content = get_graphql_content(response)# then- assert not content["data"]["channelDelete"]["channelErrors"]+ assert not content["data"]["channelDelete"]["errors"]assert Checkout.objects.first() is Noneassert not Channel.objects.filter(slug=channel_USD.slug).exists()@@ -148,7 +148,7 @@ def test_channel_delete_mutation_with_different_currency(permissions=(permission_manage_channels,),)content = get_graphql_content(response)- error = content["data"]["channelDelete"]["channelErrors"][0]+ error = content["data"]["channelDelete"]["errors"][0]assert error["field"] == "targetChannel"assert error["code"] == ChannelErrorCode.CHANNELS_CURRENCY_MUST_BE_THE_SAME.namediff --git a/saleor/graphql/channel/tests/test_channel_update_mutations.py b/saleor/graphql/channel/tests/test_channel_update_mutations.pyindex e30449bdc2..1a07567863 100644--- a/saleor/graphql/channel/tests/test_channel_update_mutations.py+++ b/saleor/graphql/channel/tests/test_channel_update_mutations.py@@ -18,7 +18,7 @@ CHANNEL_UPDATE_MUTATION = """id}}- channelErrors{+ errors{fieldcodemessage@@ -48,7 +48,7 @@ def test_channel_update_mutation_as_staff_user(# thendata = content["data"]["channelUpdate"]- assert not data["channelErrors"]+ assert not data["errors"]channel_data = data["channel"]channel_USD.refresh_from_db()assert channel_data["name"] == channel_USD.name == name@@ -75,7 +75,7 @@ def test_channel_update_mutation_as_app(# thendata = content["data"]["channelUpdate"]- assert not data["channelErrors"]+ assert not data["errors"]channel_data = data["channel"]channel_USD.refresh_from_db()assert channel_data["name"] == channel_USD.name == name@@ -159,7 +159,7 @@ def test_channel_update_mutation_with_duplicated_slug(content = get_graphql_content(response)# then- error = content["data"]["channelUpdate"]["channelErrors"][0]+ error = content["data"]["channelUpdate"]["errors"][0]assert error["field"] == "slug"assert error["code"] == ChannelErrorCode.UNIQUE.name@@ -183,7 +183,7 @@ def test_channel_update_mutation_only_name(# thendata = content["data"]["channelUpdate"]- assert not data["channelErrors"]+ assert not data["errors"]channel_data = data["channel"]channel_USD.refresh_from_db()assert channel_data["name"] == channel_USD.name == name@@ -210,7 +210,7 @@ def test_channel_update_mutation_only_slug(# thendata = content["data"]["channelUpdate"]- assert not data["channelErrors"]+ assert not data["errors"]channel_data = data["channel"]channel_USD.refresh_from_db()assert channel_data["name"] == channel_USD.name == name@@ -241,7 +241,7 @@ def test_channel_update_mutation_add_shipping_zone(# thendata = content["data"]["channelUpdate"]- assert not data["channelErrors"]+ assert not data["errors"]channel_data = data["channel"]channel_USD.refresh_from_db()assert channel_data["name"] == channel_USD.name == name@@ -292,7 +292,7 @@ def test_channel_update_mutation_remove_shipping_zone(# thendata = content["data"]["channelUpdate"]- assert not data["channelErrors"]+ assert not data["errors"]channel_data = data["channel"]channel_USD.refresh_from_db()assert channel_data["name"] == channel_USD.name == name@@ -345,7 +345,7 @@ def test_channel_update_mutation_add_and_remove_shipping_zone(# thendata = content["data"]["channelUpdate"]- assert not data["channelErrors"]+ assert not data["errors"]channel_data = data["channel"]channel_USD.refresh_from_db()assert channel_data["name"] == channel_USD.name == name@@ -394,7 +394,7 @@ def test_channel_update_mutation_duplicated_shipping_zone(# thendata = content["data"]["channelUpdate"]assert not data["channel"]- errors = data["channelErrors"]+ errors = data["errors"]assert len(errors) == 1assert errors[0]["field"] == "shippingZones"assert errors[0]["code"] == ChannelErrorCode.DUPLICATED_INPUT_ITEM.namediff --git a/saleor/graphql/checkout/mutations.py b/saleor/graphql/checkout/mutations.pyindex 4fdfe68713..f5af437c90 100644--- a/saleor/graphql/checkout/mutations.py+++ b/saleor/graphql/checkout/mutations.py@@ -547,14 +547,6 @@ class CheckoutCustomerAttach(BaseMutation):class Arguments:checkout_id = graphene.ID(required=True, description="ID of the checkout.")- customer_id = graphene.ID(- required=False,- description=(- "[Deprecated] The ID of the customer. To identify a customer you "- "should authenticate with JWT. This field will be removed after "- "2020-07-31."- ),- )class Meta:description = "Sets the customer as the owner of the checkout."@@ -571,14 +563,6 @@ class CheckoutCustomerAttach(BaseMutation):info, checkout_id, only_type=Checkout, field="checkout_id")- # Check if provided customer_id matches with the authenticated user and raise- # error if it doesn't. This part can be removed when `customer_id` field is- # removed.- if customer_id:- current_user_id = graphene.Node.to_global_id("User", info.context.user.id)- if current_user_id != customer_id:- raise PermissionDenied()-checkout.user = info.context.usercheckout.save(update_fields=["user", "last_change"])diff --git a/saleor/graphql/checkout/tests/benchmark/test_checkout_mutations.py b/saleor/graphql/checkout/tests/benchmark/test_checkout_mutations.pyindex 2decfd1f6a..3a232c4d3a 100644--- a/saleor/graphql/checkout/tests/benchmark/test_checkout_mutations.py+++ b/saleor/graphql/checkout/tests/benchmark/test_checkout_mutations.py@@ -458,7 +458,7 @@ def test_checkout_voucher_code(fieldmessage}- checkoutErrors {+ errors {fieldmessagecode@@ -593,7 +593,7 @@ COMPLETE_CHECKOUT_MUTATION = (+ """mutation completeCheckout($checkoutId: ID!) {checkoutComplete(checkoutId: $checkoutId) {- checkoutErrors {+ errors {codefieldmessage@@ -620,7 +620,7 @@ def test_complete_checkout(api_client, checkout_with_charged_payment, count_quer}response = get_graphql_content(api_client.post_graphql(query, variables))- assert not response["data"]["checkoutComplete"]["checkoutErrors"]+ assert not response["data"]["checkoutComplete"]["errors"]@pytest.mark.django_db@@ -638,7 +638,7 @@ def test_complete_checkout_with_single_line(}response = get_graphql_content(api_client.post_graphql(query, variables))- assert not response["data"]["checkoutComplete"]["checkoutErrors"]+ assert not response["data"]["checkoutComplete"]["errors"]@pytest.mark.django_db@@ -655,4 +655,4 @@ def test_customer_complete_checkout(}response = get_graphql_content(api_client.post_graphql(query, variables))- assert not response["data"]["checkoutComplete"]["checkoutErrors"]+ assert not response["data"]["checkoutComplete"]["errors"]diff --git a/saleor/graphql/checkout/tests/test_checkout.py b/saleor/graphql/checkout/tests/test_checkout.pyindex 4cb1829068..2fd23fc489 100644--- a/saleor/graphql/checkout/tests/test_checkout.py+++ b/saleor/graphql/checkout/tests/test_checkout.py@@ -119,7 +119,7 @@ MUTATION_CHECKOUT_CREATE = """quantity}}- checkoutErrors {+ errors {fieldmessagecode@@ -213,7 +213,7 @@ def test_checkout_create_with_inactive_channel(response = api_client.post_graphql(MUTATION_CHECKOUT_CREATE, variables)- error = get_graphql_content(response)["data"]["checkoutCreate"]["checkoutErrors"][0]+ error = get_graphql_content(response)["data"]["checkoutCreate"]["errors"][0]assert error["field"] == "channel"assert error["code"] == CheckoutErrorCode.CHANNEL_INACTIVE.name@@ -239,7 +239,7 @@ def test_checkout_create_with_unavailable_variant(response = api_client.post_graphql(MUTATION_CHECKOUT_CREATE, variables)- error = get_graphql_content(response)["data"]["checkoutCreate"]["checkoutErrors"][0]+ error = get_graphql_content(response)["data"]["checkoutCreate"]["errors"][0]assert error["field"] == "lines"assert error["code"] == CheckoutErrorCode.UNAVAILABLE_VARIANT_IN_CHANNEL.name@@ -334,7 +334,7 @@ def test_checkout_create_with_inactive_and_two_active_default_channel(response = api_client.post_graphql(MUTATION_CHECKOUT_CREATE, variables)- error = get_graphql_content(response)["data"]["checkoutCreate"]["checkoutErrors"][0]+ error = get_graphql_content(response)["data"]["checkoutCreate"]["errors"][0]assert error["field"] == "channel"assert error["code"] == CheckoutErrorCode.MISSING_CHANNEL_SLUG.name@@ -357,7 +357,7 @@ def test_checkout_create_with_many_active_default_channel(response = api_client.post_graphql(MUTATION_CHECKOUT_CREATE, variables)- error = get_graphql_content(response)["data"]["checkoutCreate"]["checkoutErrors"][0]+ error = get_graphql_content(response)["data"]["checkoutCreate"]["errors"][0]assert error["field"] == "channel"assert error["code"] == CheckoutErrorCode.MISSING_CHANNEL_SLUG.name@@ -384,7 +384,7 @@ def test_checkout_create_with_many_inactive_default_channel(response = api_client.post_graphql(MUTATION_CHECKOUT_CREATE, variables)- error = get_graphql_content(response)["data"]["checkoutCreate"]["checkoutErrors"][0]+ error = get_graphql_content(response)["data"]["checkoutCreate"]["errors"][0]assert error["field"] == "channel"assert error["code"] == CheckoutErrorCode.MISSING_CHANNEL_SLUG.name@@ -407,7 +407,7 @@ def test_checkout_create_with_multiple_channel_without_channel_slug(response = api_client.post_graphql(MUTATION_CHECKOUT_CREATE, variables)- error = get_graphql_content(response)["data"]["checkoutCreate"]["checkoutErrors"][0]+ error = get_graphql_content(response)["data"]["checkoutCreate"]["errors"][0]assert error["field"] == "channel"assert error["code"] == CheckoutErrorCode.MISSING_CHANNEL_SLUG.name@@ -494,7 +494,7 @@ def test_checkout_create_with_inactive_channel_slug(}response = api_client.post_graphql(MUTATION_CHECKOUT_CREATE, variables)- error = get_graphql_content(response)["data"]["checkoutCreate"]["checkoutErrors"][0]+ error = get_graphql_content(response)["data"]["checkoutCreate"]["errors"][0]assert error["field"] == "channel"assert error["code"] == CheckoutErrorCode.CHANNEL_INACTIVE.name@@ -563,7 +563,7 @@ def test_checkout_create_with_invalid_channel_slug(}response = api_client.post_graphql(MUTATION_CHECKOUT_CREATE, variables)content = get_graphql_content(response)["data"]["checkoutCreate"]- error = content["checkoutErrors"][0]+ error = content["errors"][0]assert error["code"] == CheckoutErrorCode.NOT_FOUND.nameassert error["field"] == "channel"@@ -592,7 +592,7 @@ def test_checkout_create_no_channel_shipping_zones(new_checkout = Checkout.objects.first()assert new_checkout is None- errors = content["checkoutErrors"]+ errors = content["errors"]assert len(errors) == 1assert errors[0]["code"] == CheckoutErrorCode.INSUFFICIENT_STOCK.nameassert errors[0]["field"] == "quantity"@@ -737,8 +737,8 @@ def test_checkout_create_cannot_add_invalid_quantities(assert not Checkout.objects.exists()response = api_client.post_graphql(MUTATION_CHECKOUT_CREATE, variables)content = get_graphql_content(response)["data"]["checkoutCreate"]- assert content["checkoutErrors"]- assert content["checkoutErrors"] == [+ assert content["errors"]+ assert content["errors"] == [{"field": "quantity","message": expected_error_message,@@ -790,12 +790,12 @@ def test_checkout_create_required_email(api_client, stock, channel_USD):response = api_client.post_graphql(MUTATION_CHECKOUT_CREATE, variables)content = get_graphql_content(response)- errors = content["data"]["checkoutCreate"]["checkoutErrors"]+ errors = content["data"]["checkoutCreate"]["errors"]assert errorsassert errors[0]["field"] == "email"assert errors[0]["message"] == "This field cannot be blank."- checkout_errors = content["data"]["checkoutCreate"]["checkoutErrors"]+ checkout_errors = content["data"]["checkoutCreate"]["errors"]assert checkout_errors[0]["code"] == CheckoutErrorCode.REQUIRED.name@@ -818,7 +818,7 @@ def test_checkout_create_required_country_shipping_address(response = api_client.post_graphql(MUTATION_CHECKOUT_CREATE, variables)content = get_graphql_content(response)- checkout_errors = content["data"]["checkoutCreate"]["checkoutErrors"]+ checkout_errors = content["data"]["checkoutCreate"]["errors"]assert checkout_errors[0]["field"] == "country"assert checkout_errors[0]["code"] == CheckoutErrorCode.REQUIRED.name@@ -842,7 +842,7 @@ def test_checkout_create_required_country_billing_address(response = api_client.post_graphql(MUTATION_CHECKOUT_CREATE, variables)content = get_graphql_content(response)- checkout_errors = content["data"]["checkoutCreate"]["checkoutErrors"]+ checkout_errors = content["data"]["checkoutCreate"]["errors"]assert checkout_errors[0]["field"] == "country"assert checkout_errors[0]["code"] == CheckoutErrorCode.REQUIRED.name@@ -983,10 +983,10 @@ def test_checkout_create_check_lines_quantity_multiple_warehouse(response = user_api_client.post_graphql(MUTATION_CHECKOUT_CREATE, variables)content = get_graphql_content(response)data = content["data"]["checkoutCreate"]- assert data["checkoutErrors"][0]["message"] == (+ assert data["errors"][0]["message"] == ("Could not add items SKU_A. Only 7 remaining in stock.")- assert data["checkoutErrors"][0]["field"] == "quantity"+ assert data["errors"][0]["field"] == "quantity"@override_settings(DEFAULT_COUNTRY="DE")@@ -1053,7 +1053,7 @@ def test_checkout_create_check_lines_quantity_for_zone_insufficient_stocks(content = get_graphql_content(response)data = content["data"]["checkoutCreate"]assert not data["checkout"]- errors = data["checkoutErrors"]+ errors = data["errors"]assert errors[0]["code"] == CheckoutErrorCode.INSUFFICIENT_STOCK.nameassert errors[0]["field"] == "quantity"@@ -1077,10 +1077,10 @@ def test_checkout_create_check_lines_quantity(response = user_api_client.post_graphql(MUTATION_CHECKOUT_CREATE, variables)content = get_graphql_content(response)data = content["data"]["checkoutCreate"]- assert data["checkoutErrors"][0]["message"] == (+ assert data["errors"][0]["message"] == ("Could not add items SKU_A. Only 15 remaining in stock.")- assert data["checkoutErrors"][0]["field"] == "quantity"+ assert data["errors"][0]["field"] == "quantity"def test_checkout_create_unavailable_for_purchase_product(@@ -1112,7 +1112,7 @@ def test_checkout_create_unavailable_for_purchase_product(content = get_graphql_content(response)data = content["data"]["checkoutCreate"]- errors = data["checkoutErrors"]+ errors = data["errors"]assert len(errors) == 1assert errors[0]["field"] == "lines"assert errors[0]["code"] == CheckoutErrorCode.PRODUCT_UNAVAILABLE_FOR_PURCHASE.name@@ -1150,7 +1150,7 @@ def test_checkout_create_available_for_purchase_from_tomorrow_product(content = get_graphql_content(response)data = content["data"]["checkoutCreate"]- errors = data["checkoutErrors"]+ errors = data["errors"]assert len(errors) == 1assert errors[0]["field"] == "lines"assert errors[0]["code"] == CheckoutErrorCode.PRODUCT_UNAVAILABLE_FOR_PURCHASE.name@@ -1445,7 +1445,7 @@ MUTATION_CHECKOUT_LINES_ADD = """}}}- checkoutErrors {+ errors {fieldcodemessage@@ -1478,7 +1478,7 @@ def test_checkout_lines_add(response = user_api_client.post_graphql(MUTATION_CHECKOUT_LINES_ADD, variables)content = get_graphql_content(response)data = content["data"]["checkoutLinesAdd"]- assert not data["checkoutErrors"]+ assert not data["errors"]checkout.refresh_from_db()line = checkout.lines.latest("pk")assert line.variant == variant@@ -1511,7 +1511,7 @@ def test_checkout_lines_add_with_unavailable_variant(}response = user_api_client.post_graphql(MUTATION_CHECKOUT_LINES_ADD, variables)content = get_graphql_content(response)- errors = content["data"]["checkoutLinesAdd"]["checkoutErrors"]+ errors = content["data"]["checkoutLinesAdd"]["errors"]assert errors[0]["code"] == CheckoutErrorCode.UNAVAILABLE_VARIANT_IN_CHANNEL.nameassert errors[0]["field"] == "lines"assert errors[0]["variants"] == [variant_id]@@ -1537,7 +1537,7 @@ def test_checkout_lines_add_no_channel_shipping_zones(content = get_graphql_content(response)data = content["data"]["checkoutLinesAdd"]- errors = data["checkoutErrors"]+ errors = data["errors"]assert len(errors) == 1assert errors[0]["code"] == CheckoutErrorCode.INSUFFICIENT_STOCK.nameassert errors[0]["field"] == "quantity"@@ -1564,7 +1564,7 @@ def test_checkout_lines_add_with_unpublished_product(response = user_api_client.post_graphql(MUTATION_CHECKOUT_LINES_ADD, variables)content = get_graphql_content(response)- error = content["data"]["checkoutLinesAdd"]["checkoutErrors"][0]+ error = content["data"]["checkoutLinesAdd"]["errors"][0]assert error["code"] == CheckoutErrorCode.PRODUCT_NOT_PUBLISHED.name@@ -1589,7 +1589,7 @@ def test_checkout_lines_add_with_unavailable_for_purchase_product(# thencontent = get_graphql_content(response)- error = content["data"]["checkoutLinesAdd"]["checkoutErrors"][0]+ error = content["data"]["checkoutLinesAdd"]["errors"][0]assert error["field"] == "lines"assert error["code"] == CheckoutErrorCode.PRODUCT_UNAVAILABLE_FOR_PURCHASE.nameassert error["variants"] == [variant_id]@@ -1618,7 +1618,7 @@ def test_checkout_lines_add_with_available_for_purchase_from_tomorrow_product(# thencontent = get_graphql_content(response)- error = content["data"]["checkoutLinesAdd"]["checkoutErrors"][0]+ error = content["data"]["checkoutLinesAdd"]["errors"][0]assert error["field"] == "lines"assert error["code"] == CheckoutErrorCode.PRODUCT_UNAVAILABLE_FOR_PURCHASE.nameassert error["variants"] == [variant_id]@@ -1637,8 +1637,8 @@ def test_checkout_lines_add_too_many(user_api_client, checkout_with_item, stock)response = user_api_client.post_graphql(MUTATION_CHECKOUT_LINES_ADD, variables)content = get_graphql_content(response)["data"]["checkoutLinesAdd"]- assert content["checkoutErrors"]- assert content["checkoutErrors"] == [+ assert content["errors"]+ assert content["errors"] == [{"field": "quantity","message": "Cannot add more than 50 times this item.",@@ -1660,7 +1660,7 @@ def test_checkout_lines_add_empty_checkout(user_api_client, checkout, stock):response = user_api_client.post_graphql(MUTATION_CHECKOUT_LINES_ADD, variables)content = get_graphql_content(response)data = content["data"]["checkoutLinesAdd"]- assert not data["checkoutErrors"]+ assert not data["errors"]checkout.refresh_from_db()line = checkout.lines.first()assert line.variant == variant@@ -1681,7 +1681,7 @@ def test_checkout_lines_add_variant_without_inventory_tracking(response = user_api_client.post_graphql(MUTATION_CHECKOUT_LINES_ADD, variables)content = get_graphql_content(response)data = content["data"]["checkoutLinesAdd"]- assert not data["checkoutErrors"]+ assert not data["errors"]checkout.refresh_from_db()line = checkout.lines.first()assert line.variant == variant@@ -1700,10 +1700,10 @@ def test_checkout_lines_add_check_lines_quantity(user_api_client, checkout, stocresponse = user_api_client.post_graphql(MUTATION_CHECKOUT_LINES_ADD, variables)content = get_graphql_content(response)data = content["data"]["checkoutLinesAdd"]- assert data["checkoutErrors"][0]["message"] == (+ assert data["errors"][0]["message"] == ("Could not add items SKU_A. Only 15 remaining in stock.")- assert data["checkoutErrors"][0]["field"] == "quantity"+ assert data["errors"][0]["field"] == "quantity"def test_checkout_lines_invalid_variant_id(user_api_client, checkout, stock):@@ -1723,8 +1723,8 @@ def test_checkout_lines_invalid_variant_id(user_api_client, checkout, stock):content = get_graphql_content(response)data = content["data"]["checkoutLinesAdd"]error_msg = "Could not resolve to a node with the global id list of '%s'."- assert data["checkoutErrors"][0]["message"] == error_msg % [invalid_variant_id]- assert data["checkoutErrors"][0]["field"] == "variantId"+ assert data["errors"][0]["message"] == error_msg % [invalid_variant_id]+ assert data["errors"][0]["field"] == "variantId"MUTATION_CHECKOUT_LINES_UPDATE = """@@ -1741,7 +1741,7 @@ MUTATION_CHECKOUT_LINES_UPDATE = """}}}- checkoutErrors {+ errors {fieldcodemessage@@ -1777,7 +1777,7 @@ def test_checkout_lines_update(content = get_graphql_content(response)data = content["data"]["checkoutLinesUpdate"]- assert not data["checkoutErrors"]+ assert not data["errors"]checkout.refresh_from_db()assert checkout.lines.count() == 1line = checkout.lines.first()@@ -1813,7 +1813,7 @@ def test_checkout_lines_update_with_unavailable_variant(response = user_api_client.post_graphql(MUTATION_CHECKOUT_LINES_UPDATE, variables)content = get_graphql_content(response)- errors = content["data"]["checkoutLinesUpdate"]["checkoutErrors"]+ errors = content["data"]["checkoutLinesUpdate"]["errors"]assert errors[0]["code"] == CheckoutErrorCode.UNAVAILABLE_VARIANT_IN_CHANNEL.nameassert errors[0]["field"] == "lines"assert errors[0]["variants"] == [variant_id]@@ -1839,7 +1839,7 @@ def test_checkout_lines_update_channel_without_shipping_zones(response = user_api_client.post_graphql(MUTATION_CHECKOUT_LINES_UPDATE, variables)content = get_graphql_content(response)data = content["data"]["checkoutLinesUpdate"]- errors = data["checkoutErrors"]+ errors = data["errors"]assert len(errors) == 1assert errors[0]["code"] == CheckoutErrorCode.INSUFFICIENT_STOCK.nameassert errors[0]["field"] == "quantity"@@ -1858,7 +1858,7 @@ def test_create_checkout_with_unpublished_product(query = """mutation CreateCheckout($checkoutInput: CheckoutCreateInput!) {checkoutCreate(input: $checkoutInput) {- checkoutErrors {+ errors {codemessage}@@ -1876,7 +1876,7 @@ def test_create_checkout_with_unpublished_product(}}response = get_graphql_content(user_api_client.post_graphql(query, variables))- error = response["data"]["checkoutCreate"]["checkoutErrors"][0]+ error = response["data"]["checkoutCreate"]["errors"][0]assert error["code"] == CheckoutErrorCode.PRODUCT_NOT_PUBLISHED.name@@ -1901,7 +1901,7 @@ def test_checkout_lines_update_with_unpublished_product(response = user_api_client.post_graphql(MUTATION_CHECKOUT_LINES_UPDATE, variables)content = get_graphql_content(response)- error = content["data"]["checkoutLinesUpdate"]["checkoutErrors"][0]+ error = content["data"]["checkoutLinesUpdate"]["errors"][0]assert error["code"] == CheckoutErrorCode.PRODUCT_NOT_PUBLISHED.name@@ -1910,7 +1910,7 @@ def test_checkout_lines_update_invalid_checkout_id(user_api_client):response = user_api_client.post_graphql(MUTATION_CHECKOUT_LINES_UPDATE, variables)content = get_graphql_content(response)data = content["data"]["checkoutLinesUpdate"]- assert data["checkoutErrors"][0]["field"] == "checkoutId"+ assert data["errors"][0]["field"] == "checkoutId"def test_checkout_lines_update_check_lines_quantity(@@ -1931,10 +1931,10 @@ def test_checkout_lines_update_check_lines_quantity(content = get_graphql_content(response)data = content["data"]["checkoutLinesUpdate"]- assert data["checkoutErrors"][0]["message"] == (+ assert data["errors"][0]["message"] == ("Could not add items 123. Only 10 remaining in stock.")- assert data["checkoutErrors"][0]["field"] == "quantity"+ assert data["errors"][0]["field"] == "quantity"def test_checkout_lines_update_with_chosen_shipping(@@ -1956,7 +1956,7 @@ def test_checkout_lines_update_with_chosen_shipping(content = get_graphql_content(response)data = content["data"]["checkoutLinesUpdate"]- assert not data["checkoutErrors"]+ assert not data["errors"]checkout.refresh_from_db()assert checkout.quantity == 1@@ -2037,7 +2037,7 @@ def test_checkout_line_delete_by_zero_quantity(content = get_graphql_content(response)data = content["data"]["checkoutLinesUpdate"]- assert not data["checkoutErrors"]+ assert not data["errors"]checkout.refresh_from_db()assert checkout.lines.count() == 0manager = get_plugins_manager()@@ -2053,9 +2053,8 @@ def test_checkout_customer_attach(assert checkout.user is Nonequery = """- mutation checkoutCustomerAttach($checkoutId: ID!, $customerId: ID!) {- checkoutCustomerAttach(- checkoutId: $checkoutId, customerId: $customerId) {+ mutation checkoutCustomerAttach($checkoutId: ID!) {+ checkoutCustomerAttach(checkoutId: $checkoutId) {checkout {token}@@ -2082,12 +2081,6 @@ def test_checkout_customer_attach(checkout.refresh_from_db()assert checkout.user == customer_user- # Mutation with ID of a different user should fail as well- other_customer = User.objects.create_user("[email protected]", "password")- variables["customerId"] = graphene.Node.to_global_id("User", other_customer.pk)- response = user_api_client.post_graphql(query, variables)- assert_no_permission(response)-MUTATION_CHECKOUT_CUSTOMER_DETACH = """mutation checkoutCustomerDetach($checkoutId: ID!) {@@ -2142,10 +2135,6 @@ MUTATION_CHECKOUT_SHIPPING_ADDRESS_UPDATE = """id},errors {- field,- message,- }- checkoutErrors {fieldmessagecode@@ -2282,7 +2271,7 @@ def test_checkout_shipping_address_update_insufficient_stocks()content = get_graphql_content(response)data = content["data"]["checkoutShippingAddressUpdate"]- errors = data["checkoutErrors"]+ errors = data["errors"]assert errors[0]["code"] == CheckoutErrorCode.INSUFFICIENT_STOCK.nameassert errors[0]["field"] == "quantity"@@ -2305,7 +2294,7 @@ def test_checkout_shipping_address_update_channel_without_shipping_zones()content = get_graphql_content(response)data = content["data"]["checkoutShippingAddressUpdate"]- errors = data["checkoutErrors"]+ errors = data["errors"]assert errors[0]["code"] == CheckoutErrorCode.INSUFFICIENT_STOCK.nameassert errors[0]["field"] == "quantity"@@ -2328,10 +2317,8 @@ def test_checkout_shipping_address_with_invalid_phone_number_returns_error(},))["data"]["checkoutShippingAddressUpdate"]+assert response["errors"] == [- {"field": "phone", "message": "'+33600000' is not a valid phone number."}- ]- assert response["checkoutErrors"] == [{"field": "phone","message": "'+33600000' is not a valid phone number.",@@ -2438,7 +2425,7 @@ CHECKOUT_EMAIL_UPDATE_MUTATION = """field,message}- checkoutErrors {+ errors {field,messagecode@@ -2476,7 +2463,7 @@ def test_checkout_email_update_validation(user_api_client, checkout_with_item):assert errors[0]["field"] == "email"assert errors[0]["message"] == "This field cannot be blank."- checkout_errors = content["data"]["checkoutEmailUpdate"]["checkoutErrors"]+ checkout_errors = content["data"]["checkoutEmailUpdate"]["errors"]assert checkout_errors[0]["code"] == CheckoutErrorCode.REQUIRED.name@@ -2838,7 +2825,7 @@ MUTATION_UPDATE_SHIPPING_METHOD = """$checkoutId:ID!, $shippingMethodId:ID!){checkoutShippingMethodUpdate(checkoutId:$checkoutId, shippingMethodId:$shippingMethodId) {- checkoutErrors {+ errors {fieldmessagecode@@ -2883,7 +2870,7 @@ def test_checkout_shipping_method_update(mock_clean_shipping.assert_called_once_with(checkout_info=checkout_info, lines=lines, method=shipping_method)- errors = data["checkoutErrors"]+ errors = data["errors"]if is_valid_shipping_method:assert not errorsassert data["checkout"]["id"] == checkout_id@@ -2921,7 +2908,7 @@ def test_checkout_shipping_method_update_excluded_postal_code(checkout.refresh_from_db()- errors = data["checkoutErrors"]+ errors = data["errors"]assert len(errors) == 1assert errors[0]["field"] == "shippingMethod"assert errors[0]["code"] == CheckoutErrorCode.SHIPPING_METHOD_NOT_APPLICABLE.name@@ -2954,7 +2941,7 @@ def test_checkout_shipping_method_update_shipping_zone_without_channel(checkout.refresh_from_db()- errors = data["checkoutErrors"]+ errors = data["errors"]assert len(errors) == 1assert errors[0]["field"] == "shippingMethod"assert errors[0]["code"] == CheckoutErrorCode.SHIPPING_METHOD_NOT_APPLICABLE.name@@ -2983,7 +2970,7 @@ def test_checkout_shipping_method_update_shipping_zone_with_channel(checkout.refresh_from_db()checkout.refresh_from_db()- errors = data["checkoutErrors"]+ errors = data["errors"]assert not errorsassert data["checkout"]["id"] == checkout_iddiff --git a/saleor/graphql/checkout/tests/test_checkout_complete.py b/saleor/graphql/checkout/tests/test_checkout_complete.pyindex e344f472f9..0e03166baa 100644--- a/saleor/graphql/checkout/tests/test_checkout_complete.py+++ b/saleor/graphql/checkout/tests/test_checkout_complete.py@@ -27,7 +27,7 @@ MUTATION_CHECKOUT_COMPLETE = """id,token},- checkoutErrors {+ errors {field,message,variants,@@ -79,7 +79,7 @@ def test_checkout_complete_order_already_exists(content = get_graphql_content(response)data = content["data"]["checkoutComplete"]- assert not data["checkoutErrors"]+ assert not data["errors"]order_token = data["order"]["token"]assert Order.objects.count() == orders_count@@ -105,8 +105,8 @@ def test_checkout_complete_with_inactive_channel_order_already_exists(content = get_graphql_content(response)data = content["data"]["checkoutComplete"]- assert data["checkoutErrors"][0]["code"] == CheckoutErrorCode.CHANNEL_INACTIVE.name- assert data["checkoutErrors"][0]["field"] == "channel"+ assert data["errors"][0]["code"] == CheckoutErrorCode.CHANNEL_INACTIVE.name+ assert data["errors"][0]["field"] == "channel"def test_checkout_complete_with_inactive_channel(@@ -156,8 +156,8 @@ def test_checkout_complete_with_inactive_channel(content = get_graphql_content(response)data = content["data"]["checkoutComplete"]- assert data["checkoutErrors"][0]["code"] == CheckoutErrorCode.CHANNEL_INACTIVE.name- assert data["checkoutErrors"][0]["field"] == "channel"+ assert data["errors"][0]["code"] == CheckoutErrorCode.CHANNEL_INACTIVE.name+ assert data["errors"][0]["field"] == "channel"@pytest.mark.integration@@ -212,7 +212,7 @@ def test_checkout_complete(content = get_graphql_content(response)data = content["data"]["checkoutComplete"]- assert not data["checkoutErrors"]+ assert not data["errors"]order_token = data["order"]["token"]assert Order.objects.count() == orders_count + 1@@ -273,7 +273,7 @@ def test_checkout_complete_with_unavailable_variant(response = user_api_client.post_graphql(MUTATION_CHECKOUT_COMPLETE, variables)content = get_graphql_content(response)- errors = content["data"]["checkoutComplete"]["checkoutErrors"]+ errors = content["data"]["checkoutComplete"]["errors"]assert errors[0]["code"] == CheckoutErrorCode.UNAVAILABLE_VARIANT_IN_CHANNEL.nameassert errors[0]["field"] == "lines"assert errors[0]["variants"] == [variant_id]@@ -354,7 +354,7 @@ def test_checkout_with_voucher_complete(content = get_graphql_content(response)data = content["data"]["checkoutComplete"]- assert not data["checkoutErrors"]+ assert not data["errors"]order_token = data["order"]["token"]assert Order.objects.count() == orders_count + 1@@ -423,7 +423,7 @@ def test_checkout_complete_without_inventory_tracking(content = get_graphql_content(response)data = content["data"]["checkoutComplete"]- assert not data["checkoutErrors"]+ assert not data["errors"]order_token = data["order"]["token"]assert Order.objects.count() == orders_count + 1@@ -499,8 +499,8 @@ def test_checkout_complete_error_in_gateway_response_for_dummy_credit_card(content = get_graphql_content(response)data = content["data"]["checkoutComplete"]- assert len(data["checkoutErrors"])- assert data["checkoutErrors"][0]["message"] == error+ assert len(data["errors"])+ assert data["errors"][0]["message"] == errorassert payment.transactions.count() == 1assert Order.objects.count() == orders_count@@ -596,8 +596,8 @@ def test_checkout_complete_invalid_checkout_id(user_api_client):response = user_api_client.post_graphql(MUTATION_CHECKOUT_COMPLETE, variables)content = get_graphql_content(response)data = content["data"]["checkoutComplete"]- assert data["checkoutErrors"][0]["message"] == "Couldn't resolve id: invalidId."- assert data["checkoutErrors"][0]["field"] == "checkoutId"+ assert data["errors"][0]["message"] == "Couldn't resolve id: invalidId."+ assert data["errors"][0]["field"] == "checkoutId"assert orders_count == Order.objects.count()@@ -615,7 +615,7 @@ def test_checkout_complete_no_payment(response = user_api_client.post_graphql(MUTATION_CHECKOUT_COMPLETE, variables)content = get_graphql_content(response)data = content["data"]["checkoutComplete"]- assert data["checkoutErrors"][0]["message"] == (+ assert data["errors"][0]["message"] == ("Provided payment methods can not cover the checkout's total amount")assert orders_count == Order.objects.count()@@ -659,7 +659,7 @@ def test_checkout_complete_confirmation_needed(response = user_api_client.post_graphql(MUTATION_CHECKOUT_COMPLETE, variables)content = get_graphql_content(response)data = content["data"]["checkoutComplete"]- assert not data["checkoutErrors"]+ assert not data["errors"]assert data["confirmationNeeded"] is Trueassert data["confirmationData"]@@ -714,7 +714,7 @@ def test_checkout_confirm(content = get_graphql_content(response)data = content["data"]["checkoutComplete"]- assert not data["checkoutErrors"]+ assert not data["errors"]assert not data["confirmationNeeded"]mocked_confirm_payment.assert_called_once()@@ -757,7 +757,7 @@ def test_checkout_complete_insufficient_stock(response = user_api_client.post_graphql(MUTATION_CHECKOUT_COMPLETE, variables)content = get_graphql_content(response)data = content["data"]["checkoutComplete"]- assert data["checkoutErrors"][0]["message"] == "Insufficient product stock: 123"+ assert data["errors"][0]["message"] == "Insufficient product stock: 123"assert orders_count == Order.objects.count()@@ -810,7 +810,7 @@ def test_checkout_complete_insufficient_stock_payment_refunded(content = get_graphql_content(response)data = content["data"]["checkoutComplete"]- assert data["checkoutErrors"][0]["message"] == "Insufficient product stock: 123"+ assert data["errors"][0]["message"] == "Insufficient product stock: 123"assert orders_count == Order.objects.count()gateway_refund_mock.assert_called_once_with(payment, ANY)@@ -865,7 +865,7 @@ def test_checkout_complete_insufficient_stock_payment_voided(content = get_graphql_content(response)data = content["data"]["checkoutComplete"]- assert data["checkoutErrors"][0]["message"] == "Insufficient product stock: 123"+ assert data["errors"][0]["message"] == "Insufficient product stock: 123"assert orders_count == Order.objects.count()gateway_void_mock.assert_called_once_with(payment, ANY)@@ -914,7 +914,7 @@ def test_checkout_complete_without_redirect_url(content = get_graphql_content(response)data = content["data"]["checkoutComplete"]- assert not data["checkoutErrors"]+ assert not data["errors"]order_token = data["order"]["token"]assert Order.objects.count() == orders_count + 1@@ -984,10 +984,7 @@ def test_checkout_complete_payment_payment_total_different_than_checkout(content = get_graphql_content(response)data = content["data"]["checkoutComplete"]- assert (- data["checkoutErrors"][0]["code"]- == CheckoutErrorCode.CHECKOUT_NOT_FULLY_PAID.name- )+ assert data["errors"][0]["code"] == CheckoutErrorCode.CHECKOUT_NOT_FULLY_PAID.nameassert orders_count == Order.objects.count()gateway_refund_or_void_mock.assert_called_with(payment, ANY)@@ -1008,7 +1005,7 @@ def test_order_already_exists(content = get_graphql_content(response)data = content["data"]["checkoutComplete"]- assert not data["checkoutErrors"]+ assert not data["errors"]order_token = data["order"]["token"]assert Order.objects.count() == 1@@ -1046,9 +1043,7 @@ def test_create_order_raises_insufficient_stock(content = get_graphql_content(response)data = content["data"]["checkoutComplete"]- assert (- data["checkoutErrors"][0]["code"] == CheckoutErrorCode.INSUFFICIENT_STOCK.name- )+ assert data["errors"][0]["code"] == CheckoutErrorCode.INSUFFICIENT_STOCK.nameassert mocked_create_order.calledpayment.refresh_from_db()@@ -1088,7 +1083,7 @@ def test_checkout_complete_with_digital(# Send the creation requestresponse = api_client.post_graphql(MUTATION_CHECKOUT_COMPLETE, variables)content = get_graphql_content(response)["data"]["checkoutComplete"]- assert not content["checkoutErrors"]+ assert not content["errors"]# Ensure the order was actually createdassert (@@ -1150,7 +1145,7 @@ def test_checkout_complete_0_total_value(content = get_graphql_content(response)data = content["data"]["checkoutComplete"]- assert not data["checkoutErrors"]+ assert not data["errors"]order_token = data["order"]["token"]assert Order.objects.count() == orders_count + 1diff --git a/saleor/graphql/checkout/tests/test_checkout_digital.py b/saleor/graphql/checkout/tests/test_checkout_digital.pyindex 81c6f90bcf..d832b1bb94 100644--- a/saleor/graphql/checkout/tests/test_checkout_digital.py+++ b/saleor/graphql/checkout/tests/test_checkout_digital.py@@ -109,10 +109,6 @@ def test_checkout_update_shipping_address(data = content["data"]["checkoutShippingAddressUpdate"]assert data["errors"] == [- {"field": "shippingAddress", "message": "This checkout doesn't need shipping"}- ]-- assert data["checkoutErrors"] == [{"field": "shippingAddress","message": "This checkout doesn't need shipping",@@ -143,7 +139,7 @@ def test_checkout_update_shipping_method(content = get_graphql_content(response)data = content["data"]["checkoutShippingMethodUpdate"]- assert data["checkoutErrors"] == [+ assert data["errors"] == [{"field": "shippingMethod","message": "This checkout doesn't need shipping",@@ -198,7 +194,7 @@ def test_checkout_lines_update_remove_shipping_if_removed_product_with_shipping(content = get_graphql_content(response)data = content["data"]["checkoutLinesUpdate"]- assert not data["checkoutErrors"]+ assert not data["errors"]checkout.refresh_from_db()assert checkout.lines.count() == 1assert not checkout.shipping_methoddiff --git a/saleor/graphql/checkout/tests/test_checkout_language_code_update.py b/saleor/graphql/checkout/tests/test_checkout_language_code_update.pyindex 64f29ab5a3..a13444ebf3 100644--- a/saleor/graphql/checkout/tests/test_checkout_language_code_update.py+++ b/saleor/graphql/checkout/tests/test_checkout_language_code_update.py@@ -9,7 +9,7 @@ mutation checkoutLanguageCodeUpdate($checkoutId: ID!, $languageCode: LanguageCodidlanguageCode}- checkoutErrors{+ errors{fieldmessage}@@ -33,7 +33,7 @@ def test_checkout_update_language_code(content = get_graphql_content(response)data = content["data"]["checkoutLanguageCodeUpdate"]- assert not data["checkoutErrors"]+ assert not data["errors"]assert data["checkout"]["languageCode"] == language_codecheckout.refresh_from_db()diff --git a/saleor/graphql/core/mutations.py b/saleor/graphql/core/mutations.pyindex 74fe4b168e..56c00e4756 100644--- a/saleor/graphql/core/mutations.py+++ b/saleor/graphql/core/mutations.py@@ -32,17 +32,18 @@ def get_model_name(model):return model_name[:1].lower() + model_name[1:]-def get_error_fields(error_type_class, error_type_field):- return {- error_type_field: graphene.Field(- graphene.List(- graphene.NonNull(error_type_class),- description="List of errors that occurred executing the mutation.",- ),- default_value=[],- required=True,- )- }+def get_error_fields(error_type_class, error_type_field, deprecation_reason=None):+ error_field = graphene.Field(+ graphene.List(+ graphene.NonNull(error_type_class),+ description="List of errors that occurred executing the mutation.",+ ),+ default_value=[],+ required=True,+ )+ if deprecation_reason is not None:+ error_field.deprecation_reason = deprecation_reason+ return {error_type_field: error_field}def validation_error_to_error_type(validation_error: ValidationError) -> list:@@ -80,16 +81,6 @@ class ModelMutationOptions(MutationOptions):class BaseMutation(graphene.Mutation):- errors = graphene.List(- graphene.NonNull(Error),- description="List of errors that occurred executing the mutation.",- deprecation_reason=(- "Use typed errors with error codes. This field will be removed after "- "2020-07-31."- ),- required=True,- )-class Meta:abstract = True@@ -110,6 +101,9 @@ class BaseMutation(graphene.Mutation):if not description:raise ImproperlyConfigured("No description provided in Meta")+ if not error_type_class:+ raise ImproperlyConfigured("No error_type_class provided in Meta.")+if isinstance(permissions, str):permissions = (permissions,)@@ -125,10 +119,18 @@ class BaseMutation(graphene.Mutation):super().__init_subclass_with_meta__(description=description, _meta=_meta, **options)- if error_type_class and error_type_field:+ if error_type_field:+ deprecated_msg = (+ "Use errors field instead. This field will be removed in Saleor 4.0."+ )cls._meta.fields.update(- get_error_fields(error_type_class, error_type_field)+ get_error_fields(+ error_type_class,+ error_type_field,+ deprecated_msg,+ ))+ cls._meta.fields.update(get_error_fields(error_type_class, "errors"))@classmethoddef _update_mutation_arguments_and_fields(cls, arguments, fields):@@ -309,26 +311,24 @@ class BaseMutation(graphene.Mutation):@classmethoddef handle_typed_errors(cls, errors: list, **extra):"""Return class instance with errors."""- if (- cls._meta.error_type_class is not None- and cls._meta.error_type_field is not None- ):- typed_errors = []- error_class_fields = set(cls._meta.error_type_class._meta.fields.keys())- for e, code, params in errors:- error_instance = cls._meta.error_type_class(- field=e.field, message=e.message, code=code- )- if params:- # If some of the params key overlap with error class fields- # attach param value to the error- error_fields_in_params = set(params.keys()) & error_class_fields- for error_field in error_fields_in_params:- setattr(error_instance, error_field, params[error_field])- typed_errors.append(error_instance)+ typed_errors = []+ error_class_fields = set(cls._meta.error_type_class._meta.fields.keys())+ for e, code, params in errors:+ error_instance = cls._meta.error_type_class(+ field=e.field, message=e.message, code=code+ )+ if params:+ # If some of the params key overlap with error class fields+ # attach param value to the error+ error_fields_in_params = set(params.keys()) & error_class_fields+ for error_field in error_fields_in_params:+ setattr(error_instance, error_field, params[error_field])+ typed_errors.append(error_instance)++ if cls._meta.error_type_field is not None:extra.update({cls._meta.error_type_field: typed_errors})- return cls(errors=[e[0] for e in errors], **extra)+ return cls(errors=typed_errors, **extra)class ModelMutation(BaseMutation):diff --git a/saleor/graphql/core/tests/__init__.py b/saleor/graphql/core/tests/__init__.pyindex e69de29bb2..1a957dcb3a 100644--- a/saleor/graphql/core/tests/__init__.py+++ b/saleor/graphql/core/tests/__init__.py@@ -0,0 +1,16 @@+from enum import Enum++import graphene++from ..types.common import Error+++class ErrorCodeTest(Enum):+ INVALID = "invalid"+++ErrorCodeTest = graphene.Enum.from_enum(ErrorCodeTest)+++class ErrorTest(Error):+ code = ErrorCodeTest()diff --git a/saleor/graphql/core/tests/test_base_mutation.py b/saleor/graphql/core/tests/test_base_mutation.pyindex 977508b7e6..c2534f9754 100644--- a/saleor/graphql/core/tests/test_base_mutation.py+++ b/saleor/graphql/core/tests/test_base_mutation.py@@ -1,4 +1,3 @@-from enum import Enumfrom unittest.mock import Mockimport graphene@@ -7,7 +6,7 @@ from django.core.exceptions import ImproperlyConfiguredfrom ...product import types as product_typesfrom ..mutations import BaseMutation-from ..types.common import Error+from . import ErrorTestclass Mutation(BaseMutation):@@ -19,6 +18,7 @@ class Mutation(BaseMutation):class Meta:description = "Base mutation"+ error_type_class = ErrorTest@classmethoddef perform_mutation(cls, _root, info, product_id, channel):@@ -31,17 +31,6 @@ class Mutation(BaseMutation):return Mutation(name=product.name)-class ErrorCodeTest(Enum):- INVALID = "invalid"---ErrorCodeTest = graphene.Enum.from_enum(ErrorCodeTest)---class ErrorTest(Error):- code = ErrorCodeTest()--class MutationWithCustomErrors(Mutation):class Meta:description = "Base mutation with custom errors"@@ -69,6 +58,17 @@ def test_mutation_without_description_raises_error():product_id = graphene.ID(required=True)+def test_mutation_without_error_type_class_raises_error():+ with pytest.raises(ImproperlyConfigured):++ class MutationNoDescription(BaseMutation):+ name = graphene.Field(graphene.String)+ description = "Base mutation with custom errors"++ class Arguments:+ product_id = graphene.ID(required=True)++TEST_MUTATION = """mutation testMutation($productId: ID!, $channel: String) {test(productId: $productId, channel: $channel) {diff --git a/saleor/graphql/core/tests/test_core.py b/saleor/graphql/core/tests/test_core.pyindex 918363ebc8..ceefd6fb23 100644--- a/saleor/graphql/core/tests/test_core.py+++ b/saleor/graphql/core/tests/test_core.py@@ -24,6 +24,7 @@ from ..utils import (snake_to_camel_case,validate_slug_and_generate_if_needed,)+from . import ErrorTestdef test_clean_seo_fields():@@ -170,7 +171,9 @@ def test_filter_input():def test_mutation_invalid_permission_in_meta(_mocked, should_fail, permissions_value):def _run_test():BaseMutation.__init_subclass_with_meta__(- description="dummy", permissions=permissions_value+ description="dummy",+ error_type_class=ErrorTest,+ permissions=permissions_value,)if not should_fail:diff --git a/saleor/graphql/core/tests/test_file_upload.py b/saleor/graphql/core/tests/test_file_upload.pyindex 9d8b8cef2a..8c07b9dec5 100644--- a/saleor/graphql/core/tests/test_file_upload.py+++ b/saleor/graphql/core/tests/test_file_upload.py@@ -14,7 +14,7 @@ mutation fileUpload($file: Upload!) {urlcontentType}- uploadErrors {+ errors {code}}@@ -36,7 +36,7 @@ def test_file_upload_by_staff(staff_api_client, site_settings, media_root):# thencontent = get_graphql_content(response)data = content["data"]["fileUpload"]- errors = data["uploadErrors"]+ errors = data["errors"]expected_path = "http://testserver/media/" + image_file._nameassert not errors@@ -74,7 +74,7 @@ def test_file_upload_by_app(app_api_client, media_root):# thencontent = get_graphql_content(response)data = content["data"]["fileUpload"]- errors = data["uploadErrors"]+ errors = data["errors"]expected_path = "http://testserver/media/" + image_file._nameassert not errors@@ -97,7 +97,7 @@ def test_file_upload_by_superuser(superuser_api_client, media_root):# thencontent = get_graphql_content(response)data = content["data"]["fileUpload"]- errors = data["uploadErrors"]+ errors = data["errors"]expected_path = "http://testserver/media/" + image_file._nameassert not errors@@ -132,7 +132,7 @@ def test_file_upload_file_with_the_same_name_already_exists(# thencontent = get_graphql_content(response)data = content["data"]["fileUpload"]- errors = data["uploadErrors"]+ errors = data["errors"]assert not errorsassert data["uploadedFile"]["contentType"] == "image/png"diff --git a/saleor/graphql/core/tests/test_graphql.py b/saleor/graphql/core/tests/test_graphql.pyindex 5d1c8eeec5..71f62eeaf0 100644--- a/saleor/graphql/core/tests/test_graphql.py+++ b/saleor/graphql/core/tests/test_graphql.py@@ -106,13 +106,11 @@ def test_real_query(user_api_client, product, channel_USD):fragment CategoryPageFragmentQuery on Category {idname- urlancestors(first: 20) {edges {node {nameid- url__typename}}@@ -122,7 +120,6 @@ def test_real_query(user_api_client, product, channel_USD):node {nameid- urlslug__typename}@@ -160,7 +157,6 @@ def test_real_query(user_api_client, product, channel_USD):thumbnailUrl2x: thumbnail(size: 510){url}- url__typename}@@ -178,7 +174,6 @@ def test_real_query(user_api_client, product, channel_USD):gross {amountcurrency- localized__typename}currency@@ -188,7 +183,6 @@ def test_real_query(user_api_client, product, channel_USD):gross {amountcurrency- localized__typename}currency@@ -217,7 +211,7 @@ def test_real_query(user_api_client, product, channel_USD):"sortBy": {"field": "NAME", "direction": "ASC"},"first": 1,"attributesFilter": [- {"slug": f"{product_attr.slug}", "value": f"{attr_value.slug}"}+ {"slug": f"{product_attr.slug}", "values": [f"{attr_value.slug}"]}],"channel": channel_USD.slug,}diff --git a/saleor/graphql/core/types/money.py b/saleor/graphql/core/types/money.pyindex 2140d64603..9826fa9b8a 100644--- a/saleor/graphql/core/types/money.py+++ b/saleor/graphql/core/types/money.py@@ -9,14 +9,6 @@ from ..enums import TaxRateTypeclass Money(graphene.ObjectType):currency = graphene.String(description="Currency code.", required=True)amount = graphene.Float(description="Amount of money.", required=True)- localized = graphene.String(- description="Money formatted according to the current locale.",- required=True,- deprecation_reason=(- "Price formatting according to the current locale should be handled by the "- "frontend client. This field will be removed after 2020-07-31."- ),- )class Meta:description = "Represents amount of money in specific currency."diff --git a/saleor/graphql/csv/tests/mutations/test_export_products.py b/saleor/graphql/csv/tests/mutations/test_export_products.pyindex f3b9e8a4fd..499edcc2bf 100644--- a/saleor/graphql/csv/tests/mutations/test_export_products.py+++ b/saleor/graphql/csv/tests/mutations/test_export_products.py@@ -27,7 +27,7 @@ EXPORT_PRODUCTS_MUTATION = """name}}- exportErrors {+ errors {fieldcodemessage@@ -86,7 +86,7 @@ def test_export_products_mutation(ANY, called_data, {}, FileTypeEnum.CSV.value)- assert not data["exportErrors"]+ assert not data["errors"]assert data["exportFile"]["id"]assert export_file_data["createdAt"]assert export_file_data["user"]["email"] == staff_api_client.user.email@@ -132,7 +132,7 @@ def test_export_products_mutation_by_app(ANY, {"all": ""}, {}, FileTypeEnum.CSV.value)- assert not data["exportErrors"]+ assert not data["errors"]assert data["exportFile"]["id"]assert export_file_data["createdAt"]assert export_file_data["user"] is None@@ -193,7 +193,7 @@ def test_export_products_mutation_ids_scope(assert call_args[2] == {"fields": [ProductFieldEnum.NAME.value]}assert call_args[3] == FileTypeEnum.XLSX.value- assert not data["exportErrors"]+ assert not data["errors"]assert data["exportFile"]["id"]assert export_file_data["createdAt"]assert export_file_data["user"]["email"] == staff_api_client.user.email@@ -274,7 +274,7 @@ def test_export_products_mutation_with_warehouse_and_attribute_ids(}assert call_args[3] == FileTypeEnum.CSV.value- assert not data["exportErrors"]+ assert not data["errors"]assert data["exportFile"]["id"]assert export_file_data["createdAt"]assert export_file_data["user"]["email"] == staff_api_client.user.email@@ -323,11 +323,11 @@ def test_export_products_mutation_failed()content = get_graphql_content(response)data = content["data"]["exportProducts"]- errors = data["exportErrors"]+ errors = data["errors"]export_products_mock.assert_not_called()- assert data["exportErrors"]+ assert data["errors"]assert errors[0]["field"] == error_fieldassert not ExportEvent.objects.filter(user=user, type=ExportEvents.EXPORT_PENDINGdiff --git a/saleor/graphql/discount/tests/test_discount.py b/saleor/graphql/discount/tests/test_discount.pyindex 9875b0a2fa..1fcdc762f6 100644--- a/saleor/graphql/discount/tests/test_discount.py+++ b/saleor/graphql/discount/tests/test_discount.py@@ -433,7 +433,7 @@ mutation voucherCreate(startDate: $startDate, endDate: $endDate, usageLimit: $usageLimitapplyOncePerOrder: $applyOncePerOrder,applyOncePerCustomer: $applyOncePerCustomer}) {- discountErrors {+ errors {fieldcodemessage@@ -531,8 +531,8 @@ def test_create_voucher_with_existing_gift_card_code(CREATE_VOUCHER_MUTATION, variables, permissions=[permission_manage_discounts])content = get_graphql_content(response)- assert content["data"]["voucherCreate"]["discountErrors"]- errors = content["data"]["voucherCreate"]["discountErrors"]+ assert content["data"]["voucherCreate"]["errors"]+ errors = content["data"]["voucherCreate"]["errors"]assert len(errors) == 1assert errors[0]["field"] == "code"assert errors[0]["code"] == DiscountErrorCode.ALREADY_EXISTS.name@@ -558,8 +558,8 @@ def test_create_voucher_with_existing_voucher_code(CREATE_VOUCHER_MUTATION, variables, permissions=[permission_manage_discounts])content = get_graphql_content(response)- assert content["data"]["voucherCreate"]["discountErrors"]- errors = content["data"]["voucherCreate"]["discountErrors"]+ assert content["data"]["voucherCreate"]["errors"]+ errors = content["data"]["voucherCreate"]["errors"]assert len(errors) == 1assert errors[0]["field"] == "code"assert errors@@ -575,7 +575,7 @@ def test_update_voucher(staff_api_client, voucher, permission_manage_discounts):applyOncePerOrder: $applyOncePerOrder,minCheckoutItemsQuantity: $minCheckoutItemsQuantity}) {- discountErrors {+ errors {fieldcodemessage@@ -623,7 +623,7 @@ def test_voucher_delete_mutation(nameid}- discountErrors {+ errors {fieldcodemessage@@ -657,7 +657,7 @@ def test_voucher_add_catalogues(voucher {name}- discountErrors {+ errors {fieldcodemessage@@ -683,7 +683,7 @@ def test_voucher_add_catalogues(content = get_graphql_content(response)data = content["data"]["voucherCataloguesAdd"]- assert not data["discountErrors"]+ assert not data["errors"]assert product in voucher.products.all()assert category in voucher.categories.all()assert collection in voucher.collections.all()@@ -703,7 +703,7 @@ def test_voucher_add_catalogues_with_product_without_variant(voucher {name}- discountErrors {+ errors {fieldcodemessage@@ -728,7 +728,7 @@ def test_voucher_add_catalogues_with_product_without_variant(query, variables, permissions=[permission_manage_discounts])content = get_graphql_content(response)- error = content["data"]["voucherCataloguesAdd"]["discountErrors"][0]+ error = content["data"]["voucherCataloguesAdd"]["errors"][0]assert error["code"] == DiscountErrorCode.CANNOT_MANAGE_PRODUCT_WITHOUT_VARIANT.nameassert error["message"] == "Cannot manage products without variants."@@ -752,7 +752,7 @@ def test_voucher_remove_catalogues(voucher {name}- discountErrors {+ errors {fieldcodemessage@@ -778,7 +778,7 @@ def test_voucher_remove_catalogues(content = get_graphql_content(response)data = content["data"]["voucherCataloguesRemove"]- assert not data["discountErrors"]+ assert not data["errors"]assert product not in voucher.products.all()assert category not in voucher.categories.all()assert collection not in voucher.collections.all()@@ -793,7 +793,7 @@ def test_voucher_add_no_catalogues(voucher {name}- discountErrors {+ errors {fieldcodemessage@@ -811,7 +811,7 @@ def test_voucher_add_no_catalogues(content = get_graphql_content(response)data = content["data"]["voucherCataloguesAdd"]- assert not data["discountErrors"]+ assert not data["errors"]assert not voucher.products.exists()assert not voucher.categories.exists()assert not voucher.collections.exists()@@ -835,7 +835,7 @@ def test_voucher_remove_no_catalogues(voucher {name}- discountErrors {+ errors {fieldcodemessage@@ -853,7 +853,7 @@ def test_voucher_remove_no_catalogues(content = get_graphql_content(response)data = content["data"]["voucherCataloguesAdd"]- assert not data["discountErrors"]+ assert not data["errors"]assert voucher.products.exists()assert voucher.categories.exists()assert voucher.collections.exists()@@ -873,7 +873,7 @@ def test_create_sale(staff_api_client, permission_manage_discounts):startDateendDate}- discountErrors {+ errors {fieldcodemessage@@ -906,7 +906,7 @@ def test_update_sale(staff_api_client, sale, permission_manage_discounts):query = """mutation saleUpdate($type: DiscountValueTypeEnum, $id: ID!) {saleUpdate(id: $id, input: {type: $type}) {- discountErrors {+ errors {fieldcodemessage@@ -941,7 +941,7 @@ def test_sale_delete_mutation(staff_api_client, sale, permission_manage_discountnameid}- discountErrors {+ errors {fieldcodemessage@@ -970,7 +970,7 @@ def test_sale_add_catalogues(sale {name}- discountErrors {+ errors {fieldcodemessage@@ -996,7 +996,7 @@ def test_sale_add_catalogues(content = get_graphql_content(response)data = content["data"]["saleCataloguesAdd"]- assert not data["discountErrors"]+ assert not data["errors"]assert product in sale.products.all()assert category in sale.categories.all()assert collection in sale.collections.all()@@ -1011,7 +1011,7 @@ def test_sale_add_catalogues_with_product_without_variants(sale {name}- discountErrors {+ errors {fieldcodemessage@@ -1036,7 +1036,7 @@ def test_sale_add_catalogues_with_product_without_variants(query, variables, permissions=[permission_manage_discounts])content = get_graphql_content(response)- error = content["data"]["saleCataloguesAdd"]["discountErrors"][0]+ error = content["data"]["saleCataloguesAdd"]["errors"][0]assert error["code"] == DiscountErrorCode.CANNOT_MANAGE_PRODUCT_WITHOUT_VARIANT.nameassert error["message"] == "Cannot manage products without variants."@@ -1055,7 +1055,7 @@ def test_sale_remove_catalogues(sale {name}- discountErrors {+ errors {fieldcodemessage@@ -1081,7 +1081,7 @@ def test_sale_remove_catalogues(content = get_graphql_content(response)data = content["data"]["saleCataloguesRemove"]- assert not data["discountErrors"]+ assert not data["errors"]assert product not in sale.products.all()assert category not in sale.categories.all()assert collection not in sale.collections.all()@@ -1096,7 +1096,7 @@ def test_sale_add_no_catalogues(sale {name}- discountErrors {+ errors {fieldcodemessage@@ -1114,7 +1114,7 @@ def test_sale_add_no_catalogues(content = get_graphql_content(response)data = content["data"]["saleCataloguesAdd"]- assert not data["discountErrors"]+ assert not data["errors"]assert not new_sale.products.exists()assert not new_sale.categories.exists()assert not new_sale.collections.exists()@@ -1133,7 +1133,7 @@ def test_sale_remove_no_catalogues(sale {name}- discountErrors {+ errors {fieldcodemessage@@ -1151,7 +1151,7 @@ def test_sale_remove_no_catalogues(content = get_graphql_content(response)data = content["data"]["saleCataloguesAdd"]- assert not data["discountErrors"]+ assert not data["errors"]assert sale.products.exists()assert sale.categories.exists()assert sale.collections.exists()diff --git a/saleor/graphql/discount/tests/test_sale_channel_listing.py b/saleor/graphql/discount/tests/test_sale_channel_listing.pyindex 8f05a17a7c..493f4df574 100644--- a/saleor/graphql/discount/tests/test_sale_channel_listing.py+++ b/saleor/graphql/discount/tests/test_sale_channel_listing.py@@ -13,7 +13,7 @@ mutation UpdateSaleChannelListing($input: SaleChannelListingInput!) {saleChannelListingUpdate(id: $id, input: $input) {- discountErrors {+ errors {fieldmessagecode@@ -68,7 +68,7 @@ def test_sale_channel_listing_create_as_staff_user(# thendata = content["data"]["saleChannelListingUpdate"]shipping_method_data = data["sale"]- assert not data["discountErrors"]+ assert not data["errors"]assert shipping_method_data["name"] == sale.nameassert shipping_method_data["channelListings"][1]["discountValue"] == discounted@@ -120,7 +120,7 @@ def test_sale_channel_listing_update_as_staff_user(# thendata = content["data"]["saleChannelListingUpdate"]shipping_method_data = data["sale"]- assert not data["discountErrors"]+ assert not data["errors"]assert shipping_method_data["channelListings"][0]["discountValue"] == discountedmock_update_discounted_prices_of_discount_task.delay.assert_called_once_with(@@ -186,7 +186,7 @@ def test_sale_channel_listing_update_duplicated_ids_in_add_and_remove(content = get_graphql_content(response)# then- errors = content["data"]["saleChannelListingUpdate"]["discountErrors"]+ errors = content["data"]["saleChannelListingUpdate"]["errors"]assert len(errors) == 1assert errors[0]["field"] == "input"assert errors[0]["code"] == DiscountErrorCode.DUPLICATED_INPUT_ITEM.name@@ -219,7 +219,7 @@ def test_sale_channel_listing_update_duplicated_channel_in_add(content = get_graphql_content(response)# then- errors = content["data"]["saleChannelListingUpdate"]["discountErrors"]+ errors = content["data"]["saleChannelListingUpdate"]["errors"]assert len(errors) == 1assert errors[0]["field"] == "addChannels"assert errors[0]["code"] == DiscountErrorCode.DUPLICATED_INPUT_ITEM.name@@ -246,7 +246,7 @@ def test_sale_channel_listing_update_duplicated_channel_in_remove(content = get_graphql_content(response)# then- errors = content["data"]["saleChannelListingUpdate"]["discountErrors"]+ errors = content["data"]["saleChannelListingUpdate"]["errors"]assert len(errors) == 1assert errors[0]["field"] == "removeChannels"assert errors[0]["code"] == DiscountErrorCode.DUPLICATED_INPUT_ITEM.name@@ -275,7 +275,7 @@ def test_sale_channel_listing_update_with_invalid_decimal_places()content = get_graphql_content(response)# then- errors = content["data"]["saleChannelListingUpdate"]["discountErrors"]+ errors = content["data"]["saleChannelListingUpdate"]["errors"]assert len(errors) == 1assert errors[0]["code"] == DiscountErrorCode.INVALID.name@@ -308,7 +308,7 @@ def test_sale_channel_listing_update_with_invalid_percentage_value()content = get_graphql_content(response)# then- errors = content["data"]["saleChannelListingUpdate"]["discountErrors"]+ errors = content["data"]["saleChannelListingUpdate"]["errors"]assert len(errors) == 1assert errors[0]["code"] == DiscountErrorCode.INVALID.namediff --git a/saleor/graphql/discount/tests/test_voucher_channel_listing.py b/saleor/graphql/discount/tests/test_voucher_channel_listing.pyindex 0ce8d43315..e4cea6b7b5 100644--- a/saleor/graphql/discount/tests/test_voucher_channel_listing.py+++ b/saleor/graphql/discount/tests/test_voucher_channel_listing.py@@ -7,7 +7,7 @@ from ...tests.utils import assert_no_permission, get_graphql_contentVOUCHER_CHANNEL_LISTING_UPDATE_MUTATION = """mutation UpdateVoucherChannelListing($id: ID!, $input: VoucherChannelListingInput!) {voucherChannelListingUpdate(id: $id, input: $input) {- discountErrors {+ errors {fieldmessagecode@@ -57,7 +57,7 @@ def test_voucher_channel_listing_create_as_staff(# thendata = content["data"]["voucherChannelListingUpdate"]["voucher"]- assert not content["data"]["voucherChannelListingUpdate"]["discountErrors"]+ assert not content["data"]["voucherChannelListingUpdate"]["errors"]channel_listing = data["channelListings"]assert channel_listing[0]["channel"]["slug"] == channel_USD.slugassert channel_listing[0]["discountValue"] == discount_value@@ -89,7 +89,7 @@ def test_voucher_channel_listing_update_as_app(# thendata = content["data"]["voucherChannelListingUpdate"]["voucher"]- assert not content["data"]["voucherChannelListingUpdate"]["discountErrors"]+ assert not content["data"]["voucherChannelListingUpdate"]["errors"]channel_listing = data["channelListings"]assert channel_listing[0]["channel"]["slug"] == channel_USD.slugassert channel_listing[0]["discountValue"] == discount_value@@ -184,7 +184,7 @@ def test_voucher_channel_listing_create_many_channel(# thendata = content["data"]["voucherChannelListingUpdate"]["voucher"]- assert not content["data"]["voucherChannelListingUpdate"]["discountErrors"]+ assert not content["data"]["voucherChannelListingUpdate"]["errors"]channel_listing = data["channelListings"]assert channel_listing[0]["channel"]["slug"] == channel_USD.slugassert channel_listing[0]["discountValue"] == discount_value@@ -233,7 +233,7 @@ def test_voucher_channel_listing_create_and_remove(# thendata = content["data"]["voucherChannelListingUpdate"]["voucher"]- assert not content["data"]["voucherChannelListingUpdate"]["discountErrors"]+ assert not content["data"]["voucherChannelListingUpdate"]["errors"]channel_listing = data["channelListings"]assert len(channel_listing) == 1assert channel_listing[0]["channel"]["slug"] == channel_PLN.slug@@ -277,7 +277,7 @@ def test_voucher_channel_listing_update(# thendata = content["data"]["voucherChannelListingUpdate"]["voucher"]- assert not content["data"]["voucherChannelListingUpdate"]["discountErrors"]+ assert not content["data"]["voucherChannelListingUpdate"]["errors"]channel_listing = data["channelListings"]assert len(channel_listing) == 1assert channel_listing[0]["channel"]["slug"] == channel_USD.slug@@ -315,7 +315,7 @@ def test_voucher_channel_listing_update_without_discount_value(# thendata = content["data"]["voucherChannelListingUpdate"]["voucher"]- assert not content["data"]["voucherChannelListingUpdate"]["discountErrors"]+ assert not content["data"]["voucherChannelListingUpdate"]["errors"]channel_listing = data["channelListings"]assert len(channel_listing) == 1assert channel_listing[0]["channel"]["slug"] == channel_USD.slug@@ -348,7 +348,7 @@ def test_voucher_channel_listing_remove_channel(# thendata = content["data"]["voucherChannelListingUpdate"]["voucher"]- assert not content["data"]["voucherChannelListingUpdate"]["discountErrors"]+ assert not content["data"]["voucherChannelListingUpdate"]["errors"]channel_listing = data["channelListings"]assert len(channel_listing) == 0@@ -384,7 +384,7 @@ def test_voucher_channel_listing_update_with_null_as_discount_value(content = get_graphql_content(response)# then- errors = content["data"]["voucherChannelListingUpdate"]["discountErrors"]+ errors = content["data"]["voucherChannelListingUpdate"]["errors"]assert len(errors) == 1assert errors[0]["field"] == "discountValue"assert errors[0]["code"] == DiscountErrorCode.REQUIRED.name@@ -423,7 +423,7 @@ def test_voucher_channel_listing_create_with_null_as_discount_value(content = get_graphql_content(response)# then- errors = content["data"]["voucherChannelListingUpdate"]["discountErrors"]+ errors = content["data"]["voucherChannelListingUpdate"]["errors"]assert len(errors) == 1assert errors[0]["field"] == "discountValue"assert errors[0]["code"] == DiscountErrorCode.REQUIRED.name@@ -463,7 +463,7 @@ def test_voucher_channel_listing_create_with_invalid_percentage_value(content = get_graphql_content(response)# then- errors = content["data"]["voucherChannelListingUpdate"]["discountErrors"]+ errors = content["data"]["voucherChannelListingUpdate"]["errors"]assert len(errors) == 1assert errors[0]["field"] == "discountValue"assert errors[0]["code"] == DiscountErrorCode.INVALID.name@@ -494,7 +494,7 @@ def test_voucher_channel_listing_create_without_discount_value(content = get_graphql_content(response)# then- errors = content["data"]["voucherChannelListingUpdate"]["discountErrors"]+ errors = content["data"]["voucherChannelListingUpdate"]["errors"]assert len(errors) == 1assert errors[0]["field"] == "discountValue"assert errors[0]["code"] == DiscountErrorCode.REQUIRED.name@@ -529,7 +529,7 @@ def test_voucher_channel_listing_update_duplicates_in_add(content = get_graphql_content(response)# then- errors = content["data"]["voucherChannelListingUpdate"]["discountErrors"]+ errors = content["data"]["voucherChannelListingUpdate"]["errors"]assert len(errors) == 1assert errors[0]["field"] == "addChannels"assert errors[0]["code"] == DiscountErrorCode.DUPLICATED_INPUT_ITEM.name@@ -559,7 +559,7 @@ def test_voucher_channel_listing_update_duplicates_in_remove(content = get_graphql_content(response)# then- errors = content["data"]["voucherChannelListingUpdate"]["discountErrors"]+ errors = content["data"]["voucherChannelListingUpdate"]["errors"]assert len(errors) == 1assert errors[0]["field"] == "removeChannels"assert errors[0]["code"] == DiscountErrorCode.DUPLICATED_INPUT_ITEM.name@@ -592,7 +592,7 @@ def test_voucher_channel_listing_update_duplicates_in_add_and_remove(content = get_graphql_content(response)# then- errors = content["data"]["voucherChannelListingUpdate"]["discountErrors"]+ errors = content["data"]["voucherChannelListingUpdate"]["errors"]assert len(errors) == 1assert errors[0]["field"] == "input"assert errors[0]["code"] == DiscountErrorCode.DUPLICATED_INPUT_ITEM.name@@ -630,7 +630,7 @@ def test_voucher_channel_listing_update_invalid_precision_discount_value(content = get_graphql_content(response)# then- errors = content["data"]["voucherChannelListingUpdate"]["discountErrors"]+ errors = content["data"]["voucherChannelListingUpdate"]["errors"]assert len(errors) == 1assert errors[0]["field"] == "discountValue"assert errors[0]["code"] == DiscountErrorCode.INVALID.name@@ -668,7 +668,7 @@ def test_voucher_channel_listing_update_invalid_precision_min_amount_spent(content = get_graphql_content(response)# then- errors = content["data"]["voucherChannelListingUpdate"]["discountErrors"]+ errors = content["data"]["voucherChannelListingUpdate"]["errors"]assert len(errors) == 1assert errors[0]["field"] == "minAmountSpent"assert errors[0]["code"] == DiscountErrorCode.INVALID.namediff --git a/saleor/graphql/giftcard/tests/test_gift_card.py b/saleor/graphql/giftcard/tests/test_gift_card.pyindex 27c4653271..299c307100 100644--- a/saleor/graphql/giftcard/tests/test_gift_card.py+++ b/saleor/graphql/giftcard/tests/test_gift_card.py@@ -243,7 +243,7 @@ mutation giftCardCreate(fieldmessage}- giftCardErrors {+ errors {fieldmessagecode@@ -374,7 +374,7 @@ def test_create_gift_card_with_existing_voucher_code(assert len(errors) == 1assert errors[0]["field"] == "promoCode"- gift_card_errors = content["data"]["giftCardCreate"]["giftCardErrors"]+ gift_card_errors = content["data"]["giftCardCreate"]["errors"]assert gift_card_errors[0]["code"] == GiftCardErrorCode.ALREADY_EXISTS.name@@ -394,7 +394,7 @@ def test_create_gift_card_with_existing_gift_card_code(assert len(errors) == 1assert errors[0]["field"] == "promoCode"- gift_card_errors = content["data"]["giftCardCreate"]["giftCardErrors"]+ gift_card_errors = content["data"]["giftCardCreate"]["errors"]assert gift_card_errors[0]["code"] == GiftCardErrorCode.ALREADY_EXISTS.name@@ -453,7 +453,7 @@ def test_create_gift_card_with_incorrect_user_email(assert errors[0]["field"] == "email"assert errors[0]["message"] == "Customer with this email doesn't exist."- gift_card_errors = content["data"]["giftCardCreate"]["giftCardErrors"]+ gift_card_errors = content["data"]["giftCardCreate"]["errors"]assert gift_card_errors[0]["code"] == GiftCardErrorCode.NOT_FOUND.name@@ -492,7 +492,7 @@ def test_create_gift_card_with_to_many_decimal_places_in_amount(permissions=[permission_manage_gift_card, permission_manage_users],)content = get_graphql_content(response)- errors = content["data"]["giftCardCreate"]["giftCardErrors"]+ errors = content["data"]["giftCardCreate"]["errors"]data = content["data"]["giftCardCreate"]["giftCard"]assert not datadiff --git a/saleor/graphql/invoice/tests/test_invoice_create.py b/saleor/graphql/invoice/tests/test_invoice_create.pyindex addf5285b9..85be73a181 100644--- a/saleor/graphql/invoice/tests/test_invoice_create.py+++ b/saleor/graphql/invoice/tests/test_invoice_create.py@@ -21,7 +21,7 @@ INVOICE_CREATE_MUTATION = """numberurl}- invoiceErrors {+ errors {fieldcode}@@ -81,7 +81,7 @@ def test_create_invoice_no_billing_address()content = get_graphql_content(response)assert not Invoice.objects.filter(order_id=order.pk, number=number).exists()- error = content["data"]["invoiceCreate"]["invoiceErrors"][0]+ error = content["data"]["invoiceCreate"]["errors"][0]assert error["field"] == "orderId"assert error["code"] == InvoiceErrorCode.NOT_READY.nameassert not order.events.filter(type=OrderEvents.INVOICE_GENERATED).exists()@@ -105,7 +105,7 @@ def test_create_invoice_invalid_order_status()content = get_graphql_content(response)assert not Invoice.objects.filter(order_id=order.pk, number=number).exists()- error = content["data"]["invoiceCreate"]["invoiceErrors"][0]+ error = content["data"]["invoiceCreate"]["errors"][0]assert error["field"] == "orderId"assert error["code"] == InvoiceErrorCode.INVALID_STATUS.nameassert not order.events.filter(type=OrderEvents.INVOICE_GENERATED).exists()@@ -121,7 +121,7 @@ def test_create_invoice_invalid_id(staff_api_client, permission_manage_orders):INVOICE_CREATE_MUTATION, variables, permissions=[permission_manage_orders])content = get_graphql_content(response)- error = content["data"]["invoiceCreate"]["invoiceErrors"][0]+ error = content["data"]["invoiceCreate"]["errors"][0]assert error["code"] == InvoiceErrorCode.NOT_FOUND.nameassert error["field"] == "orderId"@@ -136,7 +136,7 @@ def test_create_invoice_empty_params(staff_api_client, permission_manage_orders,INVOICE_CREATE_MUTATION, variables, permissions=[permission_manage_orders])content = get_graphql_content(response)- errors = content["data"]["invoiceCreate"]["invoiceErrors"]+ errors = content["data"]["invoiceCreate"]["errors"]assert errors[0] == {"field": "url","code": InvoiceErrorCode.REQUIRED.name,diff --git a/saleor/graphql/invoice/tests/test_invoice_delete.py b/saleor/graphql/invoice/tests/test_invoice_delete.pyindex 73c8620285..ae4dec2ecc 100644--- a/saleor/graphql/invoice/tests/test_invoice_delete.py+++ b/saleor/graphql/invoice/tests/test_invoice_delete.py@@ -11,7 +11,7 @@ INVOICE_DELETE_MUTATION = """invoiceDelete(id: $id) {- invoiceErrors {+ errors {fieldcode}@@ -27,7 +27,7 @@ def test_invoice_delete(staff_api_client, permission_manage_orders, order):INVOICE_DELETE_MUTATION, variables, permissions=[permission_manage_orders])content = get_graphql_content(response)- assert not content["data"]["invoiceDelete"]["invoiceErrors"]+ assert not content["data"]["invoiceDelete"]["errors"]assert not Invoice.objects.filter(id=invoice.pk).exists()assert InvoiceEvent.objects.filter(type=InvoiceEvents.DELETED,@@ -45,7 +45,7 @@ def test_invoice_delete_invalid_id(INVOICE_DELETE_MUTATION, variables, permissions=[permission_manage_orders])content = get_graphql_content(response)- error = content["data"]["invoiceDelete"]["invoiceErrors"][0]+ error = content["data"]["invoiceDelete"]["errors"][0]assert error["code"] == InvoiceErrorCode.NOT_FOUND.nameassert error["field"] == "id"plugin_mock.assert_not_called()diff --git a/saleor/graphql/invoice/tests/test_invoice_request.py b/saleor/graphql/invoice/tests/test_invoice_request.pyindex 7fcebbec26..152ab5b199 100644--- a/saleor/graphql/invoice/tests/test_invoice_request.py+++ b/saleor/graphql/invoice/tests/test_invoice_request.py@@ -24,7 +24,7 @@ INVOICE_REQUEST_MUTATION = """numberurl}- invoiceErrors {+ errors {fieldcode}@@ -94,7 +94,7 @@ def test_invoice_request_invalid_order_status()content = get_graphql_content(response)assert not Invoice.objects.filter(number=number, order=order.pk).exists()- error = content["data"]["invoiceRequest"]["invoiceErrors"][0]+ error = content["data"]["invoiceRequest"]["errors"][0]assert error["field"] == "orderId"assert error["code"] == InvoiceErrorCode.INVALID_STATUS.nameassert not OrderEvent.objects.filter(type=OrderEvents.INVOICE_REQUESTED).exists()@@ -115,7 +115,7 @@ def test_invoice_request_no_billing_address()content = get_graphql_content(response)assert not Invoice.objects.filter(number=number, order=order.pk).exists()- error = content["data"]["invoiceRequest"]["invoiceErrors"][0]+ error = content["data"]["invoiceRequest"]["errors"][0]assert error["field"] == "orderId"assert error["code"] == InvoiceErrorCode.NOT_READY.nameassert not OrderEvent.objects.filter(type=OrderEvents.INVOICE_REQUESTED).exists()@@ -137,6 +137,6 @@ def test_invoice_request_invalid_id(staff_api_client, permission_manage_orders):INVOICE_REQUEST_MUTATION, variables, permissions=[permission_manage_orders])content = get_graphql_content(response)- error = content["data"]["invoiceRequest"]["invoiceErrors"][0]+ error = content["data"]["invoiceRequest"]["errors"][0]assert error["code"] == InvoiceErrorCode.NOT_FOUND.nameassert error["field"] == "orderId"diff --git a/saleor/graphql/invoice/tests/test_invoice_request_delete.py b/saleor/graphql/invoice/tests/test_invoice_request_delete.pyindex 92d3c037d4..2c916cfbe6 100644--- a/saleor/graphql/invoice/tests/test_invoice_request_delete.py+++ b/saleor/graphql/invoice/tests/test_invoice_request_delete.py@@ -12,7 +12,7 @@ INVOICE_REQUEST_DELETE_MUTATION = """invoiceRequestDelete(id: $id) {- invoiceErrors {+ errors {fieldcode}@@ -55,7 +55,7 @@ def test_invoice_request_delete_invalid_id(staff_api_client.user.user_permissions.add(permission_manage_orders)response = staff_api_client.post_graphql(INVOICE_REQUEST_DELETE_MUTATION, variables)content = get_graphql_content(response)- error = content["data"]["invoiceRequestDelete"]["invoiceErrors"][0]+ error = content["data"]["invoiceRequestDelete"]["errors"][0]assert error["code"] == InvoiceErrorCode.NOT_FOUND.nameassert error["field"] == "id"plugin_mock.assert_not_called()diff --git a/saleor/graphql/invoice/tests/test_invoice_update.py b/saleor/graphql/invoice/tests/test_invoice_update.pyindex 43822ea444..9909a3cc4d 100644--- a/saleor/graphql/invoice/tests/test_invoice_update.py+++ b/saleor/graphql/invoice/tests/test_invoice_update.py@@ -23,7 +23,7 @@ INVOICE_UPDATE_MUTATION = """value}}- invoiceErrors {+ errors {fieldcode}@@ -90,7 +90,7 @@ def test_invoice_update_missing_number()content = get_graphql_content(response)invoice.refresh_from_db()- error = content["data"]["invoiceUpdate"]["invoiceErrors"][0]+ error = content["data"]["invoiceUpdate"]["errors"][0]assert error["code"] == InvoiceErrorCode.NUMBER_NOT_SET.nameassert error["field"] == "number"assert invoice.url is None@@ -103,6 +103,6 @@ def test_invoice_update_invalid_id(staff_api_client, permission_manage_orders):INVOICE_UPDATE_MUTATION, variables, permissions=[permission_manage_orders])content = get_graphql_content(response)- error = content["data"]["invoiceUpdate"]["invoiceErrors"][0]+ error = content["data"]["invoiceUpdate"]["errors"][0]assert error["code"] == InvoiceErrorCode.NOT_FOUND.nameassert error["field"] == "id"diff --git a/saleor/graphql/invoice/tests/test_send_invoice_notification.py b/saleor/graphql/invoice/tests/test_send_invoice_notification.pyindex 63b5ae1e1f..7e20c1774d 100644--- a/saleor/graphql/invoice/tests/test_send_invoice_notification.py+++ b/saleor/graphql/invoice/tests/test_send_invoice_notification.py@@ -14,7 +14,7 @@ INVOICE_SEND_EMAIL_MUTATION = """invoiceSendNotification(id: $id) {- invoiceErrors {+ errors {fieldcode}@@ -46,7 +46,7 @@ def test_invoice_send_notification(}mock_notify.assert_called_once_with(NotifyEventType.INVOICE_READY, expected_payload)- assert not content["data"]["invoiceSendNotification"]["invoiceErrors"]+ assert not content["data"]["invoiceSendNotification"]["errors"]@patch("saleor.plugins.manager.PluginsManager.notify")@@ -61,7 +61,7 @@ def test_invoice_send_notification_pending(INVOICE_SEND_EMAIL_MUTATION, variables, permissions=[permission_manage_orders])content = get_graphql_content(response)- errors = content["data"]["invoiceSendNotification"]["invoiceErrors"]+ errors = content["data"]["invoiceSendNotification"]["errors"]assert errors == [{"field": "invoice", "code": "NOT_READY"},{"field": "url", "code": "URL_NOT_SET"},@@ -83,7 +83,7 @@ def test_invoice_send_notification_without_url_and_number(INVOICE_SEND_EMAIL_MUTATION, variables, permissions=[permission_manage_orders])content = get_graphql_content(response)- errors = content["data"]["invoiceSendNotification"]["invoiceErrors"]+ errors = content["data"]["invoiceSendNotification"]["errors"]assert errors == [{"field": "url", "code": "URL_NOT_SET"},{"field": "number", "code": "NUMBER_NOT_SET"},@@ -111,6 +111,6 @@ def test_invoice_send_email_without_email(content = get_graphql_content(response)mock_notify.assert_not_called()assert order_mock.called- errors = content["data"]["invoiceSendNotification"]["invoiceErrors"]+ errors = content["data"]["invoiceSendNotification"]["errors"]assert errors == [{"field": "order", "code": "EMAIL_NOT_SET"}]assert not order.events.filter(type=OrderEvents.INVOICE_SENT).exists()diff --git a/saleor/graphql/menu/tests/benchmark/__init__.py b/saleor/graphql/menu/tests/benchmark/__init__.pydeleted file mode 100644index e69de29bb2..0000000000diff --git a/saleor/graphql/menu/tests/benchmark/conftest.py b/saleor/graphql/menu/tests/benchmark/conftest.pydeleted file mode 100644index 99b0f3a338..0000000000--- a/saleor/graphql/menu/tests/benchmark/conftest.py+++ /dev/null@@ -1,19 +0,0 @@-import pytest---def site_with_top_menu(site_settings):- menu = site_settings.top_menu- menu.items.create(name="Link 1", url="http://example.com/")- menu.items.create(name="Link 2", url="http://example.com/")- menu.items.create(name="Link 3", url="http://example.com/")- return site_settings---def site_with_bottom_menu(site_settings):- menu = site_settings.bottom_menu- menu.items.create(name="Link 1", url="http://example.com/")- menu.items.create(name="Link 2", url="http://example.com/")- menu.items.create(name="Link 3", url="http://example.com/")- return site_settingsdiff --git a/saleor/graphql/menu/tests/benchmark/test_homepage.py b/saleor/graphql/menu/tests/benchmark/test_homepage.pydeleted file mode 100644index 016f991f22..0000000000--- a/saleor/graphql/menu/tests/benchmark/test_homepage.py+++ /dev/null@@ -1,89 +0,0 @@-import pytest--from ....tests.utils import get_graphql_content--[email protected]_queries(autouse=False)-def test_retrieve_main_menu(api_client, site_with_top_menu, count_queries):- query = """- fragment MainMenuSubItem on MenuItem {- id- name- category {- id- name- }- url- collection {- id- name- }- page {- slug- }- parent {- id- }- }-- query MainMenu {- shop {- navigation {- main {- id- items {- ...MainMenuSubItem- children {- ...MainMenuSubItem- children {- ...MainMenuSubItem- }- }- }- }- }- }- }- """-- get_graphql_content(api_client.post_graphql(query))--[email protected]_queries(autouse=False)-def test_retrieve_secondary_menu(api_client, site_with_bottom_menu, count_queries):- query = """- fragment SecondaryMenuSubItem on MenuItem {- id- name- category {- id- name- }- url- collection {- id- name- }- page {- slug- }- }-- query SecondaryMenu {- shop {- navigation {- secondary {- items {- ...SecondaryMenuSubItem- children {- ...SecondaryMenuSubItem- }- }- }- }- }- }- """- get_graphql_content(api_client.post_graphql(query))diff --git a/saleor/graphql/menu/tests/test_menu.py b/saleor/graphql/menu/tests/test_menu.pyindex c3a1910801..92aacf8c21 100644--- a/saleor/graphql/menu/tests/test_menu.py+++ b/saleor/graphql/menu/tests/test_menu.py@@ -651,7 +651,7 @@ UPDATE_MENU_WITH_SLUG_MUTATION = """nameslug}- menuErrors {+ errors {fieldcode}@@ -668,7 +668,7 @@ def test_update_menu(staff_api_client, menu, permission_manage_menus):nameslug}- menuErrors {+ errors {fieldcode}@@ -713,7 +713,7 @@ def test_update_menu_with_slug_already_exists(UPDATE_MENU_WITH_SLUG_MUTATION, variables, permissions=[permission_manage_menus])content = get_graphql_content(response)- error = content["data"]["menuUpdate"]["menuErrors"][0]+ error = content["data"]["menuUpdate"]["errors"][0]assert error["field"] == "slug"assert error["code"] == MenuErrorCode.UNIQUE.namediff --git a/saleor/graphql/meta/tests/test_meta_mutations.py b/saleor/graphql/meta/tests/test_meta_mutations.pyindex 74244e95a9..03929c65de 100644--- a/saleor/graphql/meta/tests/test_meta_mutations.py+++ b/saleor/graphql/meta/tests/test_meta_mutations.py@@ -25,7 +25,7 @@ mutation UpdatePublicMetadata($id: ID!, $input: [MetadataInput!]!) {id: $idinput: $input) {- metadataErrors{+ errors{fieldcodemessage@@ -236,7 +236,7 @@ def test_staff_update_metadata_empty_key(# thendata = response["data"]["updateMetadata"]- errors = data["metadataErrors"]+ errors = data["errors"]assert not data["item"]assert len(errors) == 1@@ -680,7 +680,7 @@ def test_update_public_metadata_for_non_exist_item(api_client):)# then- errors = response["data"]["updateMetadata"]["metadataErrors"]+ errors = response["data"]["updateMetadata"]["errors"]assert errors[0]["field"] == "id"assert errors[0]["code"] == MetadataErrorCode.NOT_FOUND.name@@ -698,7 +698,7 @@ def test_update_public_metadata_for_item_without_meta(api_client, address):)# then- errors = response["data"]["updateMetadata"]["metadataErrors"]+ errors = response["data"]["updateMetadata"]["errors"]assert errors[0]["field"] == "id"assert errors[0]["code"] == MetadataErrorCode.NOT_FOUND.name@@ -709,7 +709,7 @@ mutation DeletePublicMetadata($id: ID!, $keys: [String!]!) {id: $idkeys: $keys) {- metadataErrors{+ errors{fieldcode}@@ -1326,7 +1326,7 @@ def test_delete_public_metadata_for_non_exist_item(api_client):)# then- errors = response["data"]["deleteMetadata"]["metadataErrors"]+ errors = response["data"]["deleteMetadata"]["errors"]assert errors[0]["field"] == "id"assert errors[0]["code"] == MetadataErrorCode.NOT_FOUND.name@@ -1344,7 +1344,7 @@ def test_delete_public_metadata_for_item_without_meta(api_client, address):)# then- errors = response["data"]["deleteMetadata"]["metadataErrors"]+ errors = response["data"]["deleteMetadata"]["errors"]assert errors[0]["field"] == "id"assert errors[0]["code"] == MetadataErrorCode.NOT_FOUND.name@@ -1397,7 +1397,7 @@ mutation UpdatePrivateMetadata($id: ID!, $input: [MetadataInput!]!) {id: $idinput: $input) {- metadataErrors{+ errors{fieldcode}@@ -1625,7 +1625,7 @@ def test_staff_update_private_metadata_empty_key(# thendata = response["data"]["updatePrivateMetadata"]- errors = data["metadataErrors"]+ errors = data["errors"]assert not data["item"]assert len(errors) == 1@@ -2047,7 +2047,7 @@ def test_update_private_metadata_for_non_exist_item()# then- errors = response["data"]["updatePrivateMetadata"]["metadataErrors"]+ errors = response["data"]["updatePrivateMetadata"]["errors"]assert errors[0]["field"] == "id"assert errors[0]["code"] == MetadataErrorCode.NOT_FOUND.name@@ -2065,7 +2065,7 @@ def test_update_private_metadata_for_item_without_meta(api_client, address):)# then- errors = response["data"]["updatePrivateMetadata"]["metadataErrors"]+ errors = response["data"]["updatePrivateMetadata"]["errors"]assert errors[0]["field"] == "id"assert errors[0]["code"] == MetadataErrorCode.NOT_FOUND.name@@ -2076,7 +2076,7 @@ mutation DeletePrivateMetadata($id: ID!, $keys: [String!]!) {id: $idkeys: $keys) {- metadataErrors{+ errors{fieldcode}@@ -2715,7 +2715,7 @@ def test_delete_private_metadata_for_non_exist_item()# then- errors = response["data"]["deletePrivateMetadata"]["metadataErrors"]+ errors = response["data"]["deletePrivateMetadata"]["errors"]assert errors[0]["field"] == "id"assert errors[0]["code"] == MetadataErrorCode.NOT_FOUND.name@@ -2733,7 +2733,7 @@ def test_delete_private_metadata_for_item_without_meta(api_client, address):)# then- errors = response["data"]["deletePrivateMetadata"]["metadataErrors"]+ errors = response["data"]["deletePrivateMetadata"]["errors"]assert errors[0]["field"] == "id"assert errors[0]["code"] == MetadataErrorCode.NOT_FOUND.namediff --git a/saleor/graphql/order/resolvers.py b/saleor/graphql/order/resolvers.pyindex 38aa157d1d..2bd80e7d2a 100644--- a/saleor/graphql/order/resolvers.py+++ b/saleor/graphql/order/resolvers.py@@ -8,43 +8,23 @@ from ...order.models import OrderEventfrom ...order.utils import sum_order_totalsfrom ..channel.utils import get_default_channel_slug_or_graphql_errorfrom ..utils.filters import filter_by_period-from .enums import OrderStatusFilterfrom .types import OrderORDER_SEARCH_FIELDS = ("id", "discount_name", "token", "user_email", "user__email")-def filter_orders(qs, info, created, status):- # DEPRECATED: Will be removed in Saleor 2.11, use the `filter` field instead.- # filter orders by status- if status is not None:- if status == OrderStatusFilter.READY_TO_FULFILL:- qs = qs.ready_to_fulfill()- elif status == OrderStatusFilter.READY_TO_CAPTURE:- qs = qs.ready_to_capture()- elif status == OrderStatusFilter.UNCONFIRMED:- qs = qs.ready_to_confirm()-- # DEPRECATED: Will be removed in Saleor 2.11, use the `filter` field instead.- # filter orders by creation date- if created is not None:- qs = filter_by_period(qs, created, "created")-- return qs--@traced_resolver-def resolve_orders(info, created, status, channel_slug, **_kwargs):+def resolve_orders(_info, channel_slug, **_kwargs):qs = models.Order.objects.non_draft()if channel_slug:qs = qs.filter(channel__slug=str(channel_slug))- return filter_orders(qs, info, created, status)+ return qs@traced_resolver-def resolve_draft_orders(info, created, **_kwargs):+def resolve_draft_orders(_info, **_kwargs):qs = models.Order.objects.drafts()- return filter_orders(qs, info, created, None)+ return qs@traced_resolverdiff --git a/saleor/graphql/order/schema.py b/saleor/graphql/order/schema.pyindex 4f8b6e9161..fad7bb786b 100644--- a/saleor/graphql/order/schema.py+++ b/saleor/graphql/order/schema.py@@ -9,7 +9,6 @@ from ..core.types import FilterInputObjectType, TaxedMoneyfrom ..decorators import permission_requiredfrom .bulk_mutations.draft_orders import DraftOrderBulkDelete, DraftOrderLinesBulkDeletefrom .bulk_mutations.orders import OrderBulkCancel-from .enums import OrderStatusFilterfrom .filters import DraftOrderFilter, OrderFilterfrom .mutations.discount_order import (OrderDiscountAdd,@@ -84,20 +83,6 @@ class OrderQueries(graphene.ObjectType):Order,sort_by=OrderSortingInput(description="Sort orders."),filter=OrderFilterInput(description="Filtering options for orders."),- created=graphene.Argument(- ReportingPeriod,- description=(- "[Deprecated] Filter orders from a selected timespan. Use the `filter` "- "field instead. This field will be removed after 2020-07-31."- ),- ),- status=graphene.Argument(- OrderStatusFilter,- description=(- "[Deprecated] Filter order by status. Use the `filter` field instead. "- "This field will be removed after 2020-07-31."- ),- ),channel=graphene.String(description="Slug of a channel for which the data should be returned."),@@ -107,13 +92,6 @@ class OrderQueries(graphene.ObjectType):Order,sort_by=OrderSortingInput(description="Sort draft orders."),filter=OrderDraftFilterInput(description="Filtering options for draft orders."),- created=graphene.Argument(- ReportingPeriod,- description=(- "[Deprecated] Filter draft orders from a selected timespan. Use the "- "`filter` field instead. This field will be removed after 2020-07-31."- ),- ),description="List of draft orders.",)orders_total = graphene.Field(@@ -141,12 +119,12 @@ class OrderQueries(graphene.ObjectType):return resolve_order(info, data.get("id"))@permission_required(OrderPermissions.MANAGE_ORDERS)- def resolve_orders(self, info, created=None, status=None, channel=None, **_kwargs):- return resolve_orders(info, created, status, channel)+ def resolve_orders(self, info, channel=None, **_kwargs):+ return resolve_orders(info, channel)@permission_required(OrderPermissions.MANAGE_ORDERS)- def resolve_draft_orders(self, info, created=None, **_kwargs):- return resolve_draft_orders(info, created)+ def resolve_draft_orders(self, info, **_kwargs):+ return resolve_draft_orders(info)@permission_required(OrderPermissions.MANAGE_ORDERS)def resolve_orders_total(self, info, period, channel=None, **_kwargs):diff --git a/saleor/graphql/order/tests/benchmark/test_fulfillment_refund_and_return_products.py b/saleor/graphql/order/tests/benchmark/test_fulfillment_refund_and_return_products.pyindex 29f2ee90ae..3cde2cb17e 100644--- a/saleor/graphql/order/tests/benchmark/test_fulfillment_refund_and_return_products.py+++ b/saleor/graphql/order/tests/benchmark/test_fulfillment_refund_and_return_products.py@@ -37,7 +37,7 @@ def test_fulfillment_refund_products_order_lines(}}}- orderErrors {+ errors {fieldcodemessage@@ -116,7 +116,7 @@ def test_fulfillment_return_products_order_lines(idstatus}- orderErrors {+ errors {fieldcodemessagediff --git a/saleor/graphql/order/tests/test_discount_order.py b/saleor/graphql/order/tests/test_discount_order.pyindex 8b07751b98..95f4833343 100644--- a/saleor/graphql/order/tests/test_discount_order.py+++ b/saleor/graphql/order/tests/test_discount_order.py@@ -29,7 +29,7 @@ mutation OrderDiscountAdd($orderId: ID!, $input: OrderDiscountCommonInput!){}}}- orderErrors{+ errors{fieldcodemessage@@ -58,9 +58,9 @@ def test_add_order_discount_incorrect_values(content = get_graphql_content(response)data = content["data"]["orderDiscountAdd"]- errors = data["orderErrors"]+ errors = data["errors"]- error = data["orderErrors"][0]+ error = data["errors"][0]assert error["field"] == "value"assert error["code"] == OrderErrorCode.INVALID.name@@ -80,9 +80,9 @@ def test_add_fixed_order_discount_order_is_not_draft(content = get_graphql_content(response)data = content["data"]["orderDiscountAdd"]- errors = data["orderErrors"]+ errors = data["errors"]assert len(errors) == 1- error = data["orderErrors"][0]+ error = data["errors"][0]assert error["field"] == "orderId"assert error["code"] == OrderErrorCode.CANNOT_DISCOUNT.name@@ -109,7 +109,7 @@ def test_add_fixed_order_discount_to_order(expected_gross = total_before_order_discount.gross.amount - valueexpected_net = total_before_order_discount.net.amount - value- errors = data["orderErrors"]+ errors = data["errors"]assert len(errors) == 0assert expected_gross == order.total.gross.amount@@ -164,7 +164,7 @@ def test_add_percentage_order_discount_to_order(expected_gross_total = discount(total_before_order_discount.gross)expected_total = TaxedMoney(expected_net_total, expected_gross_total)- errors = data["orderErrors"]+ errors = data["errors"]assert len(errors) == 0assert expected_total == order.total@@ -204,7 +204,7 @@ mutation OrderDiscountUpdate($discountId: ID!, $input: OrderDiscountCommonInput!}}}- orderErrors{+ errors{fieldmessagecode@@ -249,7 +249,7 @@ def test_update_percentage_order_discount_to_order(expected_gross_total = discount(current_undiscounted_total.gross)expected_total = TaxedMoney(expected_net_total, expected_gross_total)- errors = data["orderErrors"]+ errors = data["errors"]assert len(errors) == 0assert order.undiscounted_total == current_undiscounted_total@@ -304,7 +304,7 @@ def test_update_fixed_order_discount_to_order(discount = partial(fixed_discount, discount=Money(value, currency=order.currency))expected_total = discount(current_undiscounted_total)- errors = data["orderErrors"]+ errors = data["errors"]assert len(errors) == 0assert order.undiscounted_total == current_undiscounted_total@@ -348,10 +348,10 @@ def test_update_order_discount_order_is_not_draft(content = get_graphql_content(response)data = content["data"]["orderDiscountUpdate"]- errors = data["orderErrors"]+ errors = data["errors"]assert len(errors) == 1- error = data["orderErrors"][0]+ error = data["errors"][0]assert error["field"] == "orderId"assert error["code"] == OrderErrorCode.CANNOT_DISCOUNT.name@@ -384,7 +384,7 @@ def test_update_order_discount_incorrect_values(content = get_graphql_content(response)data = content["data"]["orderDiscountUpdate"]- errors = data["orderErrors"]+ errors = data["errors"]assert len(errors) == 1error = errors[0]@@ -398,7 +398,7 @@ mutation OrderDiscountDelete($discountId: ID!){order{id}- orderErrors{+ errors{fieldmessagecode@@ -431,7 +431,7 @@ def test_delete_order_discount_from_order(order.refresh_from_db()- errors = data["orderErrors"]+ errors = data["errors"]assert len(errors) == 0assert order.undiscounted_total == current_undiscounted_total@@ -457,12 +457,12 @@ def test_delete_order_discount_order_is_not_draft(content = get_graphql_content(response)data = content["data"]["orderDiscountDelete"]- errors = data["orderErrors"]+ errors = data["errors"]assert len(errors) == 1assert draft_order_with_fixed_discount_order.discounts.get()- error = data["orderErrors"][0]+ error = data["errors"][0]assert error["field"] == "orderId"assert error["code"] == OrderErrorCode.CANNOT_DISCOUNT.name@@ -477,7 +477,7 @@ mutation OrderLineDiscountUpdate($input: OrderDiscountCommonInput!, $orderLineId}}}- orderErrors{+ errors{fieldmessagecode@@ -521,7 +521,7 @@ def test_update_order_line_discount(line_to_discount.refresh_from_db()- errors = data["orderErrors"]+ errors = data["errors"]assert not errorsdiscount = partial(@@ -591,7 +591,7 @@ def test_update_order_line_discount_line_with_discount(line_to_discount.refresh_from_db()- errors = data["orderErrors"]+ errors = data["errors"]assert not errorsdiscount = partial(@@ -646,10 +646,10 @@ def test_update_order_line_discount_order_is_not_draft(line_to_discount.refresh_from_db()- errors = data["orderErrors"]+ errors = data["errors"]assert len(errors) == 1- error = data["orderErrors"][0]+ error = data["errors"][0]assert error["field"] == "orderId"assert error["code"] == OrderErrorCode.CANNOT_DISCOUNT.name@@ -662,7 +662,7 @@ mutation OrderLineDiscountRemove($orderLineId: ID!){orderLine{id}- orderErrors{+ errors{fieldmessagecode@@ -703,7 +703,7 @@ def test_delete_discount_from_order_line(content = get_graphql_content(response)data = content["data"]["orderLineDiscountRemove"]- errors = data["orderErrors"]+ errors = data["errors"]assert len(errors) == 0line.refresh_from_db()@@ -744,12 +744,12 @@ def test_delete_order_line_discount_order_is_not_draft(content = get_graphql_content(response)data = content["data"]["orderLineDiscountRemove"]- errors = data["orderErrors"]+ errors = data["errors"]assert len(errors) == 1assert draft_order_with_fixed_discount_order.discounts.get()- error = data["orderErrors"][0]+ error = data["errors"][0]assert error["field"] == "orderId"assert error["code"] == OrderErrorCode.CANNOT_DISCOUNT.namediff --git a/saleor/graphql/order/tests/test_fulfillment.py b/saleor/graphql/order/tests/test_fulfillment.pyindex 2bd0a23969..a1a904183d 100644--- a/saleor/graphql/order/tests/test_fulfillment.py+++ b/saleor/graphql/order/tests/test_fulfillment.py@@ -19,7 +19,7 @@ mutation fulfillOrder(order: $order,input: $input) {- orderErrors {+ errors {fieldcodemessage@@ -68,7 +68,7 @@ def test_order_fulfill()content = get_graphql_content(response)data = content["data"]["orderFulfill"]- assert not data["orderErrors"]+ assert not data["errors"]fulfillment_lines_for_warehouses = {str(warehouse.pk): [@@ -118,7 +118,7 @@ def test_order_fulfill_as_app()content = get_graphql_content(response)data = content["data"]["orderFulfill"]- assert not data["orderErrors"]+ assert not data["errors"]fulfillment_lines_for_warehouses = {str(warehouse.pk): [@@ -175,7 +175,7 @@ def test_order_fulfill_many_warehouses()content = get_graphql_content(response)data = content["data"]["orderFulfill"]- assert not data["orderErrors"]+ assert not data["errors"]fulfillment_lines_for_warehouses = {str(warehouse1.pk): [@@ -222,7 +222,7 @@ def test_order_fulfill_without_notification()content = get_graphql_content(response)data = content["data"]["orderFulfill"]- assert not data["orderErrors"]+ assert not data["errors"]fulfillment_lines_for_warehouses = {str(warehouse.pk): [{"order_line": order_line, "quantity": 1}]@@ -280,7 +280,7 @@ def test_order_fulfill_lines_with_empty_quantity()content = get_graphql_content(response)data = content["data"]["orderFulfill"]- assert not data["orderErrors"]+ assert not data["errors"]fulfillment_lines_for_warehouses = {str(warehouse.pk): [{"order_line": order_line2, "quantity": 2}]@@ -320,8 +320,8 @@ def test_order_fulfill_zero_quantity()content = get_graphql_content(response)data = content["data"]["orderFulfill"]- assert data["orderErrors"]- error = data["orderErrors"][0]+ assert data["errors"]+ error = data["errors"][0]assert error["field"] == "lines"assert error["code"] == OrderErrorCode.ZERO_QUANTITY.nameassert not error["orderLine"]@@ -360,8 +360,8 @@ def test_order_fulfill_channel_without_shipping_zones()content = get_graphql_content(response)data = content["data"]["orderFulfill"]- assert len(data["orderErrors"]) == 1- error = data["orderErrors"][0]+ assert len(data["errors"]) == 1+ error = data["errors"][0]assert error["field"] == "stocks"assert error["code"] == OrderErrorCode.INSUFFICIENT_STOCK.name@@ -396,8 +396,8 @@ def test_order_fulfill_fulfilled_order()content = get_graphql_content(response)data = content["data"]["orderFulfill"]- assert data["orderErrors"]- error = data["orderErrors"][0]+ assert data["errors"]+ error = data["errors"][0]assert error["field"] == "orderLineId"assert error["code"] == OrderErrorCode.FULFILL_ORDER_LINE.nameassert error["orderLine"] == order_line_id@@ -449,8 +449,8 @@ def test_order_fulfill_warehouse_with_insufficient_stock_exception()content = get_graphql_content(response)data = content["data"]["orderFulfill"]- assert data["orderErrors"]- error = data["orderErrors"][0]+ assert data["errors"]+ error = data["errors"][0]assert error["field"] == "stocks"assert error["code"] == OrderErrorCode.INSUFFICIENT_STOCK.nameassert error["orderLine"] == order_line_id@@ -490,8 +490,8 @@ def test_order_fulfill_warehouse_duplicated_warehouse_id()content = get_graphql_content(response)data = content["data"]["orderFulfill"]- assert data["orderErrors"]- error = data["orderErrors"][0]+ assert data["errors"]+ error = data["errors"][0]assert error["field"] == "warehouse"assert error["code"] == OrderErrorCode.DUPLICATED_INPUT_ITEM.nameassert not error["orderLine"]@@ -533,8 +533,8 @@ def test_order_fulfill_warehouse_duplicated_order_line_id()content = get_graphql_content(response)data = content["data"]["orderFulfill"]- assert data["orderErrors"]- error = data["orderErrors"][0]+ assert data["errors"]+ error = data["errors"][0]assert error["field"] == "orderLineId"assert error["code"] == OrderErrorCode.DUPLICATED_INPUT_ITEM.nameassert error["orderLine"] == order_line_iddiff --git a/saleor/graphql/order/tests/test_fulfillment_refund_products.py b/saleor/graphql/order/tests/test_fulfillment_refund_products.pyindex 3a187572ac..5924f6eb19 100644--- a/saleor/graphql/order/tests/test_fulfillment_refund_products.py+++ b/saleor/graphql/order/tests/test_fulfillment_refund_products.py@@ -30,7 +30,7 @@ mutation OrderFulfillmentRefundProducts(}}}- orderErrors {+ errors {fieldcodemessage@@ -52,7 +52,7 @@ def test_fulfillment_refund_products_order_without_payment(content = get_graphql_content(response)data = content["data"]["orderFulfillmentRefundProducts"]fulfillment = data["fulfillment"]- errors = data["orderErrors"]+ errors = data["errors"]assert len(errors) == 1assert errors[0]["field"] == "order"assert errors[0]["code"] == OrderErrorCode.CANNOT_REFUND.name@@ -110,7 +110,7 @@ def test_fulfillment_refund_products_order_lines(content = get_graphql_content(response)data = content["data"]["orderFulfillmentRefundProducts"]refund_fulfillment = data["fulfillment"]- errors = data["orderErrors"]+ errors = data["errors"]assert not errorsassert refund_fulfillment["status"] == FulfillmentStatus.REFUNDED.upper()assert len(refund_fulfillment["lines"]) == 1@@ -141,7 +141,7 @@ def test_fulfillment_refund_products_order_lines_quantity_bigger_than_total(content = get_graphql_content(response)data = content["data"]["orderFulfillmentRefundProducts"]refund_fulfillment = data["fulfillment"]- errors = data["orderErrors"]+ errors = data["errors"]assert len(errors) == 1assert errors[0]["field"] == "orderLineId"@@ -172,7 +172,7 @@ def test_fulfillment_refund_products_order_lines_quantity_bigger_than_unfulfillecontent = get_graphql_content(response)data = content["data"]["orderFulfillmentRefundProducts"]refund_fulfillment = data["fulfillment"]- errors = data["orderErrors"]+ errors = data["errors"]assert len(errors) == 1assert errors[0]["field"] == "orderLineId"@@ -214,7 +214,7 @@ def test_fulfillment_refund_products_fulfillment_lines(content = get_graphql_content(response)data = content["data"]["orderFulfillmentRefundProducts"]refund_fulfillment = data["fulfillment"]- errors = data["orderErrors"]+ errors = data["errors"]assert not errorsassert refund_fulfillment["status"] == FulfillmentStatus.REFUNDED.upper()@@ -255,7 +255,7 @@ def test_fulfillment_refund_products_fulfillment_lines_quantity_bigger_than_totadata = content["data"]["orderFulfillmentRefundProducts"]refund_fulfillment = data["fulfillment"]- errors = data["orderErrors"]+ errors = data["errors"]assert len(errors) == 1assert errors[0]["field"] == "fulfillmentLineId"assert errors[0]["code"] == OrderErrorCode.INVALID_QUANTITY.name@@ -290,7 +290,7 @@ def test_fulfillment_refund_products_amount_bigger_than_captured_amount(data = content["data"]["orderFulfillmentRefundProducts"]refund_fulfillment = data["fulfillment"]- errors = data["orderErrors"]+ errors = data["errors"]assert len(errors) == 1assert errors[0]["field"] == "amountToRefund"assert errors[0]["code"] == OrderErrorCode.CANNOT_REFUND.name@@ -332,7 +332,7 @@ def test_fulfillment_refund_products_fulfillment_lines_include_shipping_costs(content = get_graphql_content(response)data = content["data"]["orderFulfillmentRefundProducts"]refund_fulfillment = data["fulfillment"]- errors = data["orderErrors"]+ errors = data["errors"]assert not errorsassert refund_fulfillment["status"] == FulfillmentStatus.REFUNDED.upper()@@ -372,7 +372,7 @@ def test_fulfillment_refund_products_order_lines_include_shipping_costs(content = get_graphql_content(response)data = content["data"]["orderFulfillmentRefundProducts"]refund_fulfillment = data["fulfillment"]- errors = data["orderErrors"]+ errors = data["errors"]assert not errorsassert refund_fulfillment["status"] == FulfillmentStatus.REFUNDED.upper()assert len(refund_fulfillment["lines"]) == 1@@ -419,7 +419,7 @@ def test_fulfillment_refund_products_fulfillment_lines_custom_amount(content = get_graphql_content(response)data = content["data"]["orderFulfillmentRefundProducts"]refund_fulfillment = data["fulfillment"]- errors = data["orderErrors"]+ errors = data["errors"]assert not errorsassert refund_fulfillment["status"] == FulfillmentStatus.REFUNDED.upper()@@ -458,7 +458,7 @@ def test_fulfillment_refund_products_order_lines_custom_amount(content = get_graphql_content(response)data = content["data"]["orderFulfillmentRefundProducts"]refund_fulfillment = data["fulfillment"]- errors = data["orderErrors"]+ errors = data["errors"]assert not errorsassert refund_fulfillment["status"] == FulfillmentStatus.REFUNDED.upper()assert len(refund_fulfillment["lines"]) == 1@@ -532,7 +532,7 @@ def test_fulfillment_refund_products_fulfillment_lines_and_order_lines(content = get_graphql_content(response)data = content["data"]["orderFulfillmentRefundProducts"]refund_fulfillment = data["fulfillment"]- errors = data["orderErrors"]+ errors = data["errors"]assert not errorsassert refund_fulfillment["status"] == FulfillmentStatus.REFUNDED.upper()diff --git a/saleor/graphql/order/tests/test_fulfillment_return_products.py b/saleor/graphql/order/tests/test_fulfillment_return_products.pyindex 784c6e4c0a..b5f93c46fa 100644--- a/saleor/graphql/order/tests/test_fulfillment_return_products.py+++ b/saleor/graphql/order/tests/test_fulfillment_return_products.py@@ -50,7 +50,7 @@ mutation OrderFulfillmentReturnProducts(idstatus}- orderErrors {+ errors {fieldcodemessage@@ -75,7 +75,7 @@ def test_fulfillment_return_products_order_without_payment(content = get_graphql_content(response)data = content["data"]["orderFulfillmentReturnProducts"]fulfillment = data["returnFulfillment"]- errors = data["orderErrors"]+ errors = data["errors"]assert len(errors) == 1assert errors[0]["field"] == "order"assert errors[0]["code"] == OrderErrorCode.CANNOT_REFUND.name@@ -188,7 +188,7 @@ def test_fulfillment_return_products_order_lines(return_fulfillment = data["returnFulfillment"]replace_fulfillment = data["replaceFulfillment"]replace_order = data["replaceOrder"]- errors = data["orderErrors"]+ errors = data["errors"]assert not errorsassert (@@ -240,7 +240,7 @@ def test_fulfillment_return_products_order_lines_quantity_bigger_than_total(content = get_graphql_content(response)data = content["data"]["orderFulfillmentReturnProducts"]return_fulfillment = data["returnFulfillment"]- errors = data["orderErrors"]+ errors = data["errors"]assert len(errors) == 1assert errors[0]["field"] == "orderLineId"@@ -271,7 +271,7 @@ def test_fulfillment_return_products_order_lines_quantity_bigger_than_unfulfillecontent = get_graphql_content(response)data = content["data"]["orderFulfillmentReturnProducts"]return_fulfillment = data["returnFulfillment"]- errors = data["orderErrors"]+ errors = data["errors"]assert len(errors) == 1assert errors[0]["field"] == "orderLineId"@@ -309,7 +309,7 @@ def test_fulfillment_return_products_order_lines_custom_amount(content = get_graphql_content(response)data = content["data"]["orderFulfillmentReturnProducts"]return_fulfillment = data["returnFulfillment"]- errors = data["orderErrors"]+ errors = data["errors"]assert not errorsassert (return_fulfillment["status"] == FulfillmentStatus.REFUNDED_AND_RETURNED.upper()@@ -401,7 +401,7 @@ def test_fulfillment_return_products_fulfillment_lines(content = get_graphql_content(response)data = content["data"]["orderFulfillmentReturnProducts"]- errors = data["orderErrors"]+ errors = data["errors"]return_fulfillment = data["returnFulfillment"]replace_fulfillment = data["replaceFulfillment"]replace_order = data["replaceOrder"]@@ -465,7 +465,7 @@ def test_fulfillment_return_products_fulfillment_lines_quantity_bigger_than_totadata = content["data"]["orderFulfillmentReturnProducts"]return_fulfillment = data["returnFulfillment"]- errors = data["orderErrors"]+ errors = data["errors"]assert len(errors) == 1assert errors[0]["field"] == "fulfillmentLineId"assert errors[0]["code"] == OrderErrorCode.INVALID_QUANTITY.name@@ -501,7 +501,7 @@ def test_fulfillment_return_products_amount_bigger_than_captured_amount(data = content["data"]["orderFulfillmentReturnProducts"]return_fulfillment = data["returnFulfillment"]- errors = data["orderErrors"]+ errors = data["errors"]assert len(errors) == 1assert errors[0]["field"] == "amountToRefund"assert errors[0]["code"] == OrderErrorCode.CANNOT_REFUND.name@@ -540,7 +540,7 @@ def test_fulfillment_return_products_lines_with_incorrect_status(data = content["data"]["orderFulfillmentReturnProducts"]return_fulfillment = data["returnFulfillment"]- errors = data["orderErrors"]+ errors = data["errors"]assert len(errors) == 1assert errors[0]["field"] == "amountToRefund"assert errors[0]["code"] == OrderErrorCode.CANNOT_REFUND.name@@ -583,7 +583,7 @@ def test_fulfillment_return_products_fulfillment_lines_include_shipping_costs(content = get_graphql_content(response)data = content["data"]["orderFulfillmentReturnProducts"]return_fulfillment = data["returnFulfillment"]- errors = data["orderErrors"]+ errors = data["errors"]assert not errorsassert (@@ -665,7 +665,7 @@ def test_fulfillment_return_products_fulfillment_lines_and_order_lines(content = get_graphql_content(response)data = content["data"]["orderFulfillmentReturnProducts"]- errors = data["orderErrors"]+ errors = data["errors"]return_fulfillment = data["returnFulfillment"]replace_fulfillment = data["replaceFulfillment"]replace_order = data["replaceOrder"]diff --git a/saleor/graphql/order/tests/test_homepage.py b/saleor/graphql/order/tests/test_homepage.pyindex 6b7a8a1758..81f9b3cd8d 100644--- a/saleor/graphql/order/tests/test_homepage.py+++ b/saleor/graphql/order/tests/test_homepage.py@@ -1,3 +1,5 @@+from datetime import date, timedelta+from prices import Moneyfrom ...core.enums import ReportingPeriod@@ -182,11 +184,11 @@ def test_orders_total_as_anonymous(QUERY_ORDER_TODAY_COUNT = """-query OrdersToday($created: ReportingPeriod, $channel: String) {- orders(created: $created, channel: $channel ) {- totalCount+ query OrdersToday($created: DateRangeInput, $channel: String) {+ orders(filter: {created: $created}, channel: $channel ) {+ totalCount+ }}-}"""@@ -198,7 +200,12 @@ def test_orders_total_count_without_channel(channel_USD,):# given- variables = {"created": ReportingPeriod.TODAY.name}+ variables = {+ "created": {+ "gte": str(date.today() - timedelta(days=3)),+ "lte": str(date.today()),+ }+ }# whenresponse = staff_api_client.post_graphql(@@ -218,7 +225,13 @@ def test_orders_total_count_channel_USD(channel_USD,):# given- variables = {"created": ReportingPeriod.TODAY.name, "channel": channel_USD.slug}+ variables = {+ "created": {+ "gte": str(date.today() - timedelta(days=3)),+ "lte": str(date.today()),+ },+ "channel": channel_USD.slug,+ }# whenresponse = staff_api_client.post_graphql(@@ -238,7 +251,13 @@ def test_orders_total_count_channel_PLN(channel_PLN,):# given- variables = {"created": ReportingPeriod.TODAY.name, "channel": channel_PLN.slug}+ variables = {+ "created": {+ "gte": str(date.today() - timedelta(days=3)),+ "lte": str(date.today()),+ },+ "channel": channel_PLN.slug,+ }# whenresponse = staff_api_client.post_graphql(@@ -258,7 +277,13 @@ def test_orders_total_count_as_staff(channel_USD,):# given- variables = {"created": ReportingPeriod.TODAY.name, "channel": channel_USD.slug}+ variables = {+ "created": {+ "gte": str(date.today() - timedelta(days=3)),+ "lte": str(date.today()),+ },+ "channel": channel_USD.slug,+ }# whenresponse = staff_api_client.post_graphql(@@ -278,7 +303,13 @@ def test_orders_total_count_as_app(channel_USD,):# given- variables = {"created": ReportingPeriod.TODAY.name, "channel": channel_USD.slug}+ variables = {+ "created": {+ "gte": str(date.today() - timedelta(days=3)),+ "lte": str(date.today()),+ },+ "channel": channel_USD.slug,+ }# whenresponse = app_api_client.post_graphql(@@ -297,7 +328,13 @@ def test_orders_total_count_as_customer(channel_USD,):# given- variables = {"created": ReportingPeriod.TODAY.name, "channel": channel_USD.slug}+ variables = {+ "created": {+ "gte": str(date.today() - timedelta(days=3)),+ "lte": str(date.today()),+ },+ "channel": channel_USD.slug,+ }# whenresponse = user_api_client.post_graphql(QUERY_ORDER_TODAY_COUNT, variables)@@ -313,7 +350,13 @@ def test_orders_total_count_as_anonymous(channel_USD,):# given- variables = {"created": ReportingPeriod.TODAY.name, "channel": channel_USD.slug}+ variables = {+ "created": {+ "gte": str(date.today() - timedelta(days=3)),+ "lte": str(date.today()),+ },+ "channel": channel_USD.slug,+ }# whenresponse = api_client.post_graphql(QUERY_ORDER_TODAY_COUNT, variables)diff --git a/saleor/graphql/order/tests/test_order.py b/saleor/graphql/order/tests/test_order.pyindex 031cfe5c07..fe42889550 100644--- a/saleor/graphql/order/tests/test_order.py+++ b/saleor/graphql/order/tests/test_order.py@@ -835,7 +835,7 @@ def test_order_query_shows_non_draft_orders(ORDER_CONFIRM_MUTATION = """mutation orderConfirm($id: ID!) {orderConfirm(id: $id) {- orderErrors {+ errors {fieldcode}@@ -903,7 +903,7 @@ def test_order_confirm_unfulfilled(staff_api_client, order, permission_manage_orORDER_CONFIRM_MUTATION, {"id": graphene.Node.to_global_id("Order", order.id)})content = get_graphql_content(response)["data"]["orderConfirm"]- errors = content["orderErrors"]+ errors = content["errors"]order.refresh_from_db()assert order.status == OrderStatus.UNFULFILLED@@ -923,7 +923,7 @@ def test_order_confirm_no_products_in_order({"id": graphene.Node.to_global_id("Order", order_unconfirmed.id)},)content = get_graphql_content(response)["data"]["orderConfirm"]- errors = content["orderErrors"]+ errors = content["errors"]order_unconfirmed.refresh_from_db()assert order_unconfirmed.is_unconfirmed()@@ -1260,7 +1260,7 @@ DRAFT_ORDER_CREATE_MUTATION = """channel: $channel,redirectUrl: $redirectUrl,customerNote: $customerNote}) {- orderErrors {+ errors {fieldcodevariants@@ -1339,7 +1339,7 @@ def test_draft_order_create(query, variables, permissions=[permission_manage_orders])content = get_graphql_content(response)- assert not content["data"]["draftOrderCreate"]["orderErrors"]+ assert not content["data"]["draftOrderCreate"]["errors"]data = content["data"]["draftOrderCreate"]["order"]assert data["status"] == OrderStatus.DRAFT.upper()assert data["voucher"]["code"] == voucher.code@@ -1415,7 +1415,7 @@ def test_draft_order_create_with_inactive_channel(query, variables, permissions=[permission_manage_orders])content = get_graphql_content(response)- assert not content["data"]["draftOrderCreate"]["orderErrors"]+ assert not content["data"]["draftOrderCreate"]["errors"]data = content["data"]["draftOrderCreate"]["order"]assert data["status"] == OrderStatus.DRAFT.upper()assert data["voucher"]["code"] == voucher.code@@ -1482,7 +1482,7 @@ def test_draft_order_create_variant_with_0_price(query, variables, permissions=[permission_manage_orders])content = get_graphql_content(response)- assert not content["data"]["draftOrderCreate"]["orderErrors"]+ assert not content["data"]["draftOrderCreate"]["errors"]data = content["data"]["draftOrderCreate"]["order"]assert data["status"] == OrderStatus.DRAFT.upper()@@ -1557,7 +1557,7 @@ def test_draft_order_create_tax_error()content = get_graphql_content(response)data = content["data"]["draftOrderCreate"]- errors = data["orderErrors"]+ errors = data["errors"]assert not data["order"]assert len(errors) == 1assert errors[0]["code"] == OrderErrorCode.TAX_ERROR.name@@ -1607,7 +1607,7 @@ def test_draft_order_create_with_voucher_not_assigned_to_order_channel(query, variables, permissions=[permission_manage_orders])content = get_graphql_content(response)- error = content["data"]["draftOrderCreate"]["orderErrors"][0]+ error = content["data"]["draftOrderCreate"]["errors"][0]assert error["code"] == OrderErrorCode.NOT_AVAILABLE_IN_CHANNEL.nameassert error["field"] == "voucher"@@ -1647,7 +1647,7 @@ def test_draft_order_create_with_product_and_variant_not_assigned_to_order_channquery, variables, permissions=[permission_manage_orders])content = get_graphql_content(response)- error = content["data"]["draftOrderCreate"]["orderErrors"][0]+ error = content["data"]["draftOrderCreate"]["errors"][0]assert error["code"] == OrderErrorCode.PRODUCT_NOT_PUBLISHED.nameassert error["field"] == "lines"assert error["variants"] == [variant_id]@@ -1688,7 +1688,7 @@ def test_draft_order_create_with_variant_not_assigned_to_order_channel(query, variables, permissions=[permission_manage_orders])content = get_graphql_content(response)- error = content["data"]["draftOrderCreate"]["orderErrors"][0]+ error = content["data"]["draftOrderCreate"]["errors"][0]assert error["code"] == OrderErrorCode.NOT_AVAILABLE_IN_CHANNEL.nameassert error["field"] == "lines"assert error["variants"] == [variant_id]@@ -1726,7 +1726,7 @@ def test_draft_order_create_without_channel(query, variables, permissions=[permission_manage_orders])content = get_graphql_content(response)- error = content["data"]["draftOrderCreate"]["orderErrors"][0]+ error = content["data"]["draftOrderCreate"]["errors"][0]assert error["code"] == OrderErrorCode.REQUIRED.nameassert error["field"] == "channel"@@ -1767,7 +1767,7 @@ def test_draft_order_create_with_negative_quantity_line(query, variables, permissions=[permission_manage_orders])content = get_graphql_content(response)- error = content["data"]["draftOrderCreate"]["orderErrors"][0]+ error = content["data"]["draftOrderCreate"]["errors"][0]assert error["code"] == OrderErrorCode.ZERO_QUANTITY.nameassert error["field"] == "quantity"@@ -1825,7 +1825,7 @@ def test_draft_order_create_with_channel_with_unpublished_product(query, variables, permissions=[permission_manage_orders])content = get_graphql_content(response)- error = content["data"]["draftOrderCreate"]["orderErrors"][0]+ error = content["data"]["draftOrderCreate"]["errors"][0]assert error["field"] == "lines"assert error["code"] == OrderErrorCode.PRODUCT_NOT_PUBLISHED.name@@ -1885,7 +1885,7 @@ def test_draft_order_create_with_channel_with_unpublished_product_by_date(query, variables, permissions=[permission_manage_orders])content = get_graphql_content(response)- error = content["data"]["draftOrderCreate"]["orderErrors"][0]+ error = content["data"]["draftOrderCreate"]["errors"][0]assert error["field"] == "lines"assert error["code"] == "PRODUCT_NOT_PUBLISHED"@@ -1941,7 +1941,7 @@ def test_draft_order_create_with_channel(query, variables, permissions=[permission_manage_orders])content = get_graphql_content(response)- assert not content["data"]["draftOrderCreate"]["orderErrors"]+ assert not content["data"]["draftOrderCreate"]["errors"]data = content["data"]["draftOrderCreate"]["order"]assert data["status"] == OrderStatus.DRAFT.upper()assert data["voucher"]["code"] == voucher.code@@ -1981,7 +1981,7 @@ DRAFT_UPDATE_QUERY = """customerNote: $customerNotechannel: $channel}) {- orderErrors {+ errors {fieldcodemessage@@ -2015,7 +2015,7 @@ def test_draft_order_update_existing_channel_id(query, variables, permissions=[permission_manage_orders])content = get_graphql_content(response)- error = content["data"]["draftOrderUpdate"]["orderErrors"][0]+ error = content["data"]["draftOrderUpdate"]["errors"][0]assert error["code"] == OrderErrorCode.NOT_EDITABLE.nameassert error["field"] == "channel"@@ -2041,7 +2041,7 @@ def test_draft_order_update_voucher_not_available(query, variables, permissions=[permission_manage_orders])content = get_graphql_content(response)- error = content["data"]["draftOrderUpdate"]["orderErrors"][0]+ error = content["data"]["draftOrderUpdate"]["errors"][0]assert error["code"] == OrderErrorCode.NOT_AVAILABLE_IN_CHANNEL.nameassert error["field"] == "voucher"@@ -2057,7 +2057,7 @@ DRAFT_ORDER_UPDATE_MUTATION = """customerNote: $customerNote,shippingAddress: $shippingAddress,}) {- orderErrors {+ errors {fieldmessagecode@@ -2091,7 +2091,7 @@ def test_draft_order_update()content = get_graphql_content(response)data = content["data"]["draftOrderUpdate"]- assert not data["orderErrors"]+ assert not data["errors"]order.refresh_from_db()assert order.voucherassert order.customer_note == customer_note@@ -2110,7 +2110,7 @@ def test_draft_order_update_with_non_draft_order(query, variables, permissions=[permission_manage_orders])content = get_graphql_content(response)- error = content["data"]["draftOrderUpdate"]["orderErrors"][0]+ error = content["data"]["draftOrderUpdate"]["errors"][0]assert error["field"] == "id"assert error["code"] == OrderErrorCode.INVALID.name@@ -2144,7 +2144,7 @@ def test_draft_order_update_tax_error()content = get_graphql_content(response)data = content["data"]["draftOrderUpdate"]- errors = data["orderErrors"]+ errors = data["errors"]assert len(errors) == 1assert errors[0]["code"] == OrderErrorCode.TAX_ERROR.nameassert errors[0]["message"] == f"Unable to calculate taxes - {err_msg}"@@ -2459,7 +2459,7 @@ def test_validate_draft_order_no_shipping_address_no_method_shipping_not_requireDRAFT_ORDER_COMPLETE_MUTATION = """mutation draftComplete($id: ID!) {draftOrderComplete(id: $id) {- orderErrors {+ errors {fieldcodevariants@@ -2533,8 +2533,8 @@ def test_draft_order_complete_with_inactive_channel()content = get_graphql_content(response)data = content["data"]["draftOrderComplete"]- assert data["orderErrors"][0]["code"] == OrderErrorCode.CHANNEL_INACTIVE.name- assert data["orderErrors"][0]["field"] == "channel"+ assert data["errors"][0]["code"] == OrderErrorCode.CHANNEL_INACTIVE.name+ assert data["errors"][0]["field"] == "channel"def test_draft_order_complete_with_unavailable_variant(@@ -2556,11 +2556,9 @@ def test_draft_order_complete_with_unavailable_variant()content = get_graphql_content(response)data = content["data"]["draftOrderComplete"]- assert (- data["orderErrors"][0]["code"] == OrderErrorCode.NOT_AVAILABLE_IN_CHANNEL.name- )- assert data["orderErrors"][0]["field"] == "lines"- assert data["orderErrors"][0]["variants"] == [variant_id]+ assert data["errors"][0]["code"] == OrderErrorCode.NOT_AVAILABLE_IN_CHANNEL.name+ assert data["errors"][0]["field"] == "lines"+ assert data["errors"][0]["variants"] == [variant_id]def test_draft_order_complete_channel_without_shipping_zones(@@ -2585,12 +2583,11 @@ def test_draft_order_complete_channel_without_shipping_zones()content = get_graphql_content(response)data = content["data"]["draftOrderComplete"]- assert len(data["orderErrors"]) == 1+ assert len(data["errors"]) == 1assert (- data["orderErrors"][0]["code"]- == OrderErrorCode.SHIPPING_METHOD_NOT_APPLICABLE.name+ data["errors"][0]["code"] == OrderErrorCode.SHIPPING_METHOD_NOT_APPLICABLE.name)- assert data["orderErrors"][0]["field"] == "shipping"+ assert data["errors"][0]["field"] == "shipping"def test_draft_order_complete_product_without_inventory_tracking(@@ -2618,7 +2615,7 @@ def test_draft_order_complete_product_without_inventory_tracking(content = get_graphql_content(response)data = content["data"]["draftOrderComplete"]["order"]- assert not content["data"]["draftOrderComplete"]["orderErrors"]+ assert not content["data"]["draftOrderComplete"]["errors"]order.refresh_from_db()assert data["status"] == order.status.upper()@@ -2669,12 +2666,11 @@ def test_draft_order_complete_not_available_shipping_method(data = content["data"]["draftOrderComplete"]["order"]content = get_graphql_content(response)data = content["data"]["draftOrderComplete"]- assert len(data["orderErrors"]) == 1+ assert len(data["errors"]) == 1assert (- data["orderErrors"][0]["code"]- == OrderErrorCode.SHIPPING_METHOD_NOT_APPLICABLE.name+ data["errors"][0]["code"] == OrderErrorCode.SHIPPING_METHOD_NOT_APPLICABLE.name)- assert data["orderErrors"][0]["field"] == "shipping"+ assert data["errors"][0]["field"] == "shipping"def test_draft_order_complete_out_of_stock_variant(@@ -2696,7 +2692,7 @@ def test_draft_order_complete_out_of_stock_variant(DRAFT_ORDER_COMPLETE_MUTATION, variables, permissions=[permission_manage_orders])content = get_graphql_content(response)- error = content["data"]["draftOrderComplete"]["orderErrors"][0]+ error = content["data"]["draftOrderComplete"]["errors"][0]order.refresh_from_db()assert order.status == OrderStatus.DRAFT@@ -2807,7 +2803,7 @@ def test_draft_order_complete_unavailable_for_purchase(# thencontent = get_graphql_content(response)- error = content["data"]["draftOrderComplete"]["orderErrors"][0]+ error = content["data"]["draftOrderComplete"]["errors"][0]order.refresh_from_db()assert order.status == OrderStatus.DRAFT@@ -2820,7 +2816,7 @@ ORDER_LINES_CREATE_MUTATION = """orderLinesCreate(id: $orderId,input: [{variantId: $variantId, quantity: $quantity}]) {- orderErrors {+ errors {fieldcodemessage@@ -2881,9 +2877,9 @@ def test_order_lines_create(response = staff_api_client.post_graphql(query, variables)content = get_graphql_content(response)data = content["data"]["orderLinesCreate"]- assert data["orderErrors"]- assert data["orderErrors"][0]["field"] == "quantity"- assert data["orderErrors"][0]["variants"] == [variant_id]+ assert data["errors"]+ assert data["errors"][0]["field"] == "quantity"+ assert data["errors"][0]["variants"] == [variant_id]def test_order_lines_create_with_unavailable_variant(@@ -2904,7 +2900,7 @@ def test_order_lines_create_with_unavailable_variant(query, variables, permissions=[permission_manage_orders])content = get_graphql_content(response)- error = content["data"]["orderLinesCreate"]["orderErrors"][0]+ error = content["data"]["orderLinesCreate"]["errors"][0]assert error["code"] == OrderErrorCode.NOT_AVAILABLE_IN_CHANNEL.nameassert error["field"] == "input"assert error["variants"] == [variant_id]@@ -2965,7 +2961,7 @@ def test_order_lines_create_with_product_and_variant_not_assigned_to_channel(query, variables, permissions=[permission_manage_orders])content = get_graphql_content(response)- error = content["data"]["orderLinesCreate"]["orderErrors"][0]+ error = content["data"]["orderLinesCreate"]["errors"][0]assert error["code"] == OrderErrorCode.PRODUCT_NOT_PUBLISHED.nameassert error["field"] == "input"assert error["variants"] == [variant_id]@@ -2998,7 +2994,7 @@ def test_order_lines_create_with_variant_not_assigned_to_channel(query, variables, permissions=[permission_manage_orders])content = get_graphql_content(response)- error = content["data"]["orderLinesCreate"]["orderErrors"][0]+ error = content["data"]["orderLinesCreate"]["errors"][0]assert error["code"] == OrderErrorCode.NOT_AVAILABLE_IN_CHANNEL.nameassert error["field"] == "input"assert error["variants"] == [variant_id]@@ -3019,7 +3015,7 @@ def test_invalid_order_when_creating_lines()content = get_graphql_content(response)data = content["data"]["orderLinesCreate"]- assert data["orderErrors"]+ assert data["errors"]ORDER_LINE_UPDATE_MUTATION = """@@ -3266,7 +3262,7 @@ ORDER_UPDATE_MUTATION = """userEmail: $email,shippingAddress: $address,billingAddress: $address}) {- orderErrors {+ errors {fieldcode}@@ -3299,7 +3295,7 @@ def test_order_update(ORDER_UPDATE_MUTATION, variables, permissions=[permission_manage_orders])content = get_graphql_content(response)- assert not content["data"]["orderUpdate"]["orderErrors"]+ assert not content["data"]["orderUpdate"]["errors"]data = content["data"]["orderUpdate"]["order"]assert data["userEmail"] == email@@ -3332,7 +3328,7 @@ def test_order_update_with_draft_order(ORDER_UPDATE_MUTATION, variables, permissions=[permission_manage_orders])content = get_graphql_content(response)- error = content["data"]["orderUpdate"]["orderErrors"][0]+ error = content["data"]["orderUpdate"]["errors"][0]assert error["field"] == "id"assert error["code"] == OrderErrorCode.INVALID.nameassert plugin_mock.called is False@@ -3427,7 +3423,7 @@ def test_order_update_user_email_existing_user(ORDER_ADD_NOTE_MUTATION = """mutation addNote($id: ID!, $message: String!) {orderAddNote(order: $id, input: {message: $message}) {- orderErrors {+ errors {fieldmessagecode@@ -3496,8 +3492,8 @@ def test_order_add_note_fail_on_empty_message()content = get_graphql_content(response)data = content["data"]["orderAddNote"]- assert data["orderErrors"][0]["field"] == "message"- assert data["orderErrors"][0]["code"] == OrderErrorCode.REQUIRED.name+ assert data["errors"][0]["field"] == "message"+ assert data["errors"][0]["code"] == OrderErrorCode.REQUIRED.nameMUTATION_ORDER_CANCEL = """@@ -3506,7 +3502,7 @@ mutation cancelOrder($id: ID!) {order {status}- orderErrors{+ errors{fieldcode}@@ -3532,7 +3528,7 @@ def test_order_cancel()content = get_graphql_content(response)data = content["data"]["orderCancel"]- assert not data["orderErrors"]+ assert not data["errors"]mock_clean_order_cancel.assert_called_once_with(order)mock_cancel_order.assert_called_once_with(@@ -3557,7 +3553,7 @@ def test_order_cancel_as_app()content = get_graphql_content(response)data = content["data"]["orderCancel"]- assert not data["orderErrors"]+ assert not data["errors"]mock_clean_order_cancel.assert_called_once_with(order)mock_cancel_order.assert_called_once_with(@@ -3644,7 +3640,7 @@ MUTATION_MARK_ORDER_AS_PAID = """fieldmessage}- orderErrors {+ errors {fieldmessagecode@@ -3676,7 +3672,7 @@ def test_paid_order_mark_as_paid(assert errors[0]["message"] == msgassert errors[0]["field"] == "payment"- order_errors = content["data"]["orderMarkAsPaid"]["orderErrors"]+ order_errors = content["data"]["orderMarkAsPaid"]["errors"]assert order_errors[0]["code"] == OrderErrorCode.PAYMENT_ERROR.name@@ -3746,7 +3742,7 @@ def test_order_mark_as_paid_no_billing_address(query, variables, permissions=[permission_manage_orders])content = get_graphql_content(response)- data = content["data"]["orderMarkAsPaid"]["orderErrors"]+ data = content["data"]["orderMarkAsPaid"]["errors"]assert data[0]["code"] == OrderErrorCode.BILLING_ADDRESS_NOT_SET.name@@ -3761,7 +3757,7 @@ ORDER_VOID = """fieldmessage}- orderErrors {+ errors {fieldmessagecode@@ -3807,7 +3803,7 @@ def test_order_void_payment_error(assert errors[0]["field"] == "payment"assert errors[0]["message"] == msg- order_errors = content["data"]["orderVoid"]["orderErrors"]+ order_errors = content["data"]["orderVoid"]["errors"]assert order_errors[0]["code"] == OrderErrorCode.PAYMENT_ERROR.namemock_void_payment.assert_called_once()@@ -3987,7 +3983,7 @@ ORDER_UPDATE_SHIPPING_QUERY = """mutation orderUpdateShipping($order: ID!, $shippingMethod: ID) {orderUpdateShipping(order: $order, input: {shippingMethod: $shippingMethod}) {- orderErrors {+ errors {fieldcodemessage@@ -4122,8 +4118,8 @@ def test_order_update_shipping_shipping_required()content = get_graphql_content(response)data = content["data"]["orderUpdateShipping"]- assert data["orderErrors"][0]["field"] == "shippingMethod"- assert data["orderErrors"][0]["message"] == (+ assert data["errors"][0]["field"] == "shippingMethod"+ assert data["errors"][0]["message"] == ("Shipping method is required for this order.")@@ -4159,8 +4155,8 @@ def test_order_update_shipping_not_editable_order()content = get_graphql_content(response)data = content["data"]["orderUpdateShipping"]- assert data["orderErrors"][0]["field"] == "id"- assert data["orderErrors"][0]["code"] == OrderErrorCode.NOT_EDITABLE.name+ assert data["errors"][0]["field"] == "id"+ assert data["errors"][0]["code"] == OrderErrorCode.NOT_EDITABLE.namedef test_order_update_shipping_no_shipping_address(@@ -4185,8 +4181,8 @@ def test_order_update_shipping_no_shipping_address()content = get_graphql_content(response)data = content["data"]["orderUpdateShipping"]- assert data["orderErrors"][0]["field"] == "order"- assert data["orderErrors"][0]["message"] == (+ assert data["errors"][0]["field"] == "order"+ assert data["errors"][0]["message"] == ("Cannot choose a shipping method for an order without" " the shipping address.")@@ -4215,8 +4211,8 @@ def test_order_update_shipping_incorrect_shipping_method()content = get_graphql_content(response)data = content["data"]["orderUpdateShipping"]- assert data["orderErrors"][0]["field"] == "shippingMethod"- assert data["orderErrors"][0]["message"] == (+ assert data["errors"][0]["field"] == "shippingMethod"+ assert data["errors"][0]["message"] == ("Shipping method cannot be used with this order.")@@ -4241,7 +4237,7 @@ def test_order_update_shipping_shipping_zone_without_channels()content = get_graphql_content(response)data = content["data"]["orderUpdateShipping"]- errors = data["orderErrors"]+ errors = data["errors"]assert len(errors) == 1assert errors[0]["field"] == "shippingMethod"assert errors[0]["code"] == OrderErrorCode.SHIPPING_METHOD_NOT_APPLICABLE.name@@ -4276,8 +4272,8 @@ def test_order_update_shipping_excluded_shipping_method_postal_code()content = get_graphql_content(response)data = content["data"]["orderUpdateShipping"]- assert data["orderErrors"][0]["field"] == "shippingMethod"- assert data["orderErrors"][0]["message"] == (+ assert data["errors"][0]["field"] == "shippingMethod"+ assert data["errors"][0]["message"] == ("Shipping method cannot be used with this order.")@@ -4795,7 +4791,7 @@ MUTATION_ORDER_BULK_CANCEL = """mutation CancelManyOrders($ids: [ID]!) {orderBulkCancel(ids: $ids) {count- orderErrors{+ errors{fieldcode}@@ -4825,7 +4821,7 @@ def test_order_bulk_cancel(content = get_graphql_content(response)data = content["data"]["orderBulkCancel"]assert data["count"] == expected_count- assert not data["orderErrors"]+ assert not data["errors"]calls = [call(order=order, user=staff_api_client.user, manager=ANY) for order in orders@@ -4856,7 +4852,7 @@ def test_order_bulk_cancel_as_app(content = get_graphql_content(response)data = content["data"]["orderBulkCancel"]assert data["count"] == expected_count- assert not data["orderErrors"]+ assert not data["errors"]calls = [call(order=order, user=AnonymousUser(), manager=ANY) for order in orders]diff --git a/saleor/graphql/page/tests/test_attributes.py b/saleor/graphql/page/tests/test_attributes.pyindex 16472c6030..a4af46a51b 100644--- a/saleor/graphql/page/tests/test_attributes.py+++ b/saleor/graphql/page/tests/test_attributes.py@@ -8,7 +8,7 @@ from ...tests.utils import assert_no_permission, get_graphql_contentPAGE_ASSIGN_ATTR_QUERY = """mutation assign($pageTypeId: ID!, $attributeIds: [ID!]!) {pageAttributeAssign(pageTypeId: $pageTypeId, attributeIds: $attributeIds) {- pageErrors {+ errors {fieldcodemessage@@ -52,7 +52,7 @@ def test_assign_attributes_to_page_type_by_staff(# thencontent = get_graphql_content(response)data = content["data"]["pageAttributeAssign"]- errors = data["pageErrors"]+ errors = data["errors"]assert not errorsassert len(data["pageType"]["attributes"]) == page_type_attr_count + 1@@ -88,7 +88,7 @@ def test_assign_attributes_to_page_type_by_app(# thencontent = get_graphql_content(response)data = content["data"]["pageAttributeAssign"]- errors = data["pageErrors"]+ errors = data["errors"]assert not errorsassert len(data["pageType"]["attributes"]) == page_type_attr_count + 1@@ -172,7 +172,7 @@ def test_assign_attributes_to_page_type_not_page_attribute(# thencontent = get_graphql_content(response)data = content["data"]["pageAttributeAssign"]- errors = data["pageErrors"]+ errors = data["errors"]assert not data["pageType"]page_type.refresh_from_db()@@ -213,7 +213,7 @@ def test_assign_attributes_to_page_type_attribute_already_assigned(# thencontent = get_graphql_content(response)data = content["data"]["pageAttributeAssign"]- errors = data["pageErrors"]+ errors = data["errors"]assert not data["pageType"]page_type.refresh_from_db()@@ -257,7 +257,7 @@ def test_assign_attributes_to_page_type_multiple_error_returned(# thencontent = get_graphql_content(response)data = content["data"]["pageAttributeAssign"]- errors = data["pageErrors"]+ errors = data["errors"]assert not data["pageType"]page_type.refresh_from_db()@@ -295,7 +295,7 @@ PAGE_UNASSIGN_ATTR_QUERY = """id}}- pageErrors {+ errors {fieldcodemessage@@ -328,7 +328,7 @@ def test_unassign_attributes_from_page_type_by_staff(# thencontent = get_graphql_content(response)data = content["data"]["pageAttributeUnassign"]- errors = data["pageErrors"]+ errors = data["errors"]assert not errorsassert len(data["pageType"]["attributes"]) == attr_count - 1@@ -378,7 +378,7 @@ def test_unassign_attributes_from_page_type_by_app(# thencontent = get_graphql_content(response)data = content["data"]["pageAttributeUnassign"]- errors = data["pageErrors"]+ errors = data["errors"]assert not errorsassert len(data["pageType"]["attributes"]) == attr_count - 1diff --git a/saleor/graphql/page/tests/test_page.py b/saleor/graphql/page/tests/test_page.pyindex ad8099b50b..7bb73e3043 100644--- a/saleor/graphql/page/tests/test_page.py+++ b/saleor/graphql/page/tests/test_page.py@@ -214,7 +214,7 @@ CREATE_PAGE_MUTATION = """}}}- pageErrors {+ errors {fieldcodemessage@@ -261,7 +261,7 @@ def test_page_create_mutation(staff_api_client, permission_manage_pages, page_ty)content = get_graphql_content(response)data = content["data"]["pageCreate"]- assert data["pageErrors"] == []+ assert data["errors"] == []assert data["page"]["title"] == page_titleassert data["page"]["content"] == page_contentassert data["page"]["slug"] == page_slug@@ -305,7 +305,7 @@ def test_page_create_trigger_page_webhook()content = get_graphql_content(response)data = content["data"]["pageCreate"]- assert data["pageErrors"] == []+ assert data["errors"] == []assert data["page"]["title"] == page_titleassert data["page"]["content"] == page_contentassert data["page"]["slug"] == page_slug@@ -327,7 +327,7 @@ def test_page_create_required_fields(CREATE_PAGE_MUTATION, variables, permissions=[permission_manage_pages])content = get_graphql_content(response)- errors = content["data"]["pageCreate"]["pageErrors"]+ errors = content["data"]["pageCreate"]["errors"]assert len(errors) == 1assert errors[0]["field"] == "title"@@ -346,7 +346,7 @@ def test_create_default_slug(staff_api_client, permission_manage_pages, page_typ)content = get_graphql_content(response)data = content["data"]["pageCreate"]- assert not data["pageErrors"]+ assert not data["errors"]assert data["page"]["title"] == titleassert data["page"]["slug"] == slugify(title)@@ -389,7 +389,7 @@ def test_page_create_mutation_missing_required_attributes(# thencontent = get_graphql_content(response)data = content["data"]["pageCreate"]- errors = data["pageErrors"]+ errors = data["errors"]assert not data["page"]assert len(errors) == 1@@ -432,7 +432,7 @@ def test_page_create_mutation_empty_attribute_value(# thencontent = get_graphql_content(response)data = content["data"]["pageCreate"]- errors = data["pageErrors"]+ errors = data["errors"]assert not data["page"]assert len(errors) == 1@@ -480,7 +480,7 @@ def test_create_page_with_file_attribute(# thencontent = get_graphql_content(response)data = content["data"]["pageCreate"]- errors = data["pageErrors"]+ errors = data["errors"]assert not errorsassert data["page"]["title"] == page_title@@ -550,7 +550,7 @@ def test_create_page_with_file_attribute_new_attribute_value(# thencontent = get_graphql_content(response)data = content["data"]["pageCreate"]- errors = data["pageErrors"]+ errors = data["errors"]assert not errorsassert data["page"]["title"] == page_title@@ -615,7 +615,7 @@ def test_create_page_with_file_attribute_not_required_no_file_url_given(content = get_graphql_content(response)data = content["data"]["pageCreate"]- assert data["pageErrors"] == []+ assert data["errors"] == []assert data["page"]["title"] == page_titleassert data["page"]["content"] == page_contentassert data["page"]["slug"] == page_slug@@ -661,7 +661,7 @@ def test_create_page_with_file_attribute_required_no_file_url_given(content = get_graphql_content(response)data = content["data"]["pageCreate"]- errors = data["pageErrors"]+ errors = data["errors"]assert not data["page"]assert len(errors) == 1assert errors[0]["code"] == PageErrorCode.REQUIRED.name@@ -712,7 +712,7 @@ def test_create_page_with_page_reference_attribute(# thencontent = get_graphql_content(response)data = content["data"]["pageCreate"]- errors = data["pageErrors"]+ errors = data["errors"]assert not errorsassert data["page"]["title"] == page_title@@ -781,7 +781,7 @@ def test_create_page_with_page_reference_attribute_not_required_no_references_gicontent = get_graphql_content(response)data = content["data"]["pageCreate"]- assert data["pageErrors"] == []+ assert data["errors"] == []assert data["page"]["title"] == page_titleassert data["page"]["content"] == page_contentassert data["page"]["slug"] == page_slug@@ -832,7 +832,7 @@ def test_create_page_with_page_reference_attribute_required_no_references_given(content = get_graphql_content(response)data = content["data"]["pageCreate"]- errors = data["pageErrors"]+ errors = data["errors"]assert not data["page"]assert len(errors) == 1assert errors[0]["code"] == PageErrorCode.REQUIRED.name@@ -883,7 +883,7 @@ def test_create_page_with_product_reference_attribute(# thencontent = get_graphql_content(response)data = content["data"]["pageCreate"]- errors = data["pageErrors"]+ errors = data["errors"]assert not errorsassert data["page"]["title"] == page_title@@ -952,7 +952,7 @@ def test_create_page_with_product_reference_attribute_not_required_no_referencescontent = get_graphql_content(response)data = content["data"]["pageCreate"]- assert data["pageErrors"] == []+ assert data["errors"] == []assert data["page"]["title"] == page_titleassert data["page"]["content"] == page_contentassert data["page"]["slug"] == page_slug@@ -1003,7 +1003,7 @@ def test_create_page_with_product_reference_attribute_required_no_references_givcontent = get_graphql_content(response)data = content["data"]["pageCreate"]- errors = data["pageErrors"]+ errors = data["errors"]assert not data["page"]assert len(errors) == 1assert errors[0]["code"] == PageErrorCode.REQUIRED.name@@ -1018,7 +1018,7 @@ PAGE_DELETE_MUTATION = """titleid}- pageErrors {+ errors {fieldcodemessage@@ -1090,7 +1090,7 @@ UPDATE_PAGE_MUTATION = """}}}- pageErrors {+ errors {fieldcodemessage@@ -1133,7 +1133,7 @@ def test_update_page(staff_api_client, permission_manage_pages, page):content = get_graphql_content(response)data = content["data"]["pageUpdate"]- assert not data["pageErrors"]+ assert not data["errors"]assert data["page"]["title"] == page_titleassert data["page"]["slug"] == new_slug@@ -1200,7 +1200,7 @@ def test_update_page_trigger_webhook(content = get_graphql_content(response)data = content["data"]["pageUpdate"]- assert not data["pageErrors"]+ assert not data["errors"]assert data["page"]["title"] == page_titleassert data["page"]["slug"] == new_slugpage.publication_date = datetime.date(2020, 3, 18)@@ -1240,7 +1240,7 @@ def test_update_page_with_file_attribute_value(content = get_graphql_content(response)data = content["data"]["pageUpdate"]- assert not data["pageErrors"]+ assert not data["errors"]assert data["page"]updated_attribute = {"attribute": {"slug": page_file_attribute.slug},@@ -1293,7 +1293,7 @@ def test_update_page_with_file_attribute_new_value_is_not_created(content = get_graphql_content(response)data = content["data"]["pageUpdate"]- assert not data["pageErrors"]+ assert not data["errors"]assert data["page"]updated_attribute = {"attribute": {"slug": page_file_attribute.slug},@@ -1339,7 +1339,7 @@ def test_update_page_clear_values(staff_api_client, permission_manage_pages, pagcontent = get_graphql_content(response)data = content["data"]["pageUpdate"]- assert not data["pageErrors"]+ assert not data["errors"]assert data["page"]assert not data["page"]["attributes"][0]["values"]@@ -1383,7 +1383,7 @@ def test_update_page_with_page_reference_attribute_new_value(content = get_graphql_content(response)data = content["data"]["pageUpdate"]- assert not data["pageErrors"]+ assert not data["errors"]assert data["page"]updated_attribute = {"attribute": {"slug": page_type_page_reference_attribute.slug},@@ -1447,7 +1447,7 @@ def test_update_page_with_page_reference_attribute_existing_value(content = get_graphql_content(response)data = content["data"]["pageUpdate"]- assert not data["pageErrors"]+ assert not data["errors"]assert data["page"]updated_attribute = {"attribute": {"slug": page_type_page_reference_attribute.slug},@@ -1501,7 +1501,7 @@ def test_update_page_with_product_reference_attribute_new_value(content = get_graphql_content(response)data = content["data"]["pageUpdate"]- assert not data["pageErrors"]+ assert not data["errors"]assert data["page"]updated_attribute = {"attribute": {"slug": page_type_product_reference_attribute.slug},@@ -1564,7 +1564,7 @@ def test_update_page_with_product_reference_attribute_existing_value(content = get_graphql_content(response)data = content["data"]["pageUpdate"]- assert not data["pageErrors"]+ assert not data["errors"]assert data["page"]updated_attribute = {"attribute": {"slug": page_type_product_reference_attribute.slug},@@ -1603,7 +1603,7 @@ def test_public_page_sets_publication_date(content = get_graphql_content(response)data = content["data"]["pageUpdate"]- assert not data["pageErrors"]+ assert not data["errors"]assert data["page"]["isPublished"] is Trueassert data["page"]["publicationDate"] == "2020-03-18"@@ -1621,7 +1621,7 @@ def test_update_page_blank_slug_value(query, variables, permissions=[permission_manage_pages])content = get_graphql_content(response)- errors = content["data"]["pageUpdate"]["pageErrors"]+ errors = content["data"]["pageUpdate"]["errors"]assert len(errors) == 1assert errors[0]["field"] == "slug"@@ -1640,7 +1640,7 @@ def test_update_page_with_title_value_and_without_slug_value(titleslug}- pageErrors {+ errors {fieldcodemessage@@ -1654,7 +1654,7 @@ def test_update_page_with_title_value_and_without_slug_value(query, variables, permissions=[permission_manage_pages])content = get_graphql_content(response)- errors = content["data"]["pageUpdate"]["pageErrors"]+ errors = content["data"]["pageUpdate"]["errors"]assert len(errors) == 1assert errors[0]["field"] == "slug"@@ -1683,7 +1683,7 @@ UPDATE_PAGE_ATTRIBUTES_MUTATION = """}}}- pageErrors {+ errors {fieldcodemessage@@ -1764,7 +1764,7 @@ def test_update_page_change_attribute_values_ordering(# thencontent = get_graphql_content(response)data = content["data"]["pageUpdate"]- assert data["pageErrors"] == []+ assert data["errors"] == []attributes = data["page"]["attributes"]diff --git a/saleor/graphql/page/tests/test_page_reorder_attribute_values.py b/saleor/graphql/page/tests/test_page_reorder_attribute_values.pyindex 730e108013..86192391fc 100644--- a/saleor/graphql/page/tests/test_page_reorder_attribute_values.py+++ b/saleor/graphql/page/tests/test_page_reorder_attribute_values.py@@ -29,7 +29,7 @@ PAGE_REORDER_ATTRIBUTE_VALUES_MUTATION = """}}- pageErrors {+ errors {fieldmessagecode@@ -100,7 +100,7 @@ def test_sort_page_attribute_values(content = get_graphql_content(staff_api_client.post_graphql(PAGE_REORDER_ATTRIBUTE_VALUES_MUTATION, variables))["data"]["pageReorderAttributeValues"]- assert not content["pageErrors"]+ assert not content["errors"]assert content["page"]["id"] == page_id, "Did not return the correct page"@@ -159,7 +159,7 @@ def test_sort_page_attribute_values_invalid_attribute_id(content = get_graphql_content(staff_api_client.post_graphql(PAGE_REORDER_ATTRIBUTE_VALUES_MUTATION, variables))["data"]["pageReorderAttributeValues"]- errors = content["pageErrors"]+ errors = content["errors"]assert not content["page"]assert len(errors) == 1assert errors[0]["code"] == PageErrorCode.NOT_FOUND.name@@ -225,7 +225,7 @@ def test_sort_page_attribute_values_invalid_value_id(content = get_graphql_content(staff_api_client.post_graphql(PAGE_REORDER_ATTRIBUTE_VALUES_MUTATION, variables))["data"]["pageReorderAttributeValues"]- errors = content["pageErrors"]+ errors = content["errors"]assert not content["page"]assert len(errors) == 1assert errors[0]["code"] == PageErrorCode.NOT_FOUND.namediff --git a/saleor/graphql/page/tests/test_page_type_create.py b/saleor/graphql/page/tests/test_page_type_create.pyindex b26d23634d..11289b1037 100644--- a/saleor/graphql/page/tests/test_page_type_create.py+++ b/saleor/graphql/page/tests/test_page_type_create.py@@ -17,7 +17,7 @@ PAGE_TYPE_CREATE_MUTATION = """slug}}- pageErrors {+ errors {codefieldmessage@@ -58,7 +58,7 @@ def test_page_type_create_as_staff(content = get_graphql_content(response)data = content["data"]["pageTypeCreate"]page_type_data = data["pageType"]- errors = data["pageErrors"]+ errors = data["errors"]assert not errorsassert page_type_data["name"] == name@@ -118,7 +118,7 @@ def test_page_type_create_as_app(content = get_graphql_content(response)data = content["data"]["pageTypeCreate"]page_type_data = data["pageType"]- errors = data["pageErrors"]+ errors = data["errors"]assert not errorsassert page_type_data["name"] == name@@ -181,7 +181,7 @@ def test_page_type_create_unique_slug_generated(content = get_graphql_content(response)data = content["data"]["pageTypeCreate"]page_type_data = data["pageType"]- errors = data["pageErrors"]+ errors = data["errors"]assert not errorsassert PageType.objects.count() == 2@@ -229,7 +229,7 @@ def test_page_type_create_duplicated_slug(content = get_graphql_content(response)data = content["data"]["pageTypeCreate"]page_type_data = data["pageType"]- errors = data["pageErrors"]+ errors = data["errors"]assert not page_type_dataassert len(errors) == 1@@ -268,7 +268,7 @@ def test_page_type_create_not_valid_attributes(content = get_graphql_content(response)data = content["data"]["pageTypeCreate"]page_type_data = data["pageType"]- errors = data["pageErrors"]+ errors = data["errors"]assert not page_type_dataassert len(errors) == 1diff --git a/saleor/graphql/page/tests/test_page_type_delete.py b/saleor/graphql/page/tests/test_page_type_delete.pyindex ee592458a0..74837f9f35 100644--- a/saleor/graphql/page/tests/test_page_type_delete.py+++ b/saleor/graphql/page/tests/test_page_type_delete.py@@ -12,7 +12,7 @@ DELETE_PAGE_TYPE_MUTATION = """nameslug}- pageErrors {+ errors {fieldcodemessage@@ -45,7 +45,7 @@ def test_page_type_delete_by_staff(content = get_graphql_content(response)data = content["data"]["pageTypeDelete"]- assert not data["pageErrors"]+ assert not data["errors"]assert data["pageType"]["id"] == page_type_idwith pytest.raises(page_type._meta.model.DoesNotExist):@@ -91,7 +91,7 @@ def test_page_type_delete_by_app(content = get_graphql_content(response)data = content["data"]["pageTypeDelete"]- assert not data["pageErrors"]+ assert not data["errors"]assert data["pageType"]["id"] == page_type_idwith pytest.raises(page_type._meta.model.DoesNotExist):diff --git a/saleor/graphql/page/tests/test_page_type_reorder_attributes.py b/saleor/graphql/page/tests/test_page_type_reorder_attributes.pyindex f335e67ebe..3d34a6788d 100644--- a/saleor/graphql/page/tests/test_page_type_reorder_attributes.py+++ b/saleor/graphql/page/tests/test_page_type_reorder_attributes.py@@ -20,7 +20,7 @@ PAGE_TYPE_REORDER_ATTRIBUTES_MUTATION = """slug}}- pageErrors {+ errors {codefieldmessage@@ -73,7 +73,7 @@ def test_reorder_page_type_attributes_by_staff(# thencontent = get_graphql_content(response)data = content["data"]["pageTypeReorderAttributes"]- errors = data["pageErrors"]+ errors = data["errors"]page_type_data = data["pageType"]assert not errors@@ -168,7 +168,7 @@ def test_reorder_page_type_attributes_by_app(# thencontent = get_graphql_content(response)data = content["data"]["pageTypeReorderAttributes"]- errors = data["pageErrors"]+ errors = data["errors"]page_type_data = data["pageType"]assert not errors@@ -251,7 +251,7 @@ def test_reorder_page_type_attributes_invalid_page_type(# thencontent = get_graphql_content(response)data = content["data"]["pageTypeReorderAttributes"]- errors = data["pageErrors"]+ errors = data["errors"]page_type_data = data["pageType"]assert not page_type_data@@ -296,7 +296,7 @@ def test_reorder_page_type_attributes_invalid_attribute_id(# thencontent = get_graphql_content(response)data = content["data"]["pageTypeReorderAttributes"]- errors = data["pageErrors"]+ errors = data["errors"]page_type_data = data["pageType"]assert not page_type_datadiff --git a/saleor/graphql/page/tests/test_page_type_update.py b/saleor/graphql/page/tests/test_page_type_update.pyindex 4a486339cb..9ac856f5f9 100644--- a/saleor/graphql/page/tests/test_page_type_update.py+++ b/saleor/graphql/page/tests/test_page_type_update.py@@ -19,7 +19,7 @@ PAGE_TYPE_UPDATE_MUTATION = """slug}}- pageErrors {+ errors {codefieldmessage@@ -65,7 +65,7 @@ def test_page_type_update_as_staff(# thencontent = get_graphql_content(response)data = content["data"]["pageTypeUpdate"]- errors = data["pageErrors"]+ errors = data["errors"]page_type_data = data["pageType"]page_type.refresh_from_db()@@ -127,7 +127,7 @@ def test_page_type_update_as_app(# thencontent = get_graphql_content(response)data = content["data"]["pageTypeUpdate"]- errors = data["pageErrors"]+ errors = data["errors"]page_type_data = data["pageType"]page_type.refresh_from_db()@@ -184,7 +184,7 @@ def test_page_type_update_duplicated_attributes(# thencontent = get_graphql_content(response)data = content["data"]["pageTypeUpdate"]- errors = data["pageErrors"]+ errors = data["errors"]page_type_data = data["pageType"]assert not page_type_data@@ -228,7 +228,7 @@ def test_page_type_update_not_valid_attributes(# thencontent = get_graphql_content(response)data = content["data"]["pageTypeUpdate"]- errors = data["pageErrors"]+ errors = data["errors"]page_type_data = data["pageType"]assert not page_type_data@@ -272,7 +272,7 @@ def test_page_type_update_empty_slug(# thencontent = get_graphql_content(response)data = content["data"]["pageTypeUpdate"]- errors = data["pageErrors"]+ errors = data["errors"]page_type_data = data["pageType"]assert not page_type_data@@ -302,7 +302,7 @@ def test_page_type_update_duplicated_slug(# thencontent = get_graphql_content(response)data = content["data"]["pageTypeUpdate"]- errors = data["pageErrors"]+ errors = data["errors"]page_type_data = data["pageType"]assert not page_type_data@@ -346,7 +346,7 @@ def test_page_type_update_multiple_errors(# thencontent = get_graphql_content(response)data = content["data"]["pageTypeUpdate"]- errors = data["pageErrors"]+ errors = data["errors"]page_type_data = data["pageType"]assert not page_type_datadiff --git a/saleor/graphql/page/tests/test_page_types_bulk_delete.py b/saleor/graphql/page/tests/test_page_types_bulk_delete.pyindex 678473628c..1078b8806c 100644--- a/saleor/graphql/page/tests/test_page_types_bulk_delete.py+++ b/saleor/graphql/page/tests/test_page_types_bulk_delete.py@@ -7,7 +7,7 @@ PAGE_TYPE_BULK_DELETE_MUTATION = """mutation PageTypeBulkDelete($ids: [ID!]!) {pageTypeBulkDelete(ids: $ids) {count- pageErrors {+ errors {codefieldmessage@@ -45,7 +45,7 @@ def test_page_type_bulk_delete_by_staff(content = get_graphql_content(response)data = content["data"]["pageTypeBulkDelete"]- assert not data["pageErrors"]+ assert not data["errors"]assert data["count"] == page_type_countassert not Page.objects.filter(pk__in=pages_pks)@@ -95,7 +95,7 @@ def test_page_type_bulk_delete_by_app(content = get_graphql_content(response)data = content["data"]["pageTypeBulkDelete"]- assert not data["pageErrors"]+ assert not data["errors"]assert data["count"] == page_type_countassert not Page.objects.filter(pk__in=pages_pks)diff --git a/saleor/graphql/payment/tests/test_payment.py b/saleor/graphql/payment/tests/test_payment.pyindex 7423f8d7f8..455b59ddb0 100644--- a/saleor/graphql/payment/tests/test_payment.py+++ b/saleor/graphql/payment/tests/test_payment.py@@ -96,7 +96,7 @@ CREATE_PAYMENT_MUTATION = """}chargeStatus}- paymentErrors {+ errors {codefield}@@ -130,7 +130,7 @@ def test_checkout_add_payment_without_shipping_method_and_not_shipping_required(response = user_api_client.post_graphql(CREATE_PAYMENT_MUTATION, variables)content = get_graphql_content(response)data = content["data"]["checkoutPaymentCreate"]- assert not data["paymentErrors"]+ assert not data["errors"]transactions = data["payment"]["transactions"]assert not transactionspayment = Payment.objects.get()@@ -172,8 +172,8 @@ def test_checkout_add_payment_without_shipping_method_with_shipping_required(content = get_graphql_content(response)data = content["data"]["checkoutPaymentCreate"]- assert data["paymentErrors"][0]["code"] == "SHIPPING_METHOD_NOT_SET"- assert data["paymentErrors"][0]["field"] == "shippingMethod"+ assert data["errors"][0]["code"] == "SHIPPING_METHOD_NOT_SET"+ assert data["errors"][0]["field"] == "shippingMethod"def test_checkout_add_payment_with_shipping_method_and_shipping_required(@@ -204,7 +204,7 @@ def test_checkout_add_payment_with_shipping_method_and_shipping_required(content = get_graphql_content(response)data = content["data"]["checkoutPaymentCreate"]- assert not data["paymentErrors"]+ assert not data["errors"]transactions = data["payment"]["transactions"]assert not transactionspayment = Payment.objects.get()@@ -247,7 +247,7 @@ def test_checkout_add_payment(content = get_graphql_content(response)data = content["data"]["checkoutPaymentCreate"]- assert not data["paymentErrors"]+ assert not data["errors"]transactions = data["payment"]["transactions"]assert not transactionspayment = Payment.objects.get()@@ -285,7 +285,7 @@ def test_checkout_add_payment_default_amount(response = user_api_client.post_graphql(CREATE_PAYMENT_MUTATION, variables)content = get_graphql_content(response)data = content["data"]["checkoutPaymentCreate"]- assert not data["paymentErrors"]+ assert not data["errors"]transactions = data["payment"]["transactions"]assert not transactionspayment = Payment.objects.get()@@ -324,8 +324,7 @@ def test_checkout_add_payment_bad_amount(content = get_graphql_content(response)data = content["data"]["checkoutPaymentCreate"]assert (- data["paymentErrors"][0]["code"]- == PaymentErrorCode.PARTIAL_PAYMENT_NOT_ALLOWED.name+ data["errors"][0]["code"] == PaymentErrorCode.PARTIAL_PAYMENT_NOT_ALLOWED.name)@@ -345,10 +344,8 @@ def test_checkout_add_payment_not_supported_gateways(response = user_api_client.post_graphql(CREATE_PAYMENT_MUTATION, variables)content = get_graphql_content(response)data = content["data"]["checkoutPaymentCreate"]- assert (- data["paymentErrors"][0]["code"] == PaymentErrorCode.NOT_SUPPORTED_GATEWAY.name- )- assert data["paymentErrors"][0]["field"] == "gateway"+ assert data["errors"][0]["code"] == PaymentErrorCode.NOT_SUPPORTED_GATEWAY.name+ assert data["errors"][0]["field"] == "gateway"def test_use_checkout_billing_address_as_payment_billing(@@ -375,11 +372,8 @@ def test_use_checkout_billing_address_as_payment_billing(data = content["data"]["checkoutPaymentCreate"]# check if proper error is returned if address is missing- assert data["paymentErrors"][0]["field"] == "billingAddress"- assert (- data["paymentErrors"][0]["code"]- == PaymentErrorCode.BILLING_ADDRESS_NOT_SET.name- )+ assert data["errors"][0]["field"] == "billingAddress"+ assert data["errors"][0]["code"] == PaymentErrorCode.BILLING_ADDRESS_NOT_SET.name# assign the address and try againaddress.street_address_1 = "spanish-inqusition"@@ -435,7 +429,7 @@ def test_create_payment_for_checkout_with_active_payments(# thendata = content["data"]["checkoutPaymentCreate"]- assert not data["paymentErrors"]+ assert not data["errors"]checkout.refresh_from_db()assert checkout.payments.all().count() == payments_count + 1active_payments = checkout.payments.all().filter(is_active=True)@@ -951,7 +945,7 @@ mutation PaymentInitialize($gateway: String!, $paymentData: JSONString){namedata}- paymentErrors{+ errors{fieldmessage}@@ -1019,7 +1013,7 @@ def test_payment_initialize_plugin_raises_error(mocked_initialize_payment, api_cinitialized_payment_data = content["data"]["paymentInitialize"]["initializedPayment"]- errors = content["data"]["paymentInitialize"]["paymentErrors"]+ errors = content["data"]["paymentInitialize"]["errors"]assert initialized_payment_data is Noneassert len(errors) == 1assert errors[0]["field"] == "paymentData"diff --git a/saleor/graphql/product/filters.py b/saleor/graphql/product/filters.pyindex 6619cc957d..c7a41edb60 100644--- a/saleor/graphql/product/filters.py+++ b/saleor/graphql/product/filters.py@@ -6,7 +6,7 @@ import graphenefrom django.contrib.postgres.search import SearchQuery, SearchRankfrom django.db.models import Exists, F, OuterRef, Q, Subquery, Sumfrom django.db.models.functions import Coalesce-from graphene_django.filter import GlobalIDFilter, GlobalIDMultipleChoiceFilter+from graphene_django.filter import GlobalIDMultipleChoiceFilterfrom ...attribute.models import (AssignedProductAttribute,@@ -342,7 +342,6 @@ class ProductFilter(MetadataFilterBase):stock_availability = EnumFilter(input_class=StockAvailability, method="filter_stock_availability")- product_type = GlobalIDFilter() # Deprecatedproduct_types = GlobalIDMultipleChoiceFilter(field_name="product_type")stocks = ObjectTypeFilter(input_class=ProductStockFilterInput, method=filter_stocks)search = django_filters.CharFilter(method=filter_search)@@ -357,7 +356,6 @@ class ProductFilter(MetadataFilterBase):"has_category","attributes","stock_availability",- "product_type","stocks","search",]diff --git a/saleor/graphql/product/schema.py b/saleor/graphql/product/schema.pyindex 8ee6a15171..0cbf50f62e 100644--- a/saleor/graphql/product/schema.py+++ b/saleor/graphql/product/schema.py@@ -35,7 +35,6 @@ from .bulk_mutations.products import (ProductVariantStocksDelete,ProductVariantStocksUpdate,)-from .enums import StockAvailabilityfrom .filters import (CategoryFilterInput,CollectionFilterInput,@@ -186,13 +185,6 @@ class ProductQueries(graphene.ObjectType):Product,filter=ProductFilterInput(description="Filtering options for products."),sort_by=ProductOrder(description="Sort products."),- stock_availability=graphene.Argument(- StockAvailability,- description=(- "[Deprecated] Filter products by stock availability. Use the `filter` "- "field instead. This field will be removed after 2020-07-31."- ),- ),channel=graphene.String(description="Slug of a channel for which the data should be returned."),diff --git a/saleor/graphql/product/tests/benchmark/test_category.py b/saleor/graphql/product/tests/benchmark/test_category.pyindex 4cf652ca32..193b737257 100644--- a/saleor/graphql/product/tests/benchmark/test_category.py+++ b/saleor/graphql/product/tests/benchmark/test_category.py@@ -174,7 +174,7 @@ def test_category_delete(category {name}- productErrors {+ errors {fieldmessage}@@ -188,5 +188,5 @@ def test_category_delete(query, variables, permissions=[permission_manage_products])content = get_graphql_content(response)- errors = content["data"]["categoryDelete"]["productErrors"]+ errors = content["data"]["categoryDelete"]["errors"]assert not errorsdiff --git a/saleor/graphql/product/tests/benchmark/test_collection.py b/saleor/graphql/product/tests/benchmark/test_collection.pyindex fe2282bf94..1e8238f0fc 100644--- a/saleor/graphql/product/tests/benchmark/test_collection.py+++ b/saleor/graphql/product/tests/benchmark/test_collection.py@@ -186,7 +186,7 @@ def test_create_collection(alt}}- collectionErrors {+ errors {fieldmessagecode@@ -211,7 +211,7 @@ def test_create_collection(query, variables, permissions=[permission_manage_products])content = get_graphql_content(response)- errors = content["data"]["collectionCreate"]["collectionErrors"]+ errors = content["data"]["collectionCreate"]["errors"]assert not errors@@ -230,7 +230,7 @@ def test_delete_collection(collection {name}- collectionErrors {+ errors {fieldmessagecode@@ -250,7 +250,7 @@ def test_delete_collection(query, variables, permissions=[permission_manage_products])content = get_graphql_content(response)- errors = content["data"]["collectionDelete"]["collectionErrors"]+ errors = content["data"]["collectionDelete"]["errors"]assert not errors@@ -273,7 +273,7 @@ def test_collection_add_products(totalCount}}- collectionErrors {+ errors {fieldmessagecode@@ -292,7 +292,7 @@ def test_collection_add_products(query, variables, permissions=[permission_manage_products])content = get_graphql_content(response)- errors = content["data"]["collectionAddProducts"]["collectionErrors"]+ errors = content["data"]["collectionAddProducts"]["errors"]assert not errors@@ -314,7 +314,7 @@ def test_remove_products_from_collection(totalCount}}- collectionErrors {+ errors {fieldmessagecode@@ -336,7 +336,7 @@ def test_remove_products_from_collection()content = get_graphql_content(response)- errors = content["data"]["collectionRemoveProducts"]["collectionErrors"]+ errors = content["data"]["collectionRemoveProducts"]["errors"]assert not errors@@ -352,7 +352,7 @@ def test_collection_bulk_delete(mutation collectionBulkDelete($ids: [ID]!) {collectionBulkDelete(ids: $ids) {count- collectionErrors {+ errors {fieldmessagecode@@ -374,4 +374,4 @@ def test_collection_bulk_delete()content = get_graphql_content(response)- assert not content["data"]["collectionBulkDelete"]["collectionErrors"]+ assert not content["data"]["collectionBulkDelete"]["errors"]diff --git a/saleor/graphql/product/tests/benchmark/test_product.py b/saleor/graphql/product/tests/benchmark/test_product.pyindex 75d4d3e396..db36529f84 100644--- a/saleor/graphql/product/tests/benchmark/test_product.py+++ b/saleor/graphql/product/tests/benchmark/test_product.py@@ -34,28 +34,24 @@ def test_product_details(product_with_image, api_client, count_queries, channel_currencygross {amount- localized}}price {currencygross {amount- localized}}priceUndiscounted {currencygross {amount- localized}}priceLocalCurrency {currencygross {amount- localized}}}@@ -104,14 +100,12 @@ def test_product_details(product_with_image, api_client, count_queries, channel_currencygross {amount- localized}}stop{currencygross {amount- localized}}}@@ -120,14 +114,12 @@ def test_product_details(product_with_image, api_client, count_queries, channel_currencygross {amount- localized}}stop{currencygross {amount- localized}}}@@ -136,14 +128,12 @@ def test_product_details(product_with_image, api_client, count_queries, channel_currencygross {amount- localized}}stop{currencygross {amount- localized}}}@@ -406,7 +396,7 @@ def test_product_create(}}}- productErrors {+ errors {fieldcodemessage@@ -463,7 +453,7 @@ def test_product_create(query, variables, permissions=[permission_manage_products])content = get_graphql_content(response)- assert not content["data"]["productCreate"]["productErrors"]+ assert not content["data"]["productCreate"]["errors"]@pytest.mark.django_db@@ -519,7 +509,7 @@ def test_update_product(}}}- productErrors {+ errors {messagefieldcode@@ -564,4 +554,4 @@ def test_update_product()content = get_graphql_content(response)data = content["data"]["productUpdate"]- assert not data["productErrors"]+ assert not data["errors"]diff --git a/saleor/graphql/product/tests/benchmark/test_product_variant_channel_listing_update.py b/saleor/graphql/product/tests/benchmark/test_product_variant_channel_listing_update.pyindex 5450add997..51aa5581b1 100644--- a/saleor/graphql/product/tests/benchmark/test_product_variant_channel_listing_update.py+++ b/saleor/graphql/product/tests/benchmark/test_product_variant_channel_listing_update.py@@ -25,7 +25,7 @@ def test_variant_channel_listing_update($input: [ProductVariantChannelListingAddInput!]!) {productVariantChannelListingUpdate(id: $id, input: $input) {- productChannelListingErrors {+ errors {fieldmessagecode@@ -90,4 +90,4 @@ def test_variant_channel_listing_update(# thendata = content["data"]["productVariantChannelListingUpdate"]- assert not data["productChannelListingErrors"]+ assert not data["errors"]diff --git a/saleor/graphql/product/tests/benchmark/test_variant.py b/saleor/graphql/product/tests/benchmark/test_variant.pyindex 7f2fd92128..c8d79954c3 100644--- a/saleor/graphql/product/tests/benchmark/test_variant.py+++ b/saleor/graphql/product/tests/benchmark/test_variant.py@@ -41,28 +41,24 @@ def test_retrieve_variant_list(currencygross {amount- localized}}price {currencygross {amount- localized}}priceUndiscounted {currencygross {amount- localized}}priceLocalCurrency {currencygross {amount- localized}}}@@ -134,7 +130,7 @@ def test_product_variant_bulk_create($variants: [ProductVariantBulkCreateInput]!, $productId: ID!) {productVariantBulkCreate(variants: $variants, product: $productId) {- bulkProductErrors {+ errors {fieldmessagecode@@ -167,7 +163,7 @@ def test_product_variant_bulk_create(response = staff_api_client.post_graphql(query, variables)content = get_graphql_content(response)data = content["data"]["productVariantBulkCreate"]- assert not data["bulkProductErrors"]+ assert not data["errors"]assert data["count"] == 1assert product_variant_count + 1 == ProductVariant.objects.count()@@ -202,7 +198,7 @@ def test_product_variant_create(weight: $weight}) {- productErrors {+ errors {fieldmessageattributes@@ -229,7 +225,6 @@ def test_product_variant_create(costPrice {currencyamount- localized}weight {value@@ -274,7 +269,7 @@ def test_product_variant_create(query, variables, permissions=[permission_manage_products])content = get_graphql_content(response)["data"]["productVariantCreate"]- assert not content["productErrors"]+ assert not content["errors"]@pytest.mark.django_dbdiff --git a/saleor/graphql/product/tests/benchmark/test_variant_stocks.py b/saleor/graphql/product/tests/benchmark/test_variant_stocks.pyindex 56298f9fc2..7fc2f1c037 100644--- a/saleor/graphql/product/tests/benchmark/test_variant_stocks.py+++ b/saleor/graphql/product/tests/benchmark/test_variant_stocks.py@@ -23,7 +23,7 @@ def test_product_variants_stocks_create(}}}- bulkStockErrors{+ errors{codefieldmessage@@ -58,7 +58,7 @@ def test_product_variants_stocks_create()content = get_graphql_content(response)data = content["data"]["productVariantStocksCreate"]- assert not data["bulkStockErrors"]+ assert not data["errors"]assert (len(data["productVariant"]["stocks"])== variant.stocks.count()@@ -84,7 +84,7 @@ def test_product_variants_stocks_update(}}}- bulkStockErrors{+ errors{codefieldmessage@@ -122,7 +122,7 @@ def test_product_variants_stocks_update(content = get_graphql_content(response)data = content["data"]["productVariantStocksUpdate"]- assert not data["bulkStockErrors"]+ assert not data["errors"]assert len(data["productVariant"]["stocks"]) == len(stocks)assert variant.stocks.count() == stocks_count + 1diff --git a/saleor/graphql/product/tests/test_attributes.py b/saleor/graphql/product/tests/test_attributes.pyindex 69e795655c..9a72b3b0f1 100644--- a/saleor/graphql/product/tests/test_attributes.py+++ b/saleor/graphql/product/tests/test_attributes.py@@ -269,7 +269,7 @@ def test_resolve_assigned_attribute_without_values(PRODUCT_ASSIGN_ATTR_QUERY = """mutation assign($productTypeId: ID!, $operations: [ProductAttributeAssignInput]!) {productAttributeAssign(productTypeId: $productTypeId, operations: $operations) {- productErrors {+ errors {fieldcodemessage@@ -321,7 +321,7 @@ def test_assign_attributes_to_product_type(permissions=[permission_manage_product_types_and_attributes],))["data"]["productAttributeAssign"]- assert not content["productErrors"], "Should have succeeded"+ assert not content["errors"], "Should have succeeded"assert content["productType"]["id"] == product_type_global_idassert len(content["productType"]["productAttributes"]) == len(@@ -362,9 +362,9 @@ def test_assign_non_existing_attributes_to_product_type()content = get_graphql_content(response)content = content["data"]["productAttributeAssign"]- assert content["productErrors"][0]["code"] == ProductErrorCode.NOT_FOUND.name- assert content["productErrors"][0]["field"] == "operations"- assert content["productErrors"][0]["attributes"] == [attribute_id]+ assert content["errors"][0]["code"] == ProductErrorCode.NOT_FOUND.name+ assert content["errors"][0]["field"] == "operations"+ assert content["errors"][0]["attributes"] == [attribute_id]def test_assign_variant_attribute_to_product_type_with_disabled_variants(@@ -394,13 +394,12 @@ def test_assign_variant_attribute_to_product_type_with_disabled_variants(content = get_graphql_content(staff_api_client.post_graphql(query, variables))["data"]["productAttributeAssign"]- assert content["productErrors"][0]["field"] == "operations"+ assert content["errors"][0]["field"] == "operations"assert (- content["productErrors"][0]["message"]- == "Variants are disabled in this product type."+ content["errors"][0]["message"] == "Variants are disabled in this product type.")assert (- content["productErrors"][0]["code"]+ content["errors"][0]["code"]== ProductErrorCode.ATTRIBUTE_VARIANTS_DISABLED.name)@@ -434,7 +433,7 @@ def test_assign_variant_attribute_having_multiselect_input_type(content = get_graphql_content(staff_api_client.post_graphql(query, variables))["data"]["productAttributeAssign"]- assert not content["productErrors"]+ assert not content["errors"]assert content["productType"]["id"] == product_type_global_idassert len(content["productType"]["variantAttributes"]) == 1assert content["productType"]["variantAttributes"][0]["id"] == attr_id@@ -486,14 +485,13 @@ def test_assign_attribute_to_product_type_having_already_that_attribute(content = get_graphql_content(staff_api_client.post_graphql(query, variables))["data"]["productAttributeAssign"]- assert content["productErrors"][0]["field"] == "operations"+ assert content["errors"][0]["field"] == "operations"assert (- content["productErrors"][0]["message"]+ content["errors"][0]["message"]== "Color (color) have already been assigned to this product type.")assert (- content["productErrors"][0]["code"]- == ProductErrorCode.ATTRIBUTE_ALREADY_ASSIGNED.name+ content["errors"][0]["code"] == ProductErrorCode.ATTRIBUTE_ALREADY_ASSIGNED.name)@@ -523,7 +521,7 @@ def test_assign_page_attribute_to_product_type(# thencontent = get_graphql_content(response)data = content["data"]["productAttributeAssign"]- errors = data["productErrors"]+ errors = data["errors"]assert not data["productType"]assert len(errors) == 1@@ -575,7 +573,7 @@ def test_assign_attribute_to_product_type_multiple_errors_returned(# thencontent = get_graphql_content(response)data = content["data"]["productAttributeAssign"]- errors = data["productErrors"]+ errors = data["errors"]assert not data["productType"]assert len(errors) == 2@@ -604,7 +602,7 @@ PRODUCT_UNASSIGN_ATTR_QUERY = """productAttributeUnassign(productTypeId: $productTypeId, attributeIds: $attributeIds) {- productErrors {+ errors {fieldmessage}@@ -653,7 +651,7 @@ def test_unassign_attributes_from_product_type(permissions=[permission_manage_product_types_and_attributes],))["data"]["productAttributeUnassign"]- assert not content["productErrors"]+ assert not content["errors"]assert content["productType"]["id"] == product_type_global_idassert len(content["productType"]["productAttributes"]) == 1@@ -691,7 +689,7 @@ def test_unassign_attributes_not_in_product_type(content = get_graphql_content(staff_api_client.post_graphql(query, variables))["data"]["productAttributeUnassign"]- assert not content["productErrors"]+ assert not content["errors"]assert content["productType"]["id"] == product_type_global_idassert len(content["productType"]["productAttributes"]) == 0@@ -752,7 +750,7 @@ ATTRIBUTES_RESORT_QUERY = """}}- productErrors {+ errors {fieldmessagecode@@ -785,7 +783,7 @@ def test_sort_attributes_within_product_type_invalid_product_type())["data"]["productTypeReorderAttributes"]- assert content["productErrors"] == [+ assert content["errors"] == [{"field": "productTypeId","code": ProductErrorCode.NOT_FOUND.name,@@ -819,7 +817,7 @@ def test_sort_attributes_within_product_type_invalid_id())["data"]["productTypeReorderAttributes"]- assert content["productErrors"] == [+ assert content["errors"] == [{"field": "moves","message": "Couldn't resolve to an attribute.",@@ -881,7 +879,7 @@ def test_sort_attributes_within_product_type(content = get_graphql_content(staff_api_client.post_graphql(ATTRIBUTES_RESORT_QUERY, variables))["data"]["productTypeReorderAttributes"]- assert not content["productErrors"]+ assert not content["errors"]assert (content["productType"]["id"] == product_type_id@@ -920,7 +918,7 @@ PRODUCT_REORDER_ATTRIBUTE_VALUES_MUTATION = """}}- productErrors {+ errors {fieldmessagecode@@ -993,7 +991,7 @@ def test_sort_product_attribute_values(PRODUCT_REORDER_ATTRIBUTE_VALUES_MUTATION, variables))["data"]["productReorderAttributeValues"]- assert not content["productErrors"]+ assert not content["errors"]assert content["product"]["id"] == product_id, "Did not return the correct product"@@ -1054,7 +1052,7 @@ def test_sort_product_attribute_values_invalid_attribute_id(PRODUCT_REORDER_ATTRIBUTE_VALUES_MUTATION, variables))["data"]["productReorderAttributeValues"]- errors = content["productErrors"]+ errors = content["errors"]assert not content["product"]assert len(errors) == 1assert errors[0]["code"] == ProductErrorCode.NOT_FOUND.name@@ -1122,7 +1120,7 @@ def test_sort_product_attribute_values_invalid_value_id(PRODUCT_REORDER_ATTRIBUTE_VALUES_MUTATION, variables))["data"]["productReorderAttributeValues"]- errors = content["productErrors"]+ errors = content["errors"]assert not content["product"]assert len(errors) == 1assert errors[0]["code"] == ProductErrorCode.NOT_FOUND.name@@ -1154,7 +1152,7 @@ PRODUCT_VARIANT_REORDER_ATTRIBUTE_VALUES_MUTATION = """}}- productErrors {+ errors {fieldmessagecode@@ -1228,7 +1226,7 @@ def test_sort_product_variant_attribute_values(PRODUCT_VARIANT_REORDER_ATTRIBUTE_VALUES_MUTATION, variables))["data"]["productVariantReorderAttributeValues"]- assert not content["productErrors"]+ assert not content["errors"]assert (content["productVariant"]["id"] == variant_id@@ -1292,7 +1290,7 @@ def test_sort_product_variant_attribute_values_invalid_attribute_id(PRODUCT_VARIANT_REORDER_ATTRIBUTE_VALUES_MUTATION, variables))["data"]["productVariantReorderAttributeValues"]- errors = content["productErrors"]+ errors = content["errors"]assert not content["productVariant"]assert len(errors) == 1assert errors[0]["code"] == ProductErrorCode.NOT_FOUND.name@@ -1361,7 +1359,7 @@ def test_sort_product_variant_attribute_values_invalid_value_id(PRODUCT_VARIANT_REORDER_ATTRIBUTE_VALUES_MUTATION, variables))["data"]["productVariantReorderAttributeValues"]- errors = content["productErrors"]+ errors = content["errors"]assert not content["productVariant"]assert len(errors) == 1assert errors[0]["code"] == ProductErrorCode.NOT_FOUND.namediff --git a/saleor/graphql/product/tests/test_category.py b/saleor/graphql/product/tests/test_category.pyindex 323a1218bf..56ad150db1 100644--- a/saleor/graphql/product/tests/test_category.py+++ b/saleor/graphql/product/tests/test_category.py@@ -299,7 +299,7 @@ CATEGORY_CREATE_MUTATION = """alt}}- productErrors {+ errors {fieldcodemessage@@ -343,7 +343,7 @@ def test_category_create_mutation()content = get_graphql_content(response)data = content["data"]["categoryCreate"]- assert data["productErrors"] == []+ assert data["errors"] == []assert data["category"]["name"] == category_nameassert data["category"]["description"] == category_descriptionassert not data["category"]["parent"]@@ -363,7 +363,7 @@ def test_category_create_mutation(response = staff_api_client.post_graphql(query, variables)content = get_graphql_content(response)data = content["data"]["categoryCreate"]- assert data["productErrors"] == []+ assert data["errors"] == []assert data["category"]["parent"]["id"] == parent_id@@ -387,7 +387,7 @@ def test_create_category_with_given_slug()content = get_graphql_content(response)data = content["data"]["categoryCreate"]- assert not data["productErrors"]+ assert not data["errors"]assert data["category"]["slug"] == expected_slug@@ -402,7 +402,7 @@ def test_create_category_name_with_unicode()content = get_graphql_content(response)data = content["data"]["categoryCreate"]- assert not data["productErrors"]+ assert not data["errors"]assert data["category"]["name"] == nameassert data["category"]["slug"] == "わたし-わ-にっぽん-です"@@ -434,7 +434,7 @@ def test_category_create_mutation_without_background_image()content = get_graphql_content(response)data = content["data"]["categoryCreate"]- assert data["productErrors"] == []+ assert data["errors"] == []assert mock_create_thumbnails.call_count == 0@@ -612,7 +612,7 @@ UPDATE_CATEGORY_SLUG_MUTATION = """nameslug}- productErrors {+ errors {fieldmessagecode@@ -650,7 +650,7 @@ def test_update_category_slug()content = get_graphql_content(response)data = content["data"]["categoryUpdate"]- errors = data["productErrors"]+ errors = data["errors"]if not error_message:assert not errorsassert data["category"]["slug"] == expected_slug@@ -680,7 +680,7 @@ def test_update_category_slug_exists()content = get_graphql_content(response)data = content["data"]["categoryUpdate"]- errors = data["productErrors"]+ errors = data["errors"]assert errorsassert errors[0]["field"] == "slug"assert errors[0]["code"] == ProductErrorCode.UNIQUE.name@@ -720,7 +720,7 @@ def test_update_category_slug_and_name(nameslug}- productErrors {+ errors {fieldmessagecode@@ -743,7 +743,7 @@ def test_update_category_slug_and_name(content = get_graphql_content(response)category.refresh_from_db()data = content["data"]["categoryUpdate"]- errors = data["productErrors"]+ errors = data["errors"]if not error_message:assert data["category"]["name"] == input_name == category.nameassert data["category"]["slug"] == input_slug == category.slugdiff --git a/saleor/graphql/product/tests/test_collection.py b/saleor/graphql/product/tests/test_collection.pyindex 0cc573f2ce..0671e9a5fe 100644--- a/saleor/graphql/product/tests/test_collection.py+++ b/saleor/graphql/product/tests/test_collection.py@@ -399,7 +399,7 @@ CREATE_COLLECTION_MUTATION = """alt}}- collectionErrors {+ errors {fieldmessagecode@@ -529,7 +529,7 @@ def test_create_collection_with_given_slug()content = get_graphql_content(response)data = content["data"]["collectionCreate"]- assert not data["collectionErrors"]+ assert not data["errors"]assert data["collection"]["slug"] == expected_slug@@ -544,7 +544,7 @@ def test_create_collection_name_with_unicode()content = get_graphql_content(response)data = content["data"]["collectionCreate"]- assert not data["collectionErrors"]+ assert not data["errors"]assert data["collection"]["name"] == nameassert data["collection"]["slug"] == "わたし-わ-にっぽん-です"@@ -700,7 +700,7 @@ UPDATE_COLLECTION_SLUG_MUTATION = """nameslug}- collectionErrors {+ errors {fieldmessagecode@@ -738,7 +738,7 @@ def test_update_collection_slug()content = get_graphql_content(response)data = content["data"]["collectionUpdate"]- errors = data["collectionErrors"]+ errors = data["errors"]if not error_message:assert not errorsassert data["collection"]["slug"] == expected_slug@@ -769,7 +769,7 @@ def test_update_collection_slug_exists()content = get_graphql_content(response)data = content["data"]["collectionUpdate"]- errors = data["collectionErrors"]+ errors = data["errors"]assert errorsassert errors[0]["field"] == "slug"assert errors[0]["code"] == ProductErrorCode.UNIQUE.name@@ -809,7 +809,7 @@ def test_update_collection_slug_and_name(nameslug}- collectionErrors {+ errors {fieldmessagecode@@ -832,7 +832,7 @@ def test_update_collection_slug_and_name(content = get_graphql_content(response)collection.refresh_from_db()data = content["data"]["collectionUpdate"]- errors = data["collectionErrors"]+ errors = data["errors"]if not error_message:assert data["collection"]["name"] == input_name == collection.nameassert data["collection"]["slug"] == input_slug == collection.slug@@ -999,7 +999,7 @@ def test_add_products_to_collection_with_product_without_variants(totalCount}}- collectionErrors {+ errors {fieldmessagecode@@ -1015,7 +1015,7 @@ def test_add_products_to_collection_with_product_without_variants(query, variables, permissions=[permission_manage_products])content = get_graphql_content(response)- error = content["data"]["collectionAddProducts"]["collectionErrors"][0]+ error = content["data"]["collectionAddProducts"]["errors"][0]assert (error["code"] == CollectionErrorCode.CANNOT_MANAGE_PRODUCT_WITHOUT_VARIANT.namediff --git a/saleor/graphql/product/tests/test_collection_channel_listing_update.py b/saleor/graphql/product/tests/test_collection_channel_listing_update.pyindex dd61c33185..00e7927e99 100644--- a/saleor/graphql/product/tests/test_collection_channel_listing_update.py+++ b/saleor/graphql/product/tests/test_collection_channel_listing_update.py@@ -12,7 +12,7 @@ mutation UpdateCollectionChannelListing($input: CollectionChannelListingUpdateInput!) {collectionChannelListingUpdate(id: $id, input: $input) {- collectionChannelListingErrors {+ errors {fieldmessagecode@@ -56,9 +56,7 @@ def test_collection_channel_listing_update_duplicated_ids_in_add_and_remove(content = get_graphql_content(response)# then- errors = content["data"]["collectionChannelListingUpdate"][- "collectionChannelListingErrors"- ]+ errors = content["data"]["collectionChannelListingUpdate"]["errors"]assert len(errors) == 1assert errors[0]["field"] == "input"assert errors[0]["code"] == CollectionErrorCode.DUPLICATED_INPUT_ITEM.name@@ -90,9 +88,7 @@ def test_collection_channel_listing_update_duplicated_channel_in_add(content = get_graphql_content(response)# then- errors = content["data"]["collectionChannelListingUpdate"][- "collectionChannelListingErrors"- ]+ errors = content["data"]["collectionChannelListingUpdate"]["errors"]assert len(errors) == 1assert errors[0]["field"] == "addChannels"assert errors[0]["code"] == CollectionErrorCode.DUPLICATED_INPUT_ITEM.name@@ -119,9 +115,7 @@ def test_collection_channel_listing_update_duplicated_channel_in_remove(content = get_graphql_content(response)# then- errors = content["data"]["collectionChannelListingUpdate"][- "collectionChannelListingErrors"- ]+ errors = content["data"]["collectionChannelListingUpdate"]["errors"]assert len(errors) == 1assert errors[0]["field"] == "removeChannels"assert errors[0]["code"] == CollectionErrorCode.DUPLICATED_INPUT_ITEM.name@@ -147,9 +141,7 @@ def test_collection_channel_listing_update_with_empty_input(content = get_graphql_content(response)# then- errors = content["data"]["collectionChannelListingUpdate"][- "collectionChannelListingErrors"- ]+ errors = content["data"]["collectionChannelListingUpdate"]["errors"]assert not errors@@ -172,9 +164,7 @@ def test_collection_channel_listing_update_with_empty_lists_in_input(content = get_graphql_content(response)# then- errors = content["data"]["collectionChannelListingUpdate"][- "collectionChannelListingErrors"- ]+ errors = content["data"]["collectionChannelListingUpdate"]["errors"]assert not errors@@ -217,7 +207,7 @@ def test_collection_channel_listing_update_as_staff_user(channel=channel_USD)publication_date_usd = collection_channel_listing.publication_date.isoformat()- assert not data["collectionChannelListingErrors"]+ assert not data["errors"]assert collection_data["slug"] == published_collection.slugassert collection_data["channelListings"][0]["isPublished"] is Trueassert (@@ -272,7 +262,7 @@ def test_collection_channel_listing_update_as_app(publication_date_usd = collection_channel_listing.publication_date.isoformat()data = content["data"]["collectionChannelListingUpdate"]collection_data = data["collection"]- assert not data["collectionChannelListingErrors"]+ assert not data["errors"]assert collection_data["slug"] == published_collection.slugassert collection_data["channelListings"][0]["isPublished"] is Trueassert (@@ -366,7 +356,7 @@ def test_collection_channel_listing_update_add_channel(publication_date_usd = collection_channel_listing.publication_date.isoformat()data = content["data"]["collectionChannelListingUpdate"]collection_data = data["collection"]- assert not data["collectionChannelListingErrors"]+ assert not data["errors"]assert collection_data["slug"] == published_collection.slugassert collection_data["channelListings"][0]["isPublished"] is Trueassert (@@ -405,7 +395,7 @@ def test_collection_channel_listing_update_unpublished(# thendata = content["data"]["collectionChannelListingUpdate"]collection_data = data["collection"]- assert not data["collectionChannelListingErrors"]+ assert not data["errors"]assert collection_data["slug"] == published_collection.slugassert collection_data["channelListings"][0]["isPublished"] is Falseassert (@@ -441,7 +431,7 @@ def test_collection_channel_listing_update_update_publication_date(# thendata = content["data"]["collectionChannelListingUpdate"]collection_data = data["collection"]- assert not data["collectionChannelListingErrors"]+ assert not data["errors"]assert collection_data["slug"] == collection.slugassert (collection_data["channelListings"][0]["publicationDate"]@@ -480,7 +470,7 @@ def test_collection_channel_listing_update_remove_not_assigned_channel(publication_date = collection_channel_listing.publication_date.isoformat()data = content["data"]["collectionChannelListingUpdate"]collection_data = data["collection"]- assert not data["collectionChannelListingErrors"]+ assert not data["errors"]assert collection_data["slug"] == published_collection.slugassert collection_data["channelListings"][0]["isPublished"] is Trueassert collection_data["channelListings"][0]["publicationDate"] == publication_date@@ -514,7 +504,7 @@ def test_collection_channel_listing_update_add_channel_without_publication_date(# thendata = content["data"]["collectionChannelListingUpdate"]collection_data = data["collection"]- assert not data["collectionChannelListingErrors"]+ assert not data["errors"]assert collection_data["slug"] == published_collection.slugassert collection_data["channelListings"][0]["isPublished"] is Trueassert collection_data["channelListings"][0]["channel"]["slug"] == channel_USD.slug@@ -550,7 +540,7 @@ def test_collection_channel_listing_update_publish_without_publication_date(# thendata = content["data"]["collectionChannelListingUpdate"]collection_data = data["collection"]- assert not data["collectionChannelListingErrors"]+ assert not data["errors"]assert collection_data["slug"] == published_collection.slugassert collection_data["channelListings"][0]["isPublished"] is Trueassert (diff --git a/saleor/graphql/product/tests/test_digital_content.py b/saleor/graphql/product/tests/test_digital_content.pyindex bc0d0d7a75..ee4e234ea8 100644--- a/saleor/graphql/product/tests/test_digital_content.py+++ b/saleor/graphql/product/tests/test_digital_content.py@@ -276,7 +276,7 @@ def test_digital_content_update_mutation_missing_content(fieldmessage}- productErrors {+ errors {fieldmessagecode@@ -304,7 +304,7 @@ def test_digital_content_update_mutation_missing_content(assert len(errors) == 1assert errors[0]["field"] == "variantId"- product_errors = content["data"]["digitalContentUpdate"]["productErrors"]+ product_errors = content["data"]["digitalContentUpdate"]["errors"]assert product_errors[0]["code"] == ProductErrorCode.VARIANT_NO_DIGITAL_CONTENT.namediff --git a/saleor/graphql/product/tests/test_product.py b/saleor/graphql/product/tests/test_product.pyindex c08f3e0768..7c4ecf8b4a 100644--- a/saleor/graphql/product/tests/test_product.py+++ b/saleor/graphql/product/tests/test_product.py@@ -1485,7 +1485,6 @@ def test_fetch_product_from_category_query(node {idname- urlslugthumbnail{url@@ -1523,12 +1522,10 @@ def test_fetch_product_from_category_query(gross {amountcurrency- localized}net {amountcurrency- localized}currency}@@ -1553,7 +1550,6 @@ def test_fetch_product_from_category_query(assert len(product_edges_data) == category.products.count()product_data = product_edges_data[0]["node"]assert product_data["name"] == product.name- assert product_data["url"] == ""assert product_data["slug"] == product.slugvariant = product.variants.first()@@ -1643,7 +1639,7 @@ def test_products_query_with_filter_attributes(variables = {"filter": {- "attributes": [{"slug": attribute.slug, "value": attr_value.slug}],+ "attributes": [{"slug": attribute.slug, "values": [attr_value.slug]}],"channel": channel_USD.slug,}}@@ -1672,35 +1668,6 @@ def test_products_query_filter_by_non_existing_attribute(assert len(products) == 0-def test_products_query_with_filter_product_type(- query_products_with_filter, staff_api_client, product, permission_manage_products-):- product_type = ProductType.objects.create(- name="Custom Type",- slug="custom-type",- has_variants=True,- is_shipping_required=True,- )- second_product = product- second_product.id = None- second_product.product_type = product_type- second_product.slug = "second-product"- second_product.save()-- product_type_id = graphene.Node.to_global_id("ProductType", product_type.id)- variables = {"filter": {"productType": product_type_id}}-- staff_api_client.user.user_permissions.add(permission_manage_products)- response = staff_api_client.post_graphql(query_products_with_filter, variables)- content = get_graphql_content(response)- second_product_id = graphene.Node.to_global_id("Product", second_product.id)- products = content["data"]["products"]["edges"]-- assert len(products) == 1- assert products[0]["node"]["id"] == second_product_id- assert products[0]["node"]["name"] == second_product.name--def test_products_query_with_filter_category(query_products_with_filter, staff_api_client, product, permission_manage_products):@@ -2376,10 +2343,10 @@ def test_filter_products_by_wrong_attributes(user_api_client, product, channel_Uproduct.product_type.variant_attributes.get(slug="size").values.first().id)query = """- query ($channel: String){+ query ($channel: String, $attributesFilter: [AttributeInput]){products(filter: {- attributes: {slug: "%(slug)s", value: "%(value)s"},+ attributes: $attributesFilter,channel: $channel},first: 1,@@ -2392,12 +2359,12 @@ def test_filter_products_by_wrong_attributes(user_api_client, product, channel_U}}}- """ % {- "slug": product_attr.slug,- "value": attr_value,- }+ """- variables = {"channel": channel_USD.slug}+ variables = {+ "channel": channel_USD.slug,+ "attributesFilter": [{"slug": product_attr.slug, "values": [attr_value]}],+ }response = user_api_client.post_graphql(query, variables)content = get_graphql_content(response)products = content["data"]["products"]["edges"]@@ -2431,7 +2398,7 @@ def test_filter_products_with_unavailable_variants_attributes_as_user(variables = {"channel": channel_USD.slug,"attributesFilter": [- {"slug": f"{product_attr.slug}", "value": f"{attr_value.slug}"}+ {"slug": f"{product_attr.slug}", "values": [f"{attr_value.slug}"]}],}product_list[0].variants.first().channel_listings.filter(@@ -2472,7 +2439,7 @@ def test_filter_products_with_unavailable_variants_attributes_as_staff(variables = {"channel": channel_USD.slug,"attributesFilter": [- {"slug": f"{product_attr.slug}", "value": f"{attr_value.slug}"}+ {"slug": f"{product_attr.slug}", "values": [f"{attr_value.slug}"]}],}product_list[0].variants.first().channel_listings.filter(@@ -2807,7 +2774,7 @@ CREATE_PRODUCT_MUTATION = """}}}- productErrors {+ errors {fieldcodemessage@@ -2881,7 +2848,7 @@ def test_create_product()content = get_graphql_content(response)data = content["data"]["productCreate"]- assert data["productErrors"] == []+ assert data["errors"] == []assert data["product"]["name"] == product_nameassert data["product"]["slug"] == product_slugassert data["product"]["description"] == description_json@@ -2945,7 +2912,7 @@ def test_create_product_description_plaintext()content = get_graphql_content(response)data = content["data"]["productCreate"]- assert not data["productErrors"]+ assert not data["errors"]product = Product.objects.all().first()assert product.description_plaintext == description@@ -2995,7 +2962,7 @@ def test_create_product_with_rich_text_attribute()content = get_graphql_content(response)data = content["data"]["productCreate"]- assert data["productErrors"] == []+ assert data["errors"] == []assert data["product"]["name"] == product_nameassert data["product"]["slug"] == product_slugassert data["product"]["productType"]["name"] == product_type.name@@ -3203,7 +3170,7 @@ def test_create_product_with_rating()content = get_graphql_content(response)data = content["data"]["productCreate"]- assert data["productErrors"] == []+ assert data["errors"] == []assert data["product"]["rating"] == expected_ratingassert Product.objects.get().rating == expected_rating@@ -3246,7 +3213,7 @@ def test_create_product_with_file_attribute()content = get_graphql_content(response)data = content["data"]["productCreate"]- assert data["productErrors"] == []+ assert data["errors"] == []assert data["product"]["name"] == product_nameassert data["product"]["slug"] == product_slugassert data["product"]["productType"]["name"] == product_type.name@@ -3315,7 +3282,7 @@ def test_create_product_with_page_reference_attribute()content = get_graphql_content(response)data = content["data"]["productCreate"]- assert data["productErrors"] == []+ assert data["errors"] == []assert data["product"]["name"] == product_nameassert data["product"]["slug"] == product_slugassert data["product"]["productType"]["name"] == product_type.name@@ -3384,7 +3351,7 @@ def test_create_product_with_product_reference_attribute()content = get_graphql_content(response)data = content["data"]["productCreate"]- assert data["productErrors"] == []+ assert data["errors"] == []assert data["product"]["name"] == product_nameassert data["product"]["slug"] == product_slugassert data["product"]["productType"]["name"] == product_type.name@@ -3457,7 +3424,7 @@ def test_create_product_with_product_reference_attribute_values_saved_in_order()content = get_graphql_content(response)data = content["data"]["productCreate"]- assert data["productErrors"] == []+ assert data["errors"] == []assert data["product"]["name"] == product_nameassert data["product"]["slug"] == product_slugassert data["product"]["productType"]["name"] == product_type.name@@ -3525,7 +3492,7 @@ def test_create_product_with_file_attribute_new_attribute_value()content = get_graphql_content(response)data = content["data"]["productCreate"]- assert data["productErrors"] == []+ assert data["errors"] == []assert data["product"]["name"] == product_nameassert data["product"]["slug"] == product_slugassert data["product"]["productType"]["name"] == product_type.name@@ -3594,7 +3561,7 @@ def test_create_product_with_file_attribute_not_required_no_file_url_given()content = get_graphql_content(response)data = content["data"]["productCreate"]- assert data["productErrors"] == []+ assert data["errors"] == []assert data["product"]["name"] == product_nameassert data["product"]["slug"] == product_slugassert data["product"]["productType"]["name"] == product_type.name@@ -3647,7 +3614,7 @@ def test_create_product_with_file_attribute_required_no_file_url_given()content = get_graphql_content(response)data = content["data"]["productCreate"]- errors = data["productErrors"]+ errors = data["errors"]assert not data["product"]assert len(errors) == 1assert errors[0]["code"] == ProductErrorCode.REQUIRED.name@@ -3696,7 +3663,7 @@ def test_create_product_with_page_reference_attribute_required_no_references()content = get_graphql_content(response)data = content["data"]["productCreate"]- errors = data["productErrors"]+ errors = data["errors"]assert not data["product"]assert len(errors) == 1assert errors[0]["code"] == ProductErrorCode.REQUIRED.name@@ -3747,7 +3714,7 @@ def test_create_product_with_product_reference_attribute_required_no_references()content = get_graphql_content(response)data = content["data"]["productCreate"]- errors = data["productErrors"]+ errors = data["errors"]assert not data["product"]assert len(errors) == 1assert errors[0]["code"] == ProductErrorCode.REQUIRED.name@@ -3792,7 +3759,7 @@ def test_create_product_no_values_given()content = get_graphql_content(response)data = content["data"]["productCreate"]- assert data["productErrors"] == []+ assert data["errors"] == []assert data["product"]["name"] == product_nameassert data["product"]["slug"] == product_slugassert data["product"]["productType"]["name"] == product_type.name@@ -3809,7 +3776,7 @@ PRODUCT_VARIANT_SET_DEFAULT_MUTATION = """id}}- productErrors {+ errors {codefield}@@ -3821,7 +3788,7 @@ PRODUCT_VARIANT_SET_DEFAULT_MUTATION = """REORDER_PRODUCT_VARIANTS_MUTATION = """mutation ProductVariantReorder($product: ID!, $moves: [ReorderInput]!) {productVariantReorder(productId: $product, moves: $moves) {- productErrors {+ errors {codefield}@@ -3857,7 +3824,7 @@ def test_product_variant_set_default(assert product_with_two_variants.default_variant == first_variantcontent = get_graphql_content(response)data = content["data"]["productVariantSetDefault"]- assert not data["productErrors"]+ assert not data["errors"]assert data["product"]["defaultVariant"]["id"] == first_variant_id@@ -3884,8 +3851,8 @@ def test_product_variant_set_default_invalid_id(assert not product_with_two_variants.default_variantcontent = get_graphql_content(response)data = content["data"]["productVariantSetDefault"]- assert data["productErrors"][0]["code"] == ProductErrorCode.INVALID.name- assert data["productErrors"][0]["field"] == "variantId"+ assert data["errors"][0]["code"] == ProductErrorCode.INVALID.name+ assert data["errors"][0]["field"] == "variantId"def test_product_variant_set_default_not_products_variant(@@ -3914,10 +3881,8 @@ def test_product_variant_set_default_not_products_variant(assert not product_with_two_variants.default_variantcontent = get_graphql_content(response)data = content["data"]["productVariantSetDefault"]- assert (- data["productErrors"][0]["code"] == ProductErrorCode.NOT_PRODUCTS_VARIANT.name- )- assert data["productErrors"][0]["field"] == "variantId"+ assert data["errors"][0]["code"] == ProductErrorCode.NOT_PRODUCTS_VARIANT.name+ assert data["errors"][0]["field"] == "variantId"def test_reorder_variants(@@ -3946,7 +3911,7 @@ def test_reorder_variants()content = get_graphql_content(response)data = content["data"]["productVariantReorder"]- assert not data["productErrors"]+ assert not data["errors"]assert list(product_with_two_variants.variants.all()) == new_variants@@ -3977,8 +3942,8 @@ def test_reorder_variants_invalid_variants()content = get_graphql_content(response)data = content["data"]["productVariantReorder"]- assert data["productErrors"][0]["field"] == "moves"- assert data["productErrors"][0]["code"] == ProductErrorCode.NOT_FOUND.name+ assert data["errors"][0]["field"] == "moves"+ assert data["errors"][0]["code"] == ProductErrorCode.NOT_FOUND.name@pytest.mark.parametrize("input_slug", ["", None])@@ -4023,7 +3988,7 @@ def test_create_product_no_slug_in_input()content = get_graphql_content(response)data = content["data"]["productCreate"]- assert data["productErrors"] == []+ assert data["errors"] == []assert data["product"]["name"] == product_nameassert data["product"]["slug"] == "test-name"assert data["product"]["taxType"]["taxCode"] == product_tax_rate@@ -4065,7 +4030,7 @@ def test_create_product_no_category_id()content = get_graphql_content(response)data = content["data"]["productCreate"]- assert data["productErrors"] == []+ assert data["errors"] == []assert data["product"]["name"] == product_nameassert data["product"]["slug"] == input_slugassert data["product"]["taxType"]["taxCode"] == product_tax_rate@@ -4102,7 +4067,7 @@ def test_create_product_with_negative_weight()content = get_graphql_content(response)data = content["data"]["productCreate"]- error = data["productErrors"][0]+ error = data["errors"][0]assert error["field"] == "weight"assert error["code"] == ProductErrorCode.INVALID.name@@ -4137,7 +4102,7 @@ def test_create_product_with_unicode_in_slug_and_name()content = get_graphql_content(response)data = content["data"]["productCreate"]- error = data["productErrors"]+ error = data["errors"]assert not errorassert data["product"]["name"] == product_nameassert data["product"]["slug"] == slug@@ -4211,7 +4176,7 @@ def test_create_product_invalid_product_attributes()content = get_graphql_content(response)data = content["data"]["productCreate"]- errors = data["productErrors"]+ errors = data["errors"]assert not data["product"]assert len(errors) == 2@@ -4426,7 +4391,7 @@ MUTATION_UPDATE_PRODUCT = """}}}- productErrors {+ errors {messagefieldcode@@ -4490,7 +4455,7 @@ def test_update_product()content = get_graphql_content(response)data = content["data"]["productUpdate"]- assert data["productErrors"] == []+ assert data["errors"] == []assert data["product"]["name"] == product_nameassert data["product"]["slug"] == product_slugassert data["product"]["description"] == json.dumps(expected_other_description_json)@@ -4543,7 +4508,7 @@ def test_update_and_search_product_by_description()content = get_graphql_content(response)data = content["data"]["productUpdate"]- assert not data["productErrors"]+ assert not data["errors"]assert data["product"]["name"] == product_nameassert data["product"]["slug"] == product_slugassert data["product"]["description"] == other_description_json@@ -4581,7 +4546,7 @@ def test_update_product_without_description_clear_description_plaintext()content = get_graphql_content(response)data = content["data"]["productUpdate"]- assert not data["productErrors"]+ assert not data["errors"]assert data["product"]["name"] == product_nameassert data["product"]["slug"] == product_slugassert data["product"]["description"] is None@@ -4622,7 +4587,7 @@ def test_update_product_with_file_attribute_value(# thencontent = get_graphql_content(response)data = content["data"]["productUpdate"]- assert data["productErrors"] == []+ assert data["errors"] == []attributes = data["product"]["attributes"]@@ -4683,7 +4648,7 @@ def test_update_product_with_file_attribute_value_new_value_is_not_created(# thencontent = get_graphql_content(response)data = content["data"]["productUpdate"]- assert data["productErrors"] == []+ assert data["errors"] == []attributes = data["product"]["attributes"]@@ -4744,7 +4709,7 @@ def test_update_product_clear_attribute_values(# thencontent = get_graphql_content(response)data = content["data"]["productUpdate"]- assert data["productErrors"] == []+ assert data["errors"] == []attributes = data["product"]["attributes"]@@ -4775,7 +4740,7 @@ def test_update_product_rating()content = get_graphql_content(response)data = content["data"]["productUpdate"]- assert data["productErrors"] == []+ assert data["errors"] == []assert data["product"]["rating"] == expected_ratingproduct.refresh_from_db()assert product.rating == expected_rating@@ -4818,7 +4783,7 @@ def test_update_product_with_page_reference_attribute_value(# thencontent = get_graphql_content(response)data = content["data"]["productUpdate"]- assert data["productErrors"] == []+ assert data["errors"] == []attributes = data["product"]["attributes"]@@ -4891,7 +4856,7 @@ def test_update_product_with_page_reference_attribute_existing_value(# thencontent = get_graphql_content(response)data = content["data"]["productUpdate"]- assert data["productErrors"] == []+ assert data["errors"] == []attributes = data["product"]["attributes"]@@ -4954,7 +4919,7 @@ def test_update_product_with_page_reference_attribute_value_not_given(# thencontent = get_graphql_content(response)data = content["data"]["productUpdate"]- errors = data["productErrors"]+ errors = data["errors"]assert not data["product"]assert len(errors) == 1@@ -5002,7 +4967,7 @@ def test_update_product_with_product_reference_attribute_value(# thencontent = get_graphql_content(response)data = content["data"]["productUpdate"]- assert data["productErrors"] == []+ assert data["errors"] == []attributes = data["product"]["attributes"]@@ -5076,7 +5041,7 @@ def test_update_product_with_product_reference_attribute_existing_value(# thencontent = get_graphql_content(response)data = content["data"]["productUpdate"]- assert data["productErrors"] == []+ assert data["errors"] == []attributes = data["product"]["attributes"]@@ -5139,7 +5104,7 @@ def test_update_product_with_product_reference_attribute_value_not_given(# thencontent = get_graphql_content(response)data = content["data"]["productUpdate"]- errors = data["productErrors"]+ errors = data["errors"]assert not data["product"]assert len(errors) == 1@@ -5213,7 +5178,7 @@ def test_update_product_change_values_ordering(# thencontent = get_graphql_content(response)data = content["data"]["productUpdate"]- assert data["productErrors"] == []+ assert data["errors"] == []attributes = data["product"]["attributes"]@@ -5246,7 +5211,7 @@ UPDATE_PRODUCT_SLUG_MUTATION = """nameslug}- productErrors {+ errors {fieldmessagecode@@ -5284,7 +5249,7 @@ def test_update_product_slug()content = get_graphql_content(response)data = content["data"]["productUpdate"]- errors = data["productErrors"]+ errors = data["errors"]if not error_message:assert not errorsassert data["product"]["slug"] == expected_slug@@ -5314,7 +5279,7 @@ def test_update_product_slug_exists()content = get_graphql_content(response)data = content["data"]["productUpdate"]- errors = data["productErrors"]+ errors = data["errors"]assert errorsassert errors[0]["field"] == "slug"assert errors[0]["code"] == ProductErrorCode.UNIQUE.name@@ -5354,7 +5319,7 @@ def test_update_product_slug_and_name(nameslug}- productErrors {+ errors {fieldmessagecode@@ -5377,7 +5342,7 @@ def test_update_product_slug_and_name(content = get_graphql_content(response)product.refresh_from_db()data = content["data"]["productUpdate"]- errors = data["productErrors"]+ errors = data["errors"]if not error_message:assert data["product"]["name"] == input_name == product.nameassert data["product"]["slug"] == input_slug == product.slug@@ -5390,7 +5355,7 @@ def test_update_product_slug_and_name(SET_ATTRIBUTES_TO_PRODUCT_QUERY = """mutation updateProduct($productId: ID!, $attributes: [AttributeValueInput!]) {productUpdate(id: $productId, input: { attributes: $attributes }) {- productErrors {+ errors {messagefieldcode@@ -5426,7 +5391,7 @@ def test_update_product_can_only_assign_multiple_values_to_valid_input_types(data = get_graphql_content(staff_api_client.post_graphql(SET_ATTRIBUTES_TO_PRODUCT_QUERY, variables))["data"]["productUpdate"]- assert data["productErrors"] == [+ assert data["errors"] == [{"field": "attributes","code": ProductErrorCode.INVALID.name,@@ -5440,7 +5405,7 @@ def test_update_product_can_only_assign_multiple_values_to_valid_input_types(data = get_graphql_content(staff_api_client.post_graphql(SET_ATTRIBUTES_TO_PRODUCT_QUERY, variables))["data"]["productUpdate"]- assert not data["productErrors"]+ assert not data["errors"]def test_update_product_with_existing_attribute_value(@@ -5464,7 +5429,7 @@ def test_update_product_with_existing_attribute_value(data = get_graphql_content(staff_api_client.post_graphql(SET_ATTRIBUTES_TO_PRODUCT_QUERY, variables))["data"]["productUpdate"]- assert not data["productErrors"]+ assert not data["errors"]assert (color_attribute.values.count() == expected_attribute_values_count@@ -5500,7 +5465,7 @@ def test_update_product_without_supplying_required_product_attribute(data = get_graphql_content(staff_api_client.post_graphql(SET_ATTRIBUTES_TO_PRODUCT_QUERY, variables))["data"]["productUpdate"]- assert data["productErrors"] == [+ assert data["errors"] == [{"field": "attributes","code": ProductErrorCode.REQUIRED.name,@@ -5532,7 +5497,7 @@ def test_update_product_with_non_existing_attribute(data = get_graphql_content(staff_api_client.post_graphql(SET_ATTRIBUTES_TO_PRODUCT_QUERY, variables))["data"]["productUpdate"]- assert data["productErrors"] == [+ assert data["errors"] == [{"field": "attributes","code": ProductErrorCode.NOT_FOUND.name,@@ -5558,7 +5523,7 @@ def test_update_product_with_no_attribute_slug_or_id(data = get_graphql_content(staff_api_client.post_graphql(SET_ATTRIBUTES_TO_PRODUCT_QUERY, variables))["data"]["productUpdate"]- assert data["productErrors"] == [+ assert data["errors"] == [{"field": "attributes","code": ProductErrorCode.REQUIRED.name,@@ -5585,7 +5550,7 @@ def test_update_product_with_negative_weight(product {id}- productErrors {+ errors {fieldmessagecode@@ -5603,7 +5568,7 @@ def test_update_product_with_negative_weight()content = get_graphql_content(response)data = content["data"]["productUpdate"]- error = data["productErrors"][0]+ error = data["errors"][0]assert error["field"] == "weight"assert error["code"] == ProductErrorCode.INVALID.name@@ -6083,7 +6048,7 @@ PRODUCT_TYPE_CREATE_MUTATION = """}}}- productErrors {+ errors {fieldmessagecode@@ -6185,7 +6150,7 @@ def test_create_product_type_with_rich_text_attribute()content = get_graphql_content(response)data = content["data"]["productTypeCreate"]["productType"]- errors = content["data"]["productTypeCreate"]["productErrors"]+ errors = content["data"]["productTypeCreate"]["errors"]assert not errorsassert data["name"] == product_type_name@@ -6237,7 +6202,7 @@ def test_create_product_type_with_given_slug()content = get_graphql_content(response)data = content["data"]["productTypeCreate"]- assert not data["productErrors"]+ assert not data["errors"]assert data["productType"]["slug"] == expected_slug@@ -6252,7 +6217,7 @@ def test_create_product_type_with_unicode_in_name()content = get_graphql_content(response)data = content["data"]["productTypeCreate"]- assert not data["productErrors"]+ assert not data["errors"]assert data["productType"]["name"] == nameassert data["productType"]["slug"] == "わたし-わ-にっぽん-です"@@ -6268,7 +6233,7 @@ def test_create_product_type_create_with_negative_weight()content = get_graphql_content(response)data = content["data"]["productTypeCreate"]- error = data["productErrors"][0]+ error = data["errors"][0]assert error["field"] == "weight"assert error["code"] == ProductErrorCode.INVALID.name@@ -6323,7 +6288,7 @@ def test_product_type_create_mutation_not_valid_attributes(# thencontent = get_graphql_content(response)data = content["data"]["productTypeCreate"]- errors = data["productErrors"]+ errors = data["errors"]assert len(errors) == 2expected_errors = [@@ -6378,7 +6343,7 @@ mutation updateProductType(id}}- productErrors {+ errors {codefieldattributes@@ -6465,7 +6430,7 @@ def test_product_type_update_mutation_not_valid_attributes(# thencontent = get_graphql_content(response)data = content["data"]["productTypeUpdate"]- errors = data["productErrors"]+ errors = data["errors"]assert len(errors) == 1assert errors[0]["field"] == "productAttributes"@@ -6485,7 +6450,7 @@ UPDATE_PRODUCT_TYPE_SLUG_MUTATION = """nameslug}- productErrors {+ errors {fieldmessagecode@@ -6523,7 +6488,7 @@ def test_update_product_type_slug()content = get_graphql_content(response)data = content["data"]["productTypeUpdate"]- errors = data["productErrors"]+ errors = data["errors"]if not error_message:assert not errorsassert data["productType"]["slug"] == expected_slug@@ -6553,7 +6518,7 @@ def test_update_product_type_slug_exists()content = get_graphql_content(response)data = content["data"]["productTypeUpdate"]- errors = data["productErrors"]+ errors = data["errors"]assert errorsassert errors[0]["field"] == "slug"assert errors[0]["code"] == ProductErrorCode.UNIQUE.name@@ -6593,7 +6558,7 @@ def test_update_product_type_slug_and_name(nameslug}- productErrors {+ errors {fieldmessagecode@@ -6616,7 +6581,7 @@ def test_update_product_type_slug_and_name(content = get_graphql_content(response)product_type.refresh_from_db()data = content["data"]["productTypeUpdate"]- errors = data["productErrors"]+ errors = data["errors"]if not error_message:assert data["productType"]["name"] == input_name == product_type.nameassert data["productType"]["slug"] == input_slug == product_type.slug@@ -6642,7 +6607,7 @@ def test_update_product_type_with_negative_weight(productType{name}- productErrors {+ errors {fieldmessagecode@@ -6659,7 +6624,7 @@ def test_update_product_type_with_negative_weight(content = get_graphql_content(response)product_type.refresh_from_db()data = content["data"]["productTypeUpdate"]- error = data["productErrors"][0]+ error = data["errors"][0]assert error["field"] == "weight"assert error["code"] == ProductErrorCode.INVALID.name@@ -6798,7 +6763,7 @@ PRODUCT_MEDIA_CREATE_QUERY = """oembedData}}- productErrors {+ errors {codefield}@@ -6862,7 +6827,7 @@ def test_product_media_create_mutation_without_file()content = get_graphql_content(response)- errors = content["data"]["productMediaCreate"]["productErrors"]+ errors = content["data"]["productMediaCreate"]["errors"]assert errors[0]["field"] == "image"assert errors[0]["code"] == ProductErrorCode.REQUIRED.name@@ -6915,7 +6880,7 @@ def test_product_media_create_mutation_without_url_or_image()content = get_graphql_content(response)- errors = content["data"]["productMediaCreate"]["productErrors"]+ errors = content["data"]["productMediaCreate"]["errors"]assert len(errors) == 1assert errors[0]["code"] == ProductErrorCode.REQUIRED.nameassert errors[0]["field"] == "input"@@ -6940,7 +6905,7 @@ def test_product_media_create_mutation_with_both_url_and_image()content = get_graphql_content(response)- errors = content["data"]["productMediaCreate"]["productErrors"]+ errors = content["data"]["productMediaCreate"]["errors"]assert len(errors) == 1assert errors[0]["code"] == ProductErrorCode.DUPLICATED_INPUT_ITEM.nameassert errors[0]["field"] == "input"@@ -6963,7 +6928,7 @@ def test_product_media_create_mutation_with_unknown_url()content = get_graphql_content(response)- errors = content["data"]["productMediaCreate"]["productErrors"]+ errors = content["data"]["productMediaCreate"]["errors"]assert len(errors) == 1assert errors[0]["code"] == ProductErrorCode.UNSUPPORTED_MEDIA_PROVIDER.nameassert errors[0]["field"] == "mediaUrl"@@ -8640,7 +8605,7 @@ mutation createProduct(quantityAvailable(countryCode: $country)}}- productErrors {+ errors {messagefieldcode@@ -8756,7 +8721,7 @@ mutation createProduct(unit}}- productErrors {+ errors {messagefieldcode@@ -8854,7 +8819,7 @@ def test_create_product_with_weight_input(unit}}}}- productErrors {{+ errors {{messagefieldcodediff --git a/saleor/graphql/product/tests/test_product_channel_listing_update.py b/saleor/graphql/product/tests/test_product_channel_listing_update.pyindex cf90a71e65..287d358d9f 100644--- a/saleor/graphql/product/tests/test_product_channel_listing_update.py+++ b/saleor/graphql/product/tests/test_product_channel_listing_update.py@@ -15,7 +15,7 @@ mutation UpdateProductChannelListing($input: ProductChannelListingUpdateInput!) {productChannelListingUpdate(id: $id, input: $input) {- productChannelListingErrors {+ errors {fieldmessagecode@@ -82,9 +82,7 @@ def test_product_channel_listing_update_duplicated_ids_in_add_and_remove(content = get_graphql_content(response)# then- errors = content["data"]["productChannelListingUpdate"][- "productChannelListingErrors"- ]+ errors = content["data"]["productChannelListingUpdate"]["errors"]assert len(errors) == 1assert errors[0]["field"] == "input"assert errors[0]["code"] == ProductErrorCode.DUPLICATED_INPUT_ITEM.name@@ -116,9 +114,7 @@ def test_product_channel_listing_update_duplicated_channel_in_add(content = get_graphql_content(response)# then- errors = content["data"]["productChannelListingUpdate"][- "productChannelListingErrors"- ]+ errors = content["data"]["productChannelListingUpdate"]["errors"]assert len(errors) == 1assert errors[0]["field"] == "updateChannels"assert errors[0]["code"] == ProductErrorCode.DUPLICATED_INPUT_ITEM.name@@ -145,9 +141,7 @@ def test_product_channel_listing_update_duplicated_channel_in_remove(content = get_graphql_content(response)# then- errors = content["data"]["productChannelListingUpdate"][- "productChannelListingErrors"- ]+ errors = content["data"]["productChannelListingUpdate"]["errors"]assert len(errors) == 1assert errors[0]["field"] == "removeChannels"assert errors[0]["code"] == ProductErrorCode.DUPLICATED_INPUT_ITEM.name@@ -173,9 +167,7 @@ def test_product_channel_listing_update_with_empty_input(content = get_graphql_content(response)# then- errors = content["data"]["productChannelListingUpdate"][- "productChannelListingErrors"- ]+ errors = content["data"]["productChannelListingUpdate"]["errors"]assert not errors@@ -198,9 +190,7 @@ def test_product_channel_listing_update_with_empty_lists_in_input(content = get_graphql_content(response)# then- errors = content["data"]["productChannelListingUpdate"][- "productChannelListingErrors"- ]+ errors = content["data"]["productChannelListingUpdate"]["errors"]assert not errors@@ -245,7 +235,7 @@ def test_product_channel_listing_update_as_staff_user(purchase_cost, margin = get_product_costs_data(variant_channel_listing, True, channel_USD.currency_code)- assert not data["productChannelListingErrors"]+ assert not data["errors"]assert product_data["slug"] == product.slugassert product_data["channelListings"][0]["isPublished"] is Trueassert product_data["channelListings"][0]["publicationDate"] is None@@ -354,7 +344,7 @@ def test_product_channel_listing_update_as_app(# thendata = content["data"]["productChannelListingUpdate"]product_data = data["product"]- assert not data["productChannelListingErrors"]+ assert not data["errors"]assert product_data["slug"] == product.slugassert product_data["channelListings"][0]["isPublished"] is Trueassert product_data["channelListings"][0]["publicationDate"] is None@@ -452,7 +442,7 @@ def test_product_channel_listing_update_add_channel(# thendata = content["data"]["productChannelListingUpdate"]product_data = data["product"]- assert not data["productChannelListingErrors"]+ assert not data["errors"]assert product_data["slug"] == product.slugassert product_data["channelListings"][0]["isPublished"] is Trueassert product_data["channelListings"][0]["publicationDate"] is None@@ -494,7 +484,7 @@ def test_product_channel_listing_update_add_channel_without_publication_date(# thendata = content["data"]["productChannelListingUpdate"]product_data = data["product"]- assert not data["productChannelListingErrors"]+ assert not data["errors"]assert product_data["slug"] == product.slugassert product_data["channelListings"][0]["isPublished"] is Trueassert product_data["channelListings"][0]["publicationDate"] is None@@ -530,7 +520,7 @@ def test_product_channel_listing_update_unpublished(# thendata = content["data"]["productChannelListingUpdate"]product_data = data["product"]- assert not data["productChannelListingErrors"]+ assert not data["errors"]assert product_data["slug"] == product.slugassert product_data["channelListings"][0]["isPublished"] is Falseassert (@@ -570,7 +560,7 @@ def test_product_channel_listing_update_publish_without_publication_date(# thendata = content["data"]["productChannelListingUpdate"]product_data = data["product"]- assert not data["productChannelListingErrors"]+ assert not data["errors"]assert product_data["slug"] == product.slugassert product_data["channelListings"][0]["isPublished"] is Trueassert (@@ -605,7 +595,7 @@ def test_product_channel_listing_update_remove_publication_date(# thendata = content["data"]["productChannelListingUpdate"]product_data = data["product"]- assert not data["productChannelListingErrors"]+ assert not data["errors"]assert product_data["slug"] == product.slugassert product_data["channelListings"][0]["isPublished"] is Trueassert product_data["channelListings"][0]["publicationDate"] is None@@ -642,7 +632,7 @@ def test_product_channel_listing_update_visible_in_listings(# thendata = content["data"]["productChannelListingUpdate"]product_data = data["product"]- assert not data["productChannelListingErrors"]+ assert not data["errors"]assert product_data["slug"] == product.slugassert product_data["channelListings"][0]["isPublished"] is Trueassert product_data["channelListings"][0]["publicationDate"] is None@@ -686,7 +676,7 @@ def test_product_channel_listing_update_update_publication_data(# thendata = content["data"]["productChannelListingUpdate"]product_data = data["product"]- assert not data["productChannelListingErrors"]+ assert not data["errors"]assert product_data["slug"] == product.slugassert product_data["channelListings"][0]["isPublished"] is Falseassert (@@ -728,7 +718,7 @@ def test_product_channel_listing_update_update_is_available_for_purchase_false(# thendata = content["data"]["productChannelListingUpdate"]product_data = data["product"]- assert not data["productChannelListingErrors"]+ assert not data["errors"]assert product_data["slug"] == product.slugassert product_data["channelListings"][0]["isPublished"] is Trueassert not product_data["channelListings"][0]["publicationDate"]@@ -764,7 +754,7 @@ def test_product_channel_listing_update_update_is_available_for_purchase_without# thendata = content["data"]["productChannelListingUpdate"]product_data = data["product"]- assert not data["productChannelListingErrors"]+ assert not data["errors"]assert product_data["slug"] == product.slugassert product_data["channelListings"][0]["isPublished"] is Trueassert not product_data["channelListings"][0]["publicationDate"]@@ -808,7 +798,7 @@ def test_product_channel_listing_update_update_is_available_for_purchase_past_da# thendata = content["data"]["productChannelListingUpdate"]product_data = data["product"]- assert not data["productChannelListingErrors"]+ assert not data["errors"]assert product_data["slug"] == product.slugassert product_data["channelListings"][0]["isPublished"] is Trueassert not product_data["channelListings"][0]["publicationDate"]@@ -852,7 +842,7 @@ def test_product_channel_listing_update_update_is_available_for_purchase_future_# thendata = content["data"]["productChannelListingUpdate"]product_data = data["product"]- assert not data["productChannelListingErrors"]+ assert not data["errors"]assert product_data["slug"] == product.slugassert product_data["channelListings"][0]["isPublished"] is Trueassert not product_data["channelListings"][0]["publicationDate"]@@ -895,7 +885,7 @@ def test_product_channel_listing_update_update_is_available_for_purchase_false_a# thendata = content["data"]["productChannelListingUpdate"]- errors = data["productChannelListingErrors"]+ errors = data["errors"]assert errors[0]["field"] == "availableForPurchaseDate"assert errors[0]["code"] == ProductErrorCode.INVALID.nameassert errors[0]["channels"] == [channel_id]@@ -932,7 +922,7 @@ def test_product_channel_listing_update_remove_channel(# thendata = content["data"]["productChannelListingUpdate"]product_data = data["product"]- assert not data["productChannelListingErrors"]+ assert not data["errors"]assert product_data["slug"] == product.slugassert len(product_data["channelListings"]) == 1assert product.channel_listings.get() == product_channel_listing_pln@@ -961,7 +951,7 @@ def test_product_channel_listing_update_remove_not_assigned_channel(# thendata = content["data"]["productChannelListingUpdate"]product_data = data["product"]- assert not data["productChannelListingErrors"]+ assert not data["errors"]assert product_data["slug"] == product.slugassert product_data["channelListings"][0]["isPublished"] is Trueassert product_data["channelListings"][0]["publicationDate"] is None@@ -998,7 +988,7 @@ def test_product_channel_listing_update_publish_product_without_category(# thendata = content["data"]["productChannelListingUpdate"]- errors = data["productChannelListingErrors"]+ errors = data["errors"]assert errors[0]["field"] == "isPublished"assert errors[0]["code"] == ProductErrorCode.PRODUCT_WITHOUT_CATEGORY.nameassert errors[0]["channels"] == [channel_usd_id]@@ -1037,7 +1027,7 @@ def test_product_channel_listing_add_variant_as_staff_user(data = content["data"]["productChannelListingUpdate"]variant_data = data["product"]["variants"]- assert not data["productChannelListingErrors"]+ assert not data["errors"]assert variant_data[0]["channelListings"][0]["channel"]["slug"] == channel_USD.slugassert variant_data[1]["channelListings"][0]["channel"]["slug"] == channel_USD.slug@@ -1074,7 +1064,7 @@ def test_product_channel_listing_add_variant_as_app(data = content["data"]["productChannelListingUpdate"]variant_data = data["product"]["variants"]- assert not data["productChannelListingErrors"]+ assert not data["errors"]assert variant_data[0]["channelListings"][0]["channel"]["slug"] == channel_USD.slugassert variant_data[1]["channelListings"][0]["channel"]["slug"] == channel_USD.slug@@ -1109,7 +1099,7 @@ def test_product_channel_listing_remove_variant_as_staff_user(# thendata = content["data"]["productChannelListingUpdate"]- assert not data["productChannelListingErrors"]+ assert not data["errors"]assert len(variant.channel_listings.all()) == 1@@ -1144,7 +1134,7 @@ def test_product_channel_listing_remove_variant_as_app(# thendata = content["data"]["productChannelListingUpdate"]- assert not data["productChannelListingErrors"]+ assert not data["errors"]assert len(variant.channel_listings.all()) == 1@@ -1181,9 +1171,7 @@ def test_product_channel_listing_add_variant_duplicated_ids_in_add_and_remove(content = get_graphql_content(response)# then- errors = content["data"]["productChannelListingUpdate"][- "productChannelListingErrors"- ]+ errors = content["data"]["productChannelListingUpdate"]["errors"]assert len(errors) == 1assert errors[0]["field"] == "addVariants"assert errors[0]["code"] == ProductErrorCode.DUPLICATED_INPUT_ITEM.name@@ -1221,9 +1209,7 @@ def test_product_channel_listing_add_variant_with_existing_channel_listing(content = get_graphql_content(response)# then- errors = content["data"]["productChannelListingUpdate"][- "productChannelListingErrors"- ]+ errors = content["data"]["productChannelListingUpdate"]["errors"]assert len(errors) == 1assert errors[0]["field"] == "addVariants"assert errors[0]["code"] == ProductErrorCode.ALREADY_EXISTS.name@@ -1262,5 +1248,5 @@ def test_product_channel_listing_remove_last_variant_channel_listing(# thendata = content["data"]["productChannelListingUpdate"]- assert not data["productChannelListingErrors"]+ assert not data["errors"]assert not product.channel_listings.filter(channel=channel_USD).exists()diff --git a/saleor/graphql/product/tests/test_product_discounted_price.py b/saleor/graphql/product/tests/test_product_discounted_price.pyindex 67310a90a2..5885bf269e 100644--- a/saleor/graphql/product/tests/test_product_discounted_price.py+++ b/saleor/graphql/product/tests/test_product_discounted_price.py@@ -323,7 +323,7 @@ def test_sale_add_catalogues_updates_products_discounted_prices(sale {name}- discountErrors {+ errors {fieldmessage}@@ -349,7 +349,7 @@ def test_sale_add_catalogues_updates_products_discounted_prices(assert response.status_code == 200content = get_graphql_content(response)- assert not content["data"]["saleCataloguesAdd"]["discountErrors"]+ assert not content["data"]["saleCataloguesAdd"]["errors"]mock_update_products_discounted_prices_of_catalogues.delay.assert_called_once_with(product_ids=[product.pk],@@ -380,7 +380,7 @@ def test_sale_remove_catalogues_updates_products_discounted_prices(sale {name}- discountErrors {+ errors {fieldmessage}@@ -406,7 +406,7 @@ def test_sale_remove_catalogues_updates_products_discounted_prices(assert response.status_code == 200content = get_graphql_content(response)- assert not content["data"]["saleCataloguesRemove"]["discountErrors"]+ assert not content["data"]["saleCataloguesRemove"]["errors"]mock_update_products_discounted_prices_of_catalogues.delay.assert_called_once_with(product_ids=[product.pk],diff --git a/saleor/graphql/product/tests/test_variant.py b/saleor/graphql/product/tests/test_variant.pyindex 37abc79304..1396fe0133 100644--- a/saleor/graphql/product/tests/test_variant.py+++ b/saleor/graphql/product/tests/test_variant.py@@ -338,7 +338,7 @@ CREATE_VARIANT_MUTATION = """trackInventory: $trackInventory,weight: $weight}) {- productErrors {+ errors {fieldmessageattributes@@ -366,7 +366,6 @@ CREATE_VARIANT_MUTATION = """costPrice {currencyamount- localized}weight {value@@ -426,7 +425,7 @@ def test_create_variant(content = get_graphql_content(response)["data"]["productVariantCreate"]flush_post_commit_hooks()- assert not content["productErrors"]+ assert not content["errors"]data = content["productVariant"]assert data["name"] == variant_valueassert data["sku"] == sku@@ -484,7 +483,7 @@ def test_create_variant_with_file_attribute(content = get_graphql_content(response)["data"]["productVariantCreate"]flush_post_commit_hooks()- assert not content["productErrors"]+ assert not content["errors"]data = content["productVariant"]assert data["name"] == skuassert data["sku"] == sku@@ -550,7 +549,7 @@ def test_create_variant_with_file_attribute_new_value(content = get_graphql_content(response)["data"]["productVariantCreate"]flush_post_commit_hooks()- assert not content["productErrors"]+ assert not content["errors"]data = content["productVariant"]assert data["name"] == skuassert data["sku"] == sku@@ -614,7 +613,7 @@ def test_create_variant_with_file_attribute_no_file_url_given(content = get_graphql_content(response)["data"]["productVariantCreate"]flush_post_commit_hooks()- errors = content["productErrors"]+ errors = content["errors"]data = content["productVariant"]assert not errorsassert data["name"] == sku@@ -679,7 +678,7 @@ def test_create_variant_with_page_reference_attribute(content = get_graphql_content(response)["data"]["productVariantCreate"]flush_post_commit_hooks()- assert not content["productErrors"]+ assert not content["errors"]data = content["productVariant"]assert data["sku"] == skuvariant_id = data["id"]@@ -759,7 +758,7 @@ def test_create_variant_with_page_reference_attribute_no_references_given()content = get_graphql_content(response)["data"]["productVariantCreate"]flush_post_commit_hooks()- errors = content["productErrors"]+ errors = content["errors"]data = content["productVariant"]assert not data@@ -823,7 +822,7 @@ def test_create_variant_with_product_reference_attribute(content = get_graphql_content(response)["data"]["productVariantCreate"]flush_post_commit_hooks()- assert not content["productErrors"]+ assert not content["errors"]data = content["productVariant"]assert data["sku"] == skuvariant_id = data["id"]@@ -903,7 +902,7 @@ def test_create_variant_with_product_reference_attribute_no_references_given()content = get_graphql_content(response)["data"]["productVariantCreate"]flush_post_commit_hooks()- errors = content["productErrors"]+ errors = content["errors"]data = content["productVariant"]assert not data@@ -940,7 +939,7 @@ def test_create_product_variant_with_negative_weight()content = get_graphql_content(response)data = content["data"]["productVariantCreate"]- error = data["productErrors"][0]+ error = data["errors"][0]assert error["field"] == "weight"assert error["code"] == ProductErrorCode.INVALID.name@@ -966,7 +965,7 @@ def test_create_product_variant_without_attributes(# thencontent = get_graphql_content(response)data = content["data"]["productVariantCreate"]- error = data["productErrors"][0]+ error = data["errors"][0]assert error["field"] == "attributes"assert error["code"] == ProductErrorCode.REQUIRED.name@@ -993,8 +992,8 @@ def test_create_product_variant_not_all_attributes(query, variables, permissions=[permission_manage_products])content = get_graphql_content(response)- assert content["data"]["productVariantCreate"]["productErrors"]- assert content["data"]["productVariantCreate"]["productErrors"][0] == {+ assert content["data"]["productVariantCreate"]["errors"]+ assert content["data"]["productVariantCreate"]["errors"][0] == {"field": "attributes","code": ProductErrorCode.REQUIRED.name,"message": ANY,@@ -1028,8 +1027,8 @@ def test_create_product_variant_duplicated_attributes(query, variables, permissions=[permission_manage_products])content = get_graphql_content(response)- assert content["data"]["productVariantCreate"]["productErrors"]- assert content["data"]["productVariantCreate"]["productErrors"][0] == {+ assert content["data"]["productVariantCreate"]["errors"]+ assert content["data"]["productVariantCreate"]["errors"][0] == {"field": "attributes","code": ProductErrorCode.DUPLICATED_INPUT_ITEM.name,"message": ANY,@@ -1103,7 +1102,7 @@ def test_create_variant_invalid_variant_attributes(content = get_graphql_content(response)data = content["data"]["productVariantCreate"]- errors = data["productErrors"]+ errors = data["errors"]assert not data["productVariant"]assert len(errors) == 3@@ -1177,7 +1176,7 @@ def test_create_variant_with_rich_text_attribute(flush_post_commit_hooks()data = content["productVariant"]- assert not content["productErrors"]+ assert not content["errors"]assert data["name"] == skuassert data["sku"] == skuassert data["attributes"][-1]["values"][0]["richText"] == rich_text@@ -1287,7 +1286,6 @@ def test_update_product_variant(costPrice {currencyamount- localized}}}@@ -1339,7 +1337,7 @@ def test_update_product_variant_with_negative_weight(productVariant {name}- productErrors {+ errors {fieldmessagecode@@ -1356,7 +1354,7 @@ def test_update_product_variant_with_negative_weight(variant.refresh_from_db()content = get_graphql_content(response)data = content["data"]["productVariantUpdate"]- error = data["productErrors"][0]+ error = data["errors"][0]assert error["field"] == "weight"assert error["code"] == ProductErrorCode.INVALID.name@@ -1392,12 +1390,9 @@ QUERY_UPDATE_VARIANT_ATTRIBUTES = """}}errors {- field- message- }- productErrors {fieldcode+ message}}}@@ -1436,6 +1431,7 @@ def test_update_product_variant_not_all_attributes(assert content["data"]["productVariantUpdate"]["errors"][0] == {"field": "attributes","message": "All variant selection attributes must take a value.",+ "code": ProductErrorCode.REQUIRED.name,}assert not product.variants.filter(sku=sku).exists()@@ -1521,7 +1517,7 @@ def test_update_variant_with_rich_text_attribute(variant.refresh_from_db()data = content["productVariant"]- assert not content["productErrors"]+ assert not content["errors"]assert data["sku"] == skuassert data["attributes"][-1]["attribute"]["slug"] == rich_text_attribute.slugassert data["attributes"][-1]["values"][0]["richText"] == rich_text@@ -1658,9 +1654,10 @@ def test_update_product_variant_with_duplicated_attribute(content = get_graphql_content(response)data = content["data"]["productVariantUpdate"]- assert data["productErrors"][0] == {+ assert data["errors"][0] == {"field": "attributes","code": ProductErrorCode.DUPLICATED_INPUT_ITEM.name,+ "message": ANY,}@@ -1754,9 +1751,10 @@ def test_update_product_variant_with_duplicated_file_attribute(content = get_graphql_content(response)data = content["data"]["productVariantUpdate"]- assert data["productErrors"][0] == {+ assert data["errors"][0] == {"field": "attributes","code": ProductErrorCode.DUPLICATED_INPUT_ITEM.name,+ "message": ANY,}@@ -1986,7 +1984,7 @@ def test_update_product_variant_change_attribute_values_ordering(# thencontent = get_graphql_content(response)data = content["data"]["productVariantUpdate"]- assert data["productErrors"] == []+ assert data["errors"] == []attributes = data["productVariant"]["attributes"]@@ -2006,16 +2004,22 @@ def test_update_product_variant_change_attribute_values_ordering(@pytest.mark.parametrize(- "values, message",+ "values, message, code",(- ([], "Attribute expects a value but none were given"),- (["one", "two"], "Attribute must take only one value"),- ([" "], "Attribute values cannot be blank"),- ([None], "Attribute values cannot be blank"),+ ([], "Attribute expects a value but none were given", "REQUIRED"),+ (["one", "two"], "Attribute must take only one value", "INVALID"),+ ([" "], "Attribute values cannot be blank", "REQUIRED"),+ ([None], "Attribute values cannot be blank", "REQUIRED"),),)def test_update_product_variant_requires_values(- staff_api_client, variant, product_type, permission_manage_products, values, message+ staff_api_client,+ variant,+ product_type,+ permission_manage_products,+ values,+ message,+ code,):"""Ensures updating a variant with invalid values raise an error.@@ -2050,6 +2054,7 @@ def test_update_product_variant_requires_values(assert content["data"]["productVariantUpdate"]["errors"][0] == {"field": "attributes","message": message,+ "code": code,}assert not variant.product.variants.filter(sku=sku).exists()@@ -2067,7 +2072,7 @@ def test_update_product_variant_with_price_does_not_raise_price_validation_errorproductVariant {id}- productErrors {+ errors {fieldcode}@@ -2089,7 +2094,7 @@ def test_update_product_variant_with_price_does_not_raise_price_validation_error# then mutation passes without validation errorscontent = get_graphql_content(response)- assert not content["data"]["productVariantUpdate"]["productErrors"]+ assert not content["data"]["productVariantUpdate"]["errors"]DELETE_VARIANT_MUTATION = """@@ -2582,7 +2587,7 @@ PRODUCT_VARIANT_BULK_CREATE_MUTATION = """$variants: [ProductVariantBulkCreateInput]!, $productId: ID!) {productVariantBulkCreate(variants: $variants, product: $productId) {- bulkProductErrors {+ errors {fieldmessagecode@@ -2652,7 +2657,7 @@ def test_product_variant_bulk_create_by_attribute_id(flush_post_commit_hooks()data = content["data"]["productVariantBulkCreate"]- assert not data["bulkProductErrors"]+ assert not data["errors"]assert data["count"] == 1assert data["productVariants"][0]["name"] == attribute_value.nameassert product_variant_count + 1 == ProductVariant.objects.count()@@ -2696,7 +2701,7 @@ def test_product_variant_bulk_create_only_not_variant_selection_attributes()content = get_graphql_content(response)data = content["data"]["productVariantBulkCreate"]- assert not data["bulkProductErrors"]+ assert not data["errors"]assert data["count"] == 1assert data["productVariants"][0]["name"] == skuassert product_variant_count + 1 == ProductVariant.objects.count()@@ -2720,7 +2725,7 @@ def test_product_variant_bulk_create_empty_attribute()content = get_graphql_content(response)data = content["data"]["productVariantBulkCreate"]- assert not data["bulkProductErrors"]+ assert not data["errors"]assert data["count"] == 1assert product_variant_count + 1 == ProductVariant.objects.count()@@ -2751,7 +2756,7 @@ def test_product_variant_bulk_create_with_new_attribute_value()content = get_graphql_content(response)data = content["data"]["productVariantBulkCreate"]- assert not data["bulkProductErrors"]+ assert not data["errors"]assert data["count"] == 2assert product_variant_count + 2 == ProductVariant.objects.count()assert attribute_value_count + 1 == size_attribute.values.count()@@ -2792,7 +2797,7 @@ def test_product_variant_bulk_create_variant_selection_and_other_attributes()content = get_graphql_content(response)data = content["data"]["productVariantBulkCreate"]- assert not data["bulkProductErrors"]+ assert not data["errors"]assert data["count"] == 1assert product_variant_count + 1 == ProductVariant.objects.count()assert attribute_value_count == size_attribute.values.count()@@ -2849,7 +2854,7 @@ def test_product_variant_bulk_create_stocks_input()content = get_graphql_content(response)data = content["data"]["productVariantBulkCreate"]- assert not data["bulkProductErrors"]+ assert not data["errors"]assert data["count"] == 2assert product_variant_count + 2 == ProductVariant.objects.count()assert attribute_value_count + 1 == size_attribute.values.count()@@ -2923,7 +2928,7 @@ def test_product_variant_bulk_create_duplicated_warehouses()content = get_graphql_content(response)data = content["data"]["productVariantBulkCreate"]- errors = data["bulkProductErrors"]+ errors = data["errors"]assert not data["productVariants"]assert len(errors) == 1@@ -2989,7 +2994,7 @@ def test_product_variant_bulk_create_channel_listings_input()content = get_graphql_content(response)data = content["data"]["productVariantBulkCreate"]- assert not data["bulkProductErrors"]+ assert not data["errors"]assert data["count"] == 2assert product_variant_count + 2 == ProductVariant.objects.count()assert attribute_value_count + 1 == size_attribute.values.count()@@ -3084,8 +3089,8 @@ def test_product_variant_bulk_create_duplicated_channels()content = get_graphql_content(response)data = content["data"]["productVariantBulkCreate"]- assert len(data["bulkProductErrors"]) == 1- error = data["bulkProductErrors"][0]+ assert len(data["errors"]) == 1+ error = data["errors"][0]assert error["field"] == "channelListings"assert error["code"] == ProductErrorCode.DUPLICATED_INPUT_ITEM.nameassert error["index"] == 0@@ -3126,8 +3131,8 @@ def test_product_variant_bulk_create_too_many_decimal_places_in_price()content = get_graphql_content(response)data = content["data"]["productVariantBulkCreate"]- assert len(data["bulkProductErrors"]) == 4- errors = data["bulkProductErrors"]+ assert len(data["errors"]) == 4+ errors = data["errors"]assert errors[0]["field"] == "price"assert errors[0]["code"] == ProductErrorCode.INVALID.nameassert errors[0]["index"] == 0@@ -3178,8 +3183,8 @@ def test_product_variant_bulk_create_product_not_assigned_to_channel()content = get_graphql_content(response)data = content["data"]["productVariantBulkCreate"]- assert len(data["bulkProductErrors"]) == 1- error = data["bulkProductErrors"][0]+ assert len(data["errors"]) == 1+ error = data["errors"][0]assert error["field"] == "channelId"assert error["code"] == ProductErrorCode.PRODUCT_NOT_ASSIGNED_TO_CHANNEL.nameassert error["index"] == 0@@ -3218,8 +3223,8 @@ def test_product_variant_bulk_create_duplicated_sku()content = get_graphql_content(response)data = content["data"]["productVariantBulkCreate"]- assert len(data["bulkProductErrors"]) == 2- errors = data["bulkProductErrors"]+ assert len(data["errors"]) == 2+ errors = data["errors"]for index, error in enumerate(errors):assert error["field"] == "sku"assert error["code"] == ProductErrorCode.UNIQUE.name@@ -3252,8 +3257,8 @@ def test_product_variant_bulk_create_duplicated_sku_in_input()content = get_graphql_content(response)data = content["data"]["productVariantBulkCreate"]- assert len(data["bulkProductErrors"]) == 1- error = data["bulkProductErrors"][0]+ assert len(data["errors"]) == 1+ error = data["errors"][0]assert error["field"] == "sku"assert error["code"] == ProductErrorCode.UNIQUE.nameassert error["index"] == 1@@ -3297,8 +3302,8 @@ def test_product_variant_bulk_create_many_errors()content = get_graphql_content(response)data = content["data"]["productVariantBulkCreate"]- assert len(data["bulkProductErrors"]) == 2- errors = data["bulkProductErrors"]+ assert len(data["errors"]) == 2+ errors = data["errors"]expected_errors = [{"field": "sku",@@ -3350,8 +3355,8 @@ def test_product_variant_bulk_create_two_variants_duplicated_attribute_value()content = get_graphql_content(response)data = content["data"]["productVariantBulkCreate"]- assert len(data["bulkProductErrors"]) == 1- error = data["bulkProductErrors"][0]+ assert len(data["errors"]) == 1+ error = data["errors"][0]assert error["field"] == "attributes"assert error["code"] == ProductErrorCode.DUPLICATED_INPUT_ITEM.nameassert error["index"] == 0@@ -3385,8 +3390,8 @@ def test_product_variant_bulk_create_two_variants_duplicated_attribute_value_in_)content = get_graphql_content(response)data = content["data"]["productVariantBulkCreate"]- assert len(data["bulkProductErrors"]) == 1- error = data["bulkProductErrors"][0]+ assert len(data["errors"]) == 1+ error = data["errors"][0]assert error["field"] == "attributes"assert error["code"] == ProductErrorCode.DUPLICATED_INPUT_ITEM.nameassert error["index"] == 1@@ -3421,7 +3426,7 @@ def test_product_variant_bulk_create_two_variants_duplicated_one_attribute_value)content = get_graphql_content(response)data = content["data"]["productVariantBulkCreate"]- assert not data["bulkProductErrors"]+ assert not data["errors"]assert data["count"] == 1assert product_variant_count + 1 == ProductVariant.objects.count()@@ -3440,7 +3445,7 @@ VARIANT_STOCKS_CREATE_MUTATION = """}}}- bulkStockErrors{+ errors{codefieldmessage@@ -3491,7 +3496,7 @@ def test_variant_stocks_create("warehouse": {"slug": second_warehouse.slug},},]- assert not data["bulkStockErrors"]+ assert not data["errors"]assert len(data["productVariant"]["stocks"]) == len(stocks)result = []for stock in data["productVariant"]["stocks"]:@@ -3515,7 +3520,7 @@ def test_variant_stocks_create_empty_stock_input(content = get_graphql_content(response)data = content["data"]["productVariantStocksCreate"]- assert not data["bulkStockErrors"]+ assert not data["errors"]assert len(data["productVariant"]["stocks"]) == variant.stocks.count()assert data["productVariant"]["id"] == variant_id@@ -3549,7 +3554,7 @@ def test_variant_stocks_create_stock_already_exists()content = get_graphql_content(response)data = content["data"]["productVariantStocksCreate"]- errors = data["bulkStockErrors"]+ errors = data["errors"]assert errorsassert errors[0]["code"] == StockErrorCode.UNIQUE.name@@ -3584,7 +3589,7 @@ def test_variant_stocks_create_stock_duplicated_warehouse()content = get_graphql_content(response)data = content["data"]["productVariantStocksCreate"]- errors = data["bulkStockErrors"]+ errors = data["errors"]assert errorsassert errors[0]["code"] == StockErrorCode.UNIQUE.name@@ -3623,7 +3628,7 @@ def test_variant_stocks_create_stock_duplicated_warehouse_and_warehouse_already_)content = get_graphql_content(response)data = content["data"]["productVariantStocksCreate"]- errors = data["bulkStockErrors"]+ errors = data["errors"]assert len(errors) == 3assert {error["code"] for error in errors} == {@@ -3648,7 +3653,7 @@ VARIANT_STOCKS_UPDATE_MUTATIONS = """}}}- bulkStockErrors{+ errors{codefieldmessage@@ -3701,7 +3706,7 @@ def test_product_variant_stocks_update("warehouse": {"slug": second_warehouse.slug},},]- assert not data["bulkStockErrors"]+ assert not data["errors"]assert len(data["productVariant"]["stocks"]) == len(stocks)result = []for stock in data["productVariant"]["stocks"]:@@ -3725,7 +3730,7 @@ def test_product_variant_stocks_update_with_empty_stock_list(content = get_graphql_content(response)data = content["data"]["productVariantStocksUpdate"]- assert not data["bulkStockErrors"]+ assert not data["errors"]assert len(data["productVariant"]["stocks"]) == len(stocks)@@ -3762,7 +3767,7 @@ def test_variant_stocks_update_stock_duplicated_warehouse()content = get_graphql_content(response)data = content["data"]["productVariantStocksUpdate"]- errors = data["bulkStockErrors"]+ errors = data["errors"]assert errorsassert errors[0]["code"] == StockErrorCode.UNIQUE.namediff --git a/saleor/graphql/product/tests/test_variant_channel_listing_update.py b/saleor/graphql/product/tests/test_variant_channel_listing_update.pyindex 72e5daa511..ff92270fa9 100644--- a/saleor/graphql/product/tests/test_variant_channel_listing_update.py+++ b/saleor/graphql/product/tests/test_variant_channel_listing_update.py@@ -17,7 +17,7 @@ mutation UpdateProductVariantChannelListing($input: [ProductVariantChannelListingAddInput!]!) {productVariantChannelListingUpdate(id: $id, input: $input) {- productChannelListingErrors {+ errors {fieldmessagecode@@ -71,9 +71,7 @@ def test_variant_channel_listing_update_duplicated_channel(content = get_graphql_content(response)# then- errors = content["data"]["productVariantChannelListingUpdate"][- "productChannelListingErrors"- ]+ errors = content["data"]["productVariantChannelListingUpdate"]["errors"]assert len(errors) == 1assert errors[0]["field"] == "channelId"assert errors[0]["code"] == ProductErrorCode.DUPLICATED_INPUT_ITEM.name@@ -100,9 +98,7 @@ def test_variant_channel_listing_update_with_empty_input(content = get_graphql_content(response)# then- errors = content["data"]["productVariantChannelListingUpdate"][- "productChannelListingErrors"- ]+ errors = content["data"]["productVariantChannelListingUpdate"]["errors"]assert not errors@@ -127,9 +123,7 @@ def test_variant_channel_listing_update_not_assigned_channel(content = get_graphql_content(response)# then- errors = content["data"]["productVariantChannelListingUpdate"][- "productChannelListingErrors"- ]+ errors = content["data"]["productVariantChannelListingUpdate"]["errors"]assert len(errors) == 1assert errors[0]["field"] == "input"assert errors[0]["code"] == ProductErrorCode.PRODUCT_NOT_ASSIGNED_TO_CHANNEL.name@@ -179,9 +173,7 @@ def test_variant_channel_listing_update_with_too_many_decimal_places_in_price(content = get_graphql_content(response)# then- error = content["data"]["productVariantChannelListingUpdate"][- "productChannelListingErrors"- ][0]+ error = content["data"]["productVariantChannelListingUpdate"]["errors"][0]assert error["field"] == "price"assert error["code"] == ProductErrorCode.INVALID.name@@ -224,7 +216,7 @@ def test_variant_channel_listing_update_as_staff_user(# thendata = content["data"]["productVariantChannelListingUpdate"]variant_data = data["variant"]- assert not data["productChannelListingErrors"]+ assert not data["errors"]assert variant_data["id"] == variant_idassert variant_data["channelListings"][0]["price"]["currency"] == "USD"assert variant_data["channelListings"][0]["price"]["amount"] == price@@ -314,7 +306,7 @@ def test_variant_channel_listing_update_as_app(# thendata = content["data"]["productVariantChannelListingUpdate"]variant_data = data["variant"]- assert not data["productChannelListingErrors"]+ assert not data["errors"]assert variant_data["id"] == variant_idassert variant_data["channelListings"][0]["price"]["currency"] == "USD"assert variant_data["channelListings"][0]["price"]["amount"] == 1@@ -410,7 +402,7 @@ def test_product_variant_channel_listing_update_updates_discounted_price(content = get_graphql_content(response)data = content["data"]["productVariantChannelListingUpdate"]- assert data["productChannelListingErrors"] == []+ assert data["errors"] == []mock_update_product_discounted_price_task.delay.assert_called_once_with(product.pk)@@ -440,7 +432,7 @@ def test_product_variant_channel_listing_update_remove_cost_price(# thendata = content["data"]["productVariantChannelListingUpdate"]variant_data = data["variant"]- assert not data["productChannelListingErrors"]+ assert not data["errors"]assert variant_data["id"] == variant_idassert variant_data["channelListings"][0]["price"]["currency"] == "USD"assert variant_data["channelListings"][0]["price"]["amount"] == 1@@ -470,10 +462,8 @@ def test_product_channel_listing_update_too_many_decimal_places_in_cost_price(# thendata = content["data"]["productVariantChannelListingUpdate"]- assert data["productChannelListingErrors"][0]["field"] == "costPrice"- assert (- data["productChannelListingErrors"][0]["code"] == ProductErrorCode.INVALID.name- )+ assert data["errors"][0]["field"] == "costPrice"+ assert data["errors"][0]["code"] == ProductErrorCode.INVALID.namedef test_product_channel_listing_update_invalid_cost_price(diff --git a/saleor/graphql/product/types/products.py b/saleor/graphql/product/types/products.pyindex 39f5232622..0927691f73 100644--- a/saleor/graphql/product/types/products.py+++ b/saleor/graphql/product/types/products.py@@ -510,11 +510,6 @@ class Product(ChannelContextTypeWithMetadata, CountableDjangoObjectType):"Will be removed in Saleor 4.0. Use the `description` field instead."),)- url = graphene.String(- description="The storefront URL for the product.",- required=True,- deprecation_reason="This field will be removed after 2020-07-31.",- )thumbnail = graphene.Field(Image,description="The main thumbnail for a product.",@@ -938,6 +933,7 @@ class ProductType(CountableDjangoObjectType):),description="List of products of this type.",deprecation_reason=(+ "Will be removed in Saleor 4.0. ""Use the top-level `products` query with the `productTypes` filter."),)@@ -1136,10 +1132,6 @@ class Category(CountableDjangoObjectType):),description="List of products in the category.",)- url = graphene.String(- description="The storefront's URL for the category.",- deprecation_reason="This field will be removed after 2020-07-31.",- )children = PrefetchingConnectionField(lambda: Category, description="List of children of the category.")diff --git a/saleor/graphql/schema.graphql b/saleor/graphql/schema.graphqlindex 59779e4347..537d15587a 100644--- a/saleor/graphql/schema.graphql+++ b/saleor/graphql/schema.graphql@@ -4,29 +4,29 @@ schema {}type AccountAddressCreate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")user: User- accountErrors: [AccountError!]!+ accountErrors: [AccountError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [AccountError!]!address: Address}type AccountAddressDelete {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")user: User- accountErrors: [AccountError!]!+ accountErrors: [AccountError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [AccountError!]!address: Address}type AccountAddressUpdate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")user: User- accountErrors: [AccountError!]!+ accountErrors: [AccountError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [AccountError!]!address: Address}type AccountDelete {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- accountErrors: [AccountError!]!+ accountErrors: [AccountError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [AccountError!]!user: User}@@ -78,9 +78,9 @@ input AccountInput {}type AccountRegister {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")requiresConfirmation: Boolean- accountErrors: [AccountError!]!+ accountErrors: [AccountError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [AccountError!]!user: User}@@ -93,19 +93,19 @@ input AccountRegisterInput {}type AccountRequestDeletion {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- accountErrors: [AccountError!]!+ accountErrors: [AccountError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [AccountError!]!}type AccountSetDefaultAddress {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")user: User- accountErrors: [AccountError!]!+ accountErrors: [AccountError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [AccountError!]!}type AccountUpdate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- accountErrors: [AccountError!]!+ accountErrors: [AccountError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [AccountError!]!user: User}@@ -127,16 +127,16 @@ type Address implements Node {}type AddressCreate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")user: User- accountErrors: [AccountError!]!+ accountErrors: [AccountError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [AccountError!]!address: Address}type AddressDelete {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")user: User- accountErrors: [AccountError!]!+ accountErrors: [AccountError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [AccountError!]!address: Address}@@ -155,9 +155,9 @@ input AddressInput {}type AddressSetDefault {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")user: User- accountErrors: [AccountError!]!+ accountErrors: [AccountError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [AccountError!]!}enum AddressTypeEnum {@@ -166,9 +166,9 @@ enum AddressTypeEnum {}type AddressUpdate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")user: User- accountErrors: [AccountError!]!+ accountErrors: [AccountError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [AccountError!]!address: Address}@@ -221,8 +221,8 @@ type App implements Node & ObjectWithMetadata {}type AppActivate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- appErrors: [AppError!]!+ appErrors: [AppError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [AppError!]!app: App}@@ -238,27 +238,27 @@ type AppCountableEdge {}type AppCreate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")authToken: String- appErrors: [AppError!]!+ appErrors: [AppError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [AppError!]!app: App}type AppDeactivate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- appErrors: [AppError!]!+ appErrors: [AppError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [AppError!]!app: App}type AppDelete {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- appErrors: [AppError!]!+ appErrors: [AppError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [AppError!]!app: App}type AppDeleteFailedInstallation {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- appErrors: [AppError!]!+ appErrors: [AppError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [AppError!]!appInstallation: AppInstallation}@@ -286,9 +286,9 @@ enum AppErrorCode {}type AppFetchManifest {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")manifest: Manifest- appErrors: [AppError!]!+ appErrors: [AppError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [AppError!]!}input AppFilterInput {@@ -299,13 +299,12 @@ input AppFilterInput {input AppInput {name: String- isActive: Booleanpermissions: [PermissionEnum]}type AppInstall {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- appErrors: [AppError!]!+ appErrors: [AppError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [AppError!]!appInstallation: AppInstallation}@@ -327,8 +326,8 @@ type AppInstallation implements Node & Job {}type AppRetryInstall {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- appErrors: [AppError!]!+ appErrors: [AppError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [AppError!]!appInstallation: AppInstallation}@@ -349,15 +348,15 @@ type AppToken implements Node {}type AppTokenCreate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")authToken: String- appErrors: [AppError!]!+ appErrors: [AppError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [AppError!]!appToken: AppToken}type AppTokenDelete {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- appErrors: [AppError!]!+ appErrors: [AppError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [AppError!]!appToken: AppToken}@@ -367,9 +366,9 @@ input AppTokenInput {}type AppTokenVerify {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")valid: Boolean!- appErrors: [AppError!]!+ appErrors: [AppError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [AppError!]!}enum AppTypeEnum {@@ -378,15 +377,15 @@ enum AppTypeEnum {}type AppUpdate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- appErrors: [AppError!]!+ appErrors: [AppError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [AppError!]!app: App}type AssignNavigation {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")menu: Menu- menuErrors: [MenuError!]!+ menuErrors: [MenuError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [MenuError!]!}type Attribute implements Node & ObjectWithMetadata {@@ -411,9 +410,9 @@ type Attribute implements Node & ObjectWithMetadata {}type AttributeBulkDelete {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")count: Int!- attributeErrors: [AttributeError!]!+ attributeErrors: [AttributeError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [AttributeError!]!}type AttributeCountableConnection {@@ -428,9 +427,9 @@ type AttributeCountableEdge {}type AttributeCreate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")attribute: Attribute- attributeErrors: [AttributeError!]!+ attributeErrors: [AttributeError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [AttributeError!]!}input AttributeCreateInput {@@ -450,8 +449,8 @@ input AttributeCreateInput {}type AttributeDelete {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- attributeErrors: [AttributeError!]!+ attributeErrors: [AttributeError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [AttributeError!]!attribute: Attribute}@@ -493,7 +492,6 @@ input AttributeFilterInput {input AttributeInput {slug: String!- value: Stringvalues: [String]}@@ -506,9 +504,9 @@ enum AttributeInputTypeEnum {}type AttributeReorderValues {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")attribute: Attribute- attributeErrors: [AttributeError!]!+ attributeErrors: [AttributeError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [AttributeError!]!}enum AttributeSortField {@@ -536,8 +534,8 @@ type AttributeTranslatableContent implements Node {}type AttributeTranslate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- translationErrors: [TranslationError!]!+ translationErrors: [TranslationError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [TranslationError!]!attribute: Attribute}@@ -553,9 +551,9 @@ enum AttributeTypeEnum {}type AttributeUpdate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")attribute: Attribute- attributeErrors: [AttributeError!]!+ attributeErrors: [AttributeError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [AttributeError!]!}input AttributeUpdateInput {@@ -585,15 +583,15 @@ type AttributeValue implements Node {}type AttributeValueBulkDelete {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")count: Int!- attributeErrors: [AttributeError!]!+ attributeErrors: [AttributeError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [AttributeError!]!}type AttributeValueCreate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")attribute: Attribute- attributeErrors: [AttributeError!]!+ attributeErrors: [AttributeError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [AttributeError!]!attributeValue: AttributeValue}@@ -604,9 +602,9 @@ input AttributeValueCreateInput {}type AttributeValueDelete {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")attribute: Attribute- attributeErrors: [AttributeError!]!+ attributeErrors: [AttributeError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [AttributeError!]!attributeValue: AttributeValue}@@ -627,8 +625,8 @@ type AttributeValueTranslatableContent implements Node {}type AttributeValueTranslate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- translationErrors: [TranslationError!]!+ translationErrors: [TranslationError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [TranslationError!]!attributeValue: AttributeValue}@@ -645,9 +643,9 @@ input AttributeValueTranslationInput {}type AttributeValueUpdate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")attribute: Attribute- attributeErrors: [AttributeError!]!+ attributeErrors: [AttributeError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [AttributeError!]!attributeValue: AttributeValue}@@ -696,16 +694,15 @@ type Category implements Node & ObjectWithMetadata {descriptionJson: JSONString @deprecated(reason: "Will be removed in Saleor 4.0. Use the `description` field instead.")ancestors(before: String, after: String, first: Int, last: Int): CategoryCountableConnectionproducts(channel: String, before: String, after: String, first: Int, last: Int): ProductCountableConnection- url: String @deprecated(reason: "This field will be removed after 2020-07-31.")children(before: String, after: String, first: Int, last: Int): CategoryCountableConnectionbackgroundImage(size: Int): Imagetranslation(languageCode: LanguageCodeEnum!): CategoryTranslation}type CategoryBulkDelete {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")count: Int!- productErrors: [ProductError!]!+ productErrors: [ProductError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [ProductError!]!}type CategoryCountableConnection {@@ -720,14 +717,14 @@ type CategoryCountableEdge {}type CategoryCreate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- productErrors: [ProductError!]!+ productErrors: [ProductError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [ProductError!]!category: Category}type CategoryDelete {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- productErrors: [ProductError!]!+ productErrors: [ProductError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [ProductError!]!category: Category}@@ -770,8 +767,8 @@ type CategoryTranslatableContent implements Node {}type CategoryTranslate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- translationErrors: [TranslationError!]!+ translationErrors: [TranslationError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [TranslationError!]!category: Category}@@ -786,8 +783,8 @@ type CategoryTranslation implements Node {}type CategoryUpdate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- productErrors: [ProductError!]!+ productErrors: [ProductError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [ProductError!]!category: Category}@@ -802,14 +799,14 @@ type Channel implements Node {}type ChannelActivate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")channel: Channel- channelErrors: [ChannelError!]!+ channelErrors: [ChannelError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [ChannelError!]!}type ChannelCreate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- channelErrors: [ChannelError!]!+ channelErrors: [ChannelError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [ChannelError!]!channel: Channel}@@ -822,14 +819,14 @@ input ChannelCreateInput {}type ChannelDeactivate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")channel: Channel- channelErrors: [ChannelError!]!+ channelErrors: [ChannelError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [ChannelError!]!}type ChannelDelete {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- channelErrors: [ChannelError!]!+ channelErrors: [ChannelError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [ChannelError!]!channel: Channel}@@ -858,8 +855,8 @@ enum ChannelErrorCode {}type ChannelUpdate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- channelErrors: [ChannelError!]!+ channelErrors: [ChannelError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [ChannelError!]!channel: Channel}@@ -902,23 +899,23 @@ type Checkout implements Node & ObjectWithMetadata {}type CheckoutAddPromoCode {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")checkout: Checkout- checkoutErrors: [CheckoutError!]!+ checkoutErrors: [CheckoutError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [CheckoutError!]!}type CheckoutBillingAddressUpdate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")checkout: Checkout- checkoutErrors: [CheckoutError!]!+ checkoutErrors: [CheckoutError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [CheckoutError!]!}type CheckoutComplete {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")order: OrderconfirmationNeeded: Boolean!confirmationData: JSONString- checkoutErrors: [CheckoutError!]!+ checkoutErrors: [CheckoutError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [CheckoutError!]!}type CheckoutCountableConnection {@@ -933,9 +930,9 @@ type CheckoutCountableEdge {}type CheckoutCreate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")created: Boolean- checkoutErrors: [CheckoutError!]!+ checkoutErrors: [CheckoutError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [CheckoutError!]!checkout: Checkout}@@ -949,21 +946,21 @@ input CheckoutCreateInput {}type CheckoutCustomerAttach {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")checkout: Checkout- checkoutErrors: [CheckoutError!]!+ checkoutErrors: [CheckoutError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [CheckoutError!]!}type CheckoutCustomerDetach {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")checkout: Checkout- checkoutErrors: [CheckoutError!]!+ checkoutErrors: [CheckoutError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [CheckoutError!]!}type CheckoutEmailUpdate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")checkout: Checkout- checkoutErrors: [CheckoutError!]!+ checkoutErrors: [CheckoutError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [CheckoutError!]!}type CheckoutError {@@ -1000,9 +997,9 @@ enum CheckoutErrorCode {}type CheckoutLanguageCodeUpdate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")checkout: Checkout- checkoutErrors: [CheckoutError!]!+ checkoutErrors: [CheckoutError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [CheckoutError!]!}type CheckoutLine implements Node {@@ -1025,9 +1022,9 @@ type CheckoutLineCountableEdge {}type CheckoutLineDelete {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")checkout: Checkout- checkoutErrors: [CheckoutError!]!+ checkoutErrors: [CheckoutError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [CheckoutError!]!}input CheckoutLineInput {@@ -1036,40 +1033,40 @@ input CheckoutLineInput {}type CheckoutLinesAdd {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")checkout: Checkout- checkoutErrors: [CheckoutError!]!+ checkoutErrors: [CheckoutError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [CheckoutError!]!}type CheckoutLinesUpdate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")checkout: Checkout- checkoutErrors: [CheckoutError!]!+ checkoutErrors: [CheckoutError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [CheckoutError!]!}type CheckoutPaymentCreate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")checkout: Checkoutpayment: Payment- paymentErrors: [PaymentError!]!+ paymentErrors: [PaymentError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [PaymentError!]!}type CheckoutRemovePromoCode {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")checkout: Checkout- checkoutErrors: [CheckoutError!]!+ checkoutErrors: [CheckoutError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [CheckoutError!]!}type CheckoutShippingAddressUpdate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")checkout: Checkout- checkoutErrors: [CheckoutError!]!+ checkoutErrors: [CheckoutError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [CheckoutError!]!}type CheckoutShippingMethodUpdate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")checkout: Checkout- checkoutErrors: [CheckoutError!]!+ checkoutErrors: [CheckoutError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [CheckoutError!]!}type ChoiceValue {@@ -1094,15 +1091,15 @@ type Collection implements Node & ObjectWithMetadata {}type CollectionAddProducts {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")collection: Collection- collectionErrors: [CollectionError!]!+ collectionErrors: [CollectionError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [CollectionError!]!}type CollectionBulkDelete {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")count: Int!- collectionErrors: [CollectionError!]!+ collectionErrors: [CollectionError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [CollectionError!]!}type CollectionChannelListing implements Node {@@ -1122,9 +1119,9 @@ type CollectionChannelListingError {}type CollectionChannelListingUpdate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")collection: Collection- collectionChannelListingErrors: [CollectionChannelListingError!]!+ collectionChannelListingErrors: [CollectionChannelListingError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [CollectionChannelListingError!]!}input CollectionChannelListingUpdateInput {@@ -1144,8 +1141,8 @@ type CollectionCountableEdge {}type CollectionCreate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- collectionErrors: [CollectionError!]!+ collectionErrors: [CollectionError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [CollectionError!]!collection: Collection}@@ -1162,8 +1159,8 @@ input CollectionCreateInput {}type CollectionDelete {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- collectionErrors: [CollectionError!]!+ collectionErrors: [CollectionError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [CollectionError!]!collection: Collection}@@ -1209,15 +1206,15 @@ enum CollectionPublished {}type CollectionRemoveProducts {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")collection: Collection- collectionErrors: [CollectionError!]!+ collectionErrors: [CollectionError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [CollectionError!]!}type CollectionReorderProducts {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")collection: Collection- collectionErrors: [CollectionError!]!+ collectionErrors: [CollectionError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [CollectionError!]!}enum CollectionSortField {@@ -1245,8 +1242,8 @@ type CollectionTranslatableContent implements Node {}type CollectionTranslate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- translationErrors: [TranslationError!]!+ translationErrors: [TranslationError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [TranslationError!]!collection: Collection}@@ -1261,8 +1258,8 @@ type CollectionTranslation implements Node {}type CollectionUpdate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- collectionErrors: [CollectionError!]!+ collectionErrors: [CollectionError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [CollectionError!]!collection: Collection}@@ -1289,15 +1286,15 @@ enum ConfigurationTypeFieldEnum {}type ConfirmAccount {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")user: User- accountErrors: [AccountError!]!+ accountErrors: [AccountError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [AccountError!]!}type ConfirmEmailChange {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")user: User- accountErrors: [AccountError!]!+ accountErrors: [AccountError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [AccountError!]!}enum CountryCode {@@ -1560,12 +1557,12 @@ type CountryDisplay {}type CreateToken {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")token: StringrefreshToken: StringcsrfToken: Stringuser: User- accountErrors: [AccountError!]!+ accountErrors: [AccountError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [AccountError!]!}type CreditCard {@@ -1577,20 +1574,20 @@ type CreditCard {}type CustomerBulkDelete {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")count: Int!- accountErrors: [AccountError!]!+ accountErrors: [AccountError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [AccountError!]!}type CustomerCreate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- accountErrors: [AccountError!]!+ accountErrors: [AccountError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [AccountError!]!user: User}type CustomerDelete {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- accountErrors: [AccountError!]!+ accountErrors: [AccountError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [AccountError!]!user: User}@@ -1640,8 +1637,8 @@ input CustomerInput {}type CustomerUpdate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- accountErrors: [AccountError!]!+ accountErrors: [AccountError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [AccountError!]!user: User}@@ -1660,19 +1657,19 @@ input DateTimeRangeInput {}type DeactivateAllUserTokens {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- accountErrors: [AccountError!]!+ accountErrors: [AccountError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [AccountError!]!}type DeleteMetadata {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- metadataErrors: [MetadataError!]!+ metadataErrors: [MetadataError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [MetadataError!]!item: ObjectWithMetadata}type DeletePrivateMetadata {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- metadataErrors: [MetadataError!]!+ metadataErrors: [MetadataError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [MetadataError!]!item: ObjectWithMetadata}@@ -1701,16 +1698,16 @@ type DigitalContentCountableEdge {}type DigitalContentCreate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")variant: ProductVariantcontent: DigitalContent- productErrors: [ProductError!]!+ productErrors: [ProductError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [ProductError!]!}type DigitalContentDelete {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")variant: ProductVariant- productErrors: [ProductError!]!+ productErrors: [ProductError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [ProductError!]!}input DigitalContentInput {@@ -1721,10 +1718,10 @@ input DigitalContentInput {}type DigitalContentUpdate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")variant: ProductVariantcontent: DigitalContent- productErrors: [ProductError!]!+ productErrors: [ProductError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [ProductError!]!}input DigitalContentUploadInput {@@ -1745,8 +1742,8 @@ type DigitalContentUrl implements Node {}type DigitalContentUrlCreate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- productErrors: [ProductError!]!+ productErrors: [ProductError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [ProductError!]!digitalContentUrl: DigitalContentUrl}@@ -1791,20 +1788,20 @@ type Domain {}type DraftOrderBulkDelete {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")count: Int!- orderErrors: [OrderError!]!+ orderErrors: [OrderError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [OrderError!]!}type DraftOrderComplete {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")order: Order- orderErrors: [OrderError!]!+ orderErrors: [OrderError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [OrderError!]!}type DraftOrderCreate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- orderErrors: [OrderError!]!+ orderErrors: [OrderError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [OrderError!]!order: Order}@@ -1823,8 +1820,8 @@ input DraftOrderCreateInput {}type DraftOrderDelete {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- orderErrors: [OrderError!]!+ orderErrors: [OrderError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [OrderError!]!order: Order}@@ -1842,22 +1839,17 @@ input DraftOrderInput {}type DraftOrderLinesBulkDelete {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")count: Int!- orderErrors: [OrderError!]!+ orderErrors: [OrderError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [OrderError!]!}type DraftOrderUpdate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- orderErrors: [OrderError!]!+ orderErrors: [OrderError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [OrderError!]!order: Order}-type Error {- field: String- message: String-}-type ExportError {field: Stringmessage: String@@ -1938,9 +1930,9 @@ input ExportInfoInput {}type ExportProducts {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")exportFile: ExportFile- exportErrors: [ExportError!]!+ exportErrors: [ExportError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [ExportError!]!}input ExportProductsInput {@@ -1963,41 +1955,41 @@ type ExternalAuthentication {}type ExternalAuthenticationUrl {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")authenticationData: JSONString- accountErrors: [AccountError!]!+ accountErrors: [AccountError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [AccountError!]!}type ExternalLogout {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")logoutData: JSONString- accountErrors: [AccountError!]!+ accountErrors: [AccountError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [AccountError!]!}type ExternalObtainAccessTokens {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")token: StringrefreshToken: StringcsrfToken: Stringuser: User- accountErrors: [AccountError!]!+ accountErrors: [AccountError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [AccountError!]!}type ExternalRefresh {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")token: StringrefreshToken: StringcsrfToken: Stringuser: User- accountErrors: [AccountError!]!+ accountErrors: [AccountError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [AccountError!]!}type ExternalVerify {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")user: UserisValid: Boolean!verifyData: JSONString- accountErrors: [AccountError!]!+ accountErrors: [AccountError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [AccountError!]!}type File {@@ -2011,9 +2003,9 @@ enum FileTypesEnum {}type FileUpload {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")uploadedFile: File- uploadErrors: [UploadError!]!+ uploadErrors: [UploadError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [UploadError!]!}type Fulfillment implements Node & ObjectWithMetadata {@@ -2030,10 +2022,10 @@ type Fulfillment implements Node & ObjectWithMetadata {}type FulfillmentCancel {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")fulfillment: Fulfillmentorder: Order- orderErrors: [OrderError!]!+ orderErrors: [OrderError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [OrderError!]!}input FulfillmentCancelInput {@@ -2047,19 +2039,19 @@ type FulfillmentLine implements Node {}type FulfillmentRefundProducts {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")fulfillment: Fulfillmentorder: Order- orderErrors: [OrderError!]!+ orderErrors: [OrderError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [OrderError!]!}type FulfillmentReturnProducts {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")returnFulfillment: FulfillmentreplaceFulfillment: Fulfillmentorder: OrderreplaceOrder: Order- orderErrors: [OrderError!]!+ orderErrors: [OrderError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [OrderError!]!}enum FulfillmentStatus {@@ -2072,10 +2064,10 @@ enum FulfillmentStatus {}type FulfillmentUpdateTracking {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")fulfillment: Fulfillmentorder: Order- orderErrors: [OrderError!]!+ orderErrors: [OrderError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [OrderError!]!}input FulfillmentUpdateTrackingInput {@@ -2105,9 +2097,9 @@ type GiftCard implements Node {}type GiftCardActivate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")giftCard: GiftCard- giftCardErrors: [GiftCardError!]!+ giftCardErrors: [GiftCardError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [GiftCardError!]!}type GiftCardCountableConnection {@@ -2122,8 +2114,8 @@ type GiftCardCountableEdge {}type GiftCardCreate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- giftCardErrors: [GiftCardError!]!+ giftCardErrors: [GiftCardError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [GiftCardError!]!giftCard: GiftCard}@@ -2136,9 +2128,9 @@ input GiftCardCreateInput {}type GiftCardDeactivate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")giftCard: GiftCard- giftCardErrors: [GiftCardError!]!+ giftCardErrors: [GiftCardError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [GiftCardError!]!}type GiftCardError {@@ -2157,8 +2149,8 @@ enum GiftCardErrorCode {}type GiftCardUpdate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- giftCardErrors: [GiftCardError!]!+ giftCardErrors: [GiftCardError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [GiftCardError!]!giftCard: GiftCard}@@ -2212,8 +2204,8 @@ type Invoice implements ObjectWithMetadata & Job & Node {}type InvoiceCreate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- invoiceErrors: [InvoiceError!]!+ invoiceErrors: [InvoiceError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [InvoiceError!]!invoice: Invoice}@@ -2223,8 +2215,8 @@ input InvoiceCreateInput {}type InvoiceDelete {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- invoiceErrors: [InvoiceError!]!+ invoiceErrors: [InvoiceError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [InvoiceError!]!invoice: Invoice}@@ -2245,27 +2237,27 @@ enum InvoiceErrorCode {}type InvoiceRequest {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")order: Order- invoiceErrors: [InvoiceError!]!+ invoiceErrors: [InvoiceError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [InvoiceError!]!invoice: Invoice}type InvoiceRequestDelete {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- invoiceErrors: [InvoiceError!]!+ invoiceErrors: [InvoiceError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [InvoiceError!]!invoice: Invoice}type InvoiceSendNotification {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- invoiceErrors: [InvoiceError!]!+ invoiceErrors: [InvoiceError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [InvoiceError!]!invoice: Invoice}type InvoiceUpdate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- invoiceErrors: [InvoiceError!]!+ invoiceErrors: [InvoiceError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [InvoiceError!]!invoice: Invoice}@@ -2385,9 +2377,9 @@ type Menu implements Node & ObjectWithMetadata {}type MenuBulkDelete {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")count: Int!- menuErrors: [MenuError!]!+ menuErrors: [MenuError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [MenuError!]!}type MenuCountableConnection {@@ -2402,8 +2394,8 @@ type MenuCountableEdge {}type MenuCreate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- menuErrors: [MenuError!]!+ menuErrors: [MenuError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [MenuError!]!menu: Menu}@@ -2414,8 +2406,8 @@ input MenuCreateInput {}type MenuDelete {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- menuErrors: [MenuError!]!+ menuErrors: [MenuError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [MenuError!]!menu: Menu}@@ -2465,9 +2457,9 @@ type MenuItem implements Node & ObjectWithMetadata {}type MenuItemBulkDelete {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")count: Int!- menuErrors: [MenuError!]!+ menuErrors: [MenuError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [MenuError!]!}type MenuItemCountableConnection {@@ -2482,8 +2474,8 @@ type MenuItemCountableEdge {}type MenuItemCreate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- menuErrors: [MenuError!]!+ menuErrors: [MenuError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [MenuError!]!menuItem: MenuItem}@@ -2498,8 +2490,8 @@ input MenuItemCreateInput {}type MenuItemDelete {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- menuErrors: [MenuError!]!+ menuErrors: [MenuError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [MenuError!]!menuItem: MenuItem}@@ -2517,9 +2509,9 @@ input MenuItemInput {}type MenuItemMove {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")menu: Menu- menuErrors: [MenuError!]!+ menuErrors: [MenuError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [MenuError!]!}input MenuItemMoveInput {@@ -2541,8 +2533,8 @@ type MenuItemTranslatableContent implements Node {}type MenuItemTranslate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- translationErrors: [TranslationError!]!+ translationErrors: [TranslationError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [TranslationError!]!menuItem: MenuItem}@@ -2553,8 +2545,8 @@ type MenuItemTranslation implements Node {}type MenuItemUpdate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- menuErrors: [MenuError!]!+ menuErrors: [MenuError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [MenuError!]!menuItem: MenuItem}@@ -2573,8 +2565,8 @@ input MenuSortingInput {}type MenuUpdate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- menuErrors: [MenuError!]!+ menuErrors: [MenuError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [MenuError!]!menu: Menu}@@ -2604,7 +2596,6 @@ type MetadataItem {type Money {currency: String!amount: Float!- localized: String! @deprecated(reason: "Price formatting according to the current locale should be handled by the frontend client. This field will be removed after 2020-07-31.")}type MoneyRange {@@ -2794,7 +2785,7 @@ type Mutation {checkoutBillingAddressUpdate(billingAddress: AddressInput!, checkoutId: ID!): CheckoutBillingAddressUpdatecheckoutComplete(checkoutId: ID!, paymentData: JSONString, redirectUrl: String, storeSource: Boolean = false): CheckoutCompletecheckoutCreate(input: CheckoutCreateInput!): CheckoutCreate- checkoutCustomerAttach(checkoutId: ID!, customerId: ID): CheckoutCustomerAttach+ checkoutCustomerAttach(checkoutId: ID!): CheckoutCustomerAttachcheckoutCustomerDetach(checkoutId: ID!): CheckoutCustomerDetachcheckoutEmailUpdate(checkoutId: ID, email: String!): CheckoutEmailUpdatecheckoutLineDelete(checkoutId: ID!, lineId: ID): CheckoutLineDelete@@ -2880,11 +2871,6 @@ input NameTranslationInput {name: String}-type Navigation {- main: Menu- secondary: Menu-}-enum NavigationType {MAINSECONDARY@@ -2958,10 +2944,10 @@ enum OrderAction {}type OrderAddNote {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")order: Orderevent: OrderEvent- orderErrors: [OrderError!]!+ orderErrors: [OrderError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [OrderError!]!}input OrderAddNoteInput {@@ -2969,27 +2955,27 @@ input OrderAddNoteInput {}type OrderBulkCancel {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")count: Int!- orderErrors: [OrderError!]!+ orderErrors: [OrderError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [OrderError!]!}type OrderCancel {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")order: Order- orderErrors: [OrderError!]!+ orderErrors: [OrderError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [OrderError!]!}type OrderCapture {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")order: Order- orderErrors: [OrderError!]!+ orderErrors: [OrderError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [OrderError!]!}type OrderConfirm {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")order: Order- orderErrors: [OrderError!]!+ orderErrors: [OrderError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [OrderError!]!}type OrderCountableConnection {@@ -3020,9 +3006,9 @@ type OrderDiscount implements Node {}type OrderDiscountAdd {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")order: Order- orderErrors: [OrderError!]!+ orderErrors: [OrderError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [OrderError!]!}input OrderDiscountCommonInput {@@ -3032,9 +3018,9 @@ input OrderDiscountCommonInput {}type OrderDiscountDelete {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")order: Order- orderErrors: [OrderError!]!+ orderErrors: [OrderError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [OrderError!]!}enum OrderDiscountType {@@ -3043,9 +3029,9 @@ enum OrderDiscountType {}type OrderDiscountUpdate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")order: Order- orderErrors: [OrderError!]!+ orderErrors: [OrderError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [OrderError!]!}input OrderDraftFilterInput {@@ -3215,10 +3201,10 @@ input OrderFilterInput {}type OrderFulfill {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")fulfillments: [Fulfillment]order: Order- orderErrors: [OrderError!]!+ orderErrors: [OrderError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [OrderError!]!}input OrderFulfillInput {@@ -3266,24 +3252,24 @@ input OrderLineCreateInput {}type OrderLineDelete {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")order: OrderorderLine: OrderLine- orderErrors: [OrderError!]!+ orderErrors: [OrderError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [OrderError!]!}type OrderLineDiscountRemove {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")orderLine: OrderLineorder: Order- orderErrors: [OrderError!]!+ orderErrors: [OrderError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [OrderError!]!}type OrderLineDiscountUpdate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")orderLine: OrderLineorder: Order- orderErrors: [OrderError!]!+ orderErrors: [OrderError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [OrderError!]!}input OrderLineInput {@@ -3291,29 +3277,29 @@ input OrderLineInput {}type OrderLineUpdate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")order: Order- orderErrors: [OrderError!]!+ orderErrors: [OrderError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [OrderError!]!orderLine: OrderLine}type OrderLinesCreate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")order: OrderorderLines: [OrderLine!]- orderErrors: [OrderError!]!+ orderErrors: [OrderError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [OrderError!]!}type OrderMarkAsPaid {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")order: Order- orderErrors: [OrderError!]!+ orderErrors: [OrderError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [OrderError!]!}type OrderRefund {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")order: Order- orderErrors: [OrderError!]!+ orderErrors: [OrderError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [OrderError!]!}input OrderRefundFulfillmentLineInput {@@ -3368,9 +3354,9 @@ enum OrderSettingsErrorCode {}type OrderSettingsUpdate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")orderSettings: OrderSettings- orderSettingsErrors: [OrderSettingsError!]!+ orderSettingsErrors: [OrderSettingsError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [OrderSettingsError!]!}input OrderSettingsUpdateInput {@@ -3412,8 +3398,8 @@ enum OrderStatusFilter {}type OrderUpdate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- orderErrors: [OrderError!]!+ orderErrors: [OrderError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [OrderError!]!order: Order}@@ -3424,9 +3410,9 @@ input OrderUpdateInput {}type OrderUpdateShipping {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")order: Order- orderErrors: [OrderError!]!+ orderErrors: [OrderError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [OrderError!]!}input OrderUpdateShippingInput {@@ -3434,9 +3420,9 @@ input OrderUpdateShippingInput {}type OrderVoid {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")order: Order- orderErrors: [OrderError!]!+ orderErrors: [OrderError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [OrderError!]!}type Page implements Node & ObjectWithMetadata {@@ -3458,27 +3444,27 @@ type Page implements Node & ObjectWithMetadata {}type PageAttributeAssign {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")pageType: PageType- pageErrors: [PageError!]!+ pageErrors: [PageError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [PageError!]!}type PageAttributeUnassign {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")pageType: PageType- pageErrors: [PageError!]!+ pageErrors: [PageError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [PageError!]!}type PageBulkDelete {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")count: Int!- pageErrors: [PageError!]!+ pageErrors: [PageError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [PageError!]!}type PageBulkPublish {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")count: Int!- pageErrors: [PageError!]!+ pageErrors: [PageError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [PageError!]!}type PageCountableConnection {@@ -3493,8 +3479,8 @@ type PageCountableEdge {}type PageCreate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- pageErrors: [PageError!]!+ pageErrors: [PageError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [PageError!]!page: Page}@@ -3510,8 +3496,8 @@ input PageCreateInput {}type PageDelete {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- pageErrors: [PageError!]!+ pageErrors: [PageError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [PageError!]!page: Page}@@ -3556,9 +3542,9 @@ input PageInput {}type PageReorderAttributeValues {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")page: Page- pageErrors: [PageError!]!+ pageErrors: [PageError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [PageError!]!}enum PageSortField {@@ -3586,8 +3572,8 @@ type PageTranslatableContent implements Node {}type PageTranslate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- translationErrors: [TranslationError!]!+ translationErrors: [TranslationError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [TranslationError!]!page: PageTranslatableContent}@@ -3620,9 +3606,9 @@ type PageType implements Node & ObjectWithMetadata {}type PageTypeBulkDelete {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")count: Int!- pageErrors: [PageError!]!+ pageErrors: [PageError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [PageError!]!}type PageTypeCountableConnection {@@ -3637,8 +3623,8 @@ type PageTypeCountableEdge {}type PageTypeCreate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- pageErrors: [PageError!]!+ pageErrors: [PageError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [PageError!]!pageType: PageType}@@ -3649,8 +3635,8 @@ input PageTypeCreateInput {}type PageTypeDelete {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- pageErrors: [PageError!]!+ pageErrors: [PageError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [PageError!]!pageType: PageType}@@ -3659,9 +3645,9 @@ input PageTypeFilterInput {}type PageTypeReorderAttributes {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")pageType: PageType- pageErrors: [PageError!]!+ pageErrors: [PageError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [PageError!]!}enum PageTypeSortField {@@ -3675,8 +3661,8 @@ input PageTypeSortingInput {}type PageTypeUpdate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- pageErrors: [PageError!]!+ pageErrors: [PageError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [PageError!]!pageType: PageType}@@ -3688,15 +3674,15 @@ input PageTypeUpdateInput {}type PageUpdate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- pageErrors: [PageError!]!+ pageErrors: [PageError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [PageError!]!page: Page}type PasswordChange {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")user: User- accountErrors: [AccountError!]!+ accountErrors: [AccountError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [AccountError!]!}type Payment implements Node {@@ -3721,9 +3707,9 @@ type Payment implements Node {}type PaymentCapture {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")payment: Payment- paymentErrors: [PaymentError!]!+ paymentErrors: [PaymentError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [PaymentError!]!}enum PaymentChargeStatusEnum {@@ -3781,9 +3767,9 @@ type PaymentGateway {}type PaymentInitialize {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")initializedPayment: PaymentInitialized- paymentErrors: [PaymentError!]!+ paymentErrors: [PaymentError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [PaymentError!]!}type PaymentInitialized {@@ -3800,9 +3786,9 @@ input PaymentInput {}type PaymentRefund {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")payment: Payment- paymentErrors: [PaymentError!]!+ paymentErrors: [PaymentError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [PaymentError!]!}type PaymentSource {@@ -3811,9 +3797,9 @@ type PaymentSource {}type PaymentVoid {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")payment: Payment- paymentErrors: [PaymentError!]!+ paymentErrors: [PaymentError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [PaymentError!]!}type Permission {@@ -3842,8 +3828,8 @@ enum PermissionEnum {}type PermissionGroupCreate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- permissionGroupErrors: [PermissionGroupError!]!+ permissionGroupErrors: [PermissionGroupError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [PermissionGroupError!]!group: Group}@@ -3854,8 +3840,8 @@ input PermissionGroupCreateInput {}type PermissionGroupDelete {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- permissionGroupErrors: [PermissionGroupError!]!+ permissionGroupErrors: [PermissionGroupError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [PermissionGroupError!]!group: Group}@@ -3892,8 +3878,8 @@ input PermissionGroupSortingInput {}type PermissionGroupUpdate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- permissionGroupErrors: [PermissionGroupError!]!+ permissionGroupErrors: [PermissionGroupError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [PermissionGroupError!]!group: Group}@@ -3955,9 +3941,9 @@ input PluginSortingInput {}type PluginUpdate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")plugin: Plugin- pluginsErrors: [PluginError!]!+ pluginsErrors: [PluginError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [PluginError!]!}input PluginUpdateInput {@@ -3994,7 +3980,6 @@ type Product implements Node & ObjectWithMetadata {privateMetadata: [MetadataItem]!metadata: [MetadataItem]!descriptionJson: JSONString @deprecated(reason: "Will be removed in Saleor 4.0. Use the `description` field instead.")- url: String! @deprecated(reason: "This field will be removed after 2020-07-31.")thumbnail(size: Int): Imagepricing(address: AddressInput): ProductPricingInfoisAvailable(address: AddressInput): Boolean@@ -4013,9 +3998,9 @@ type Product implements Node & ObjectWithMetadata {}type ProductAttributeAssign {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")productType: ProductType- productErrors: [ProductError!]!+ productErrors: [ProductError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [ProductError!]!}input ProductAttributeAssignInput {@@ -4029,15 +4014,15 @@ enum ProductAttributeType {}type ProductAttributeUnassign {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")productType: ProductType- productErrors: [ProductError!]!+ productErrors: [ProductError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [ProductError!]!}type ProductBulkDelete {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")count: Int!- productErrors: [ProductError!]!+ productErrors: [ProductError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [ProductError!]!}type ProductChannelListing implements Node {@@ -4076,9 +4061,9 @@ type ProductChannelListingError {}type ProductChannelListingUpdate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")product: Product- productChannelListingErrors: [ProductChannelListingError!]!+ productChannelListingErrors: [ProductChannelListingError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [ProductChannelListingError!]!}input ProductChannelListingUpdateInput {@@ -4098,8 +4083,8 @@ type ProductCountableEdge {}type ProductCreate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- productErrors: [ProductError!]!+ productErrors: [ProductError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [ProductError!]!product: Product}@@ -4119,8 +4104,8 @@ input ProductCreateInput {}type ProductDelete {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- productErrors: [ProductError!]!+ productErrors: [ProductError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [ProductError!]!product: Product}@@ -4173,7 +4158,6 @@ input ProductFilterInput {hasCategory: Booleanattributes: [AttributeInput]stockAvailability: StockAvailability- productType: IDstocks: ProductStockFilterInputsearch: Stringmetadata: [MetadataInput]@@ -4215,16 +4199,16 @@ type ProductMedia implements Node {}type ProductMediaBulkDelete {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")count: Int!- productErrors: [ProductError!]!+ productErrors: [ProductError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [ProductError!]!}type ProductMediaCreate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")product: Productmedia: ProductMedia- productErrors: [ProductError!]!+ productErrors: [ProductError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [ProductError!]!}input ProductMediaCreateInput {@@ -4235,17 +4219,17 @@ input ProductMediaCreateInput {}type ProductMediaDelete {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")product: Productmedia: ProductMedia- productErrors: [ProductError!]!+ productErrors: [ProductError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [ProductError!]!}type ProductMediaReorder {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")product: Productmedia: [ProductMedia!]- productErrors: [ProductError!]!+ productErrors: [ProductError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [ProductError!]!}enum ProductMediaType {@@ -4254,10 +4238,10 @@ enum ProductMediaType {}type ProductMediaUpdate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")product: Productmedia: ProductMedia- productErrors: [ProductError!]!+ productErrors: [ProductError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [ProductError!]!}input ProductMediaUpdateInput {@@ -4294,9 +4278,9 @@ type ProductPricingInfo {}type ProductReorderAttributeValues {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")product: Product- productErrors: [ProductError!]!+ productErrors: [ProductError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [ProductError!]!}input ProductStockFilterInput {@@ -4316,8 +4300,8 @@ type ProductTranslatableContent implements Node {}type ProductTranslate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- translationErrors: [TranslationError!]!+ translationErrors: [TranslationError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [TranslationError!]!product: Product}@@ -4341,7 +4325,7 @@ type ProductType implements Node & ObjectWithMetadata {weight: WeightprivateMetadata: [MetadataItem]!metadata: [MetadataItem]!- products(channel: String, before: String, after: String, first: Int, last: Int): ProductCountableConnection @deprecated(reason: "Use the top-level `products` query with the `productTypes` filter.")+ products(channel: String, before: String, after: String, first: Int, last: Int): ProductCountableConnection @deprecated(reason: "Will be removed in Saleor 4.0. Use the top-level `products` query with the `productTypes` filter.")taxType: TaxTypevariantAttributes(variantSelection: VariantAttributeScope): [Attribute]productAttributes: [Attribute]@@ -4349,9 +4333,9 @@ type ProductType implements Node & ObjectWithMetadata {}type ProductTypeBulkDelete {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")count: Int!- productErrors: [ProductError!]!+ productErrors: [ProductError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [ProductError!]!}enum ProductTypeConfigurable {@@ -4371,14 +4355,14 @@ type ProductTypeCountableEdge {}type ProductTypeCreate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- productErrors: [ProductError!]!+ productErrors: [ProductError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [ProductError!]!productType: ProductType}type ProductTypeDelete {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- productErrors: [ProductError!]!+ productErrors: [ProductError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [ProductError!]!productType: ProductType}@@ -4408,9 +4392,9 @@ input ProductTypeInput {}type ProductTypeReorderAttributes {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")productType: ProductType- productErrors: [ProductError!]!+ productErrors: [ProductError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [ProductError!]!}enum ProductTypeSortField {@@ -4425,14 +4409,14 @@ input ProductTypeSortingInput {}type ProductTypeUpdate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- productErrors: [ProductError!]!+ productErrors: [ProductError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [ProductError!]!productType: ProductType}type ProductUpdate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- productErrors: [ProductError!]!+ productErrors: [ProductError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [ProductError!]!product: Product}@@ -4461,10 +4445,10 @@ type ProductVariant implements Node & ObjectWithMetadata {}type ProductVariantBulkCreate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")count: Int!productVariants: [ProductVariant!]!- bulkProductErrors: [BulkProductError!]!+ bulkProductErrors: [BulkProductError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [BulkProductError!]!}input ProductVariantBulkCreateInput {@@ -4477,9 +4461,9 @@ input ProductVariantBulkCreateInput {}type ProductVariantBulkDelete {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")count: Int!- productErrors: [ProductError!]!+ productErrors: [ProductError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [ProductError!]!}type ProductVariantChannelListing implements Node {@@ -4497,9 +4481,9 @@ input ProductVariantChannelListingAddInput {}type ProductVariantChannelListingUpdate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")variant: ProductVariant- productChannelListingErrors: [ProductChannelListingError!]!+ productChannelListingErrors: [ProductChannelListingError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [ProductChannelListingError!]!}type ProductVariantCountableConnection {@@ -4514,8 +4498,8 @@ type ProductVariantCountableEdge {}type ProductVariantCreate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- productErrors: [ProductError!]!+ productErrors: [ProductError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [ProductError!]!productVariant: ProductVariant}@@ -4529,8 +4513,8 @@ input ProductVariantCreateInput {}type ProductVariantDelete {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- productErrors: [ProductError!]!+ productErrors: [ProductError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [ProductError!]!productVariant: ProductVariant}@@ -4548,39 +4532,39 @@ input ProductVariantInput {}type ProductVariantReorder {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")product: Product- productErrors: [ProductError!]!+ productErrors: [ProductError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [ProductError!]!}type ProductVariantReorderAttributeValues {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")productVariant: ProductVariant- productErrors: [ProductError!]!+ productErrors: [ProductError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [ProductError!]!}type ProductVariantSetDefault {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")product: Product- productErrors: [ProductError!]!+ productErrors: [ProductError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [ProductError!]!}type ProductVariantStocksCreate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")productVariant: ProductVariant- bulkStockErrors: [BulkStockError!]!+ bulkStockErrors: [BulkStockError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [BulkStockError!]!}type ProductVariantStocksDelete {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")productVariant: ProductVariant- stockErrors: [StockError!]!+ stockErrors: [StockError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [StockError!]!}type ProductVariantStocksUpdate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")productVariant: ProductVariant- bulkStockErrors: [BulkStockError!]!+ bulkStockErrors: [BulkStockError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [BulkStockError!]!}type ProductVariantTranslatableContent implements Node {@@ -4591,8 +4575,8 @@ type ProductVariantTranslatableContent implements Node {}type ProductVariantTranslate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- translationErrors: [TranslationError!]!+ translationErrors: [TranslationError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [TranslationError!]!productVariant: ProductVariant}@@ -4603,8 +4587,8 @@ type ProductVariantTranslation implements Node {}type ProductVariantUpdate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- productErrors: [ProductError!]!+ productErrors: [ProductError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [ProductError!]!productVariant: ProductVariant}@@ -4635,7 +4619,7 @@ type Query {collection(id: ID, slug: String, channel: String): Collectioncollections(filter: CollectionFilterInput, sortBy: CollectionSortingInput, channel: String, before: String, after: String, first: Int, last: Int): CollectionCountableConnectionproduct(id: ID, slug: String, channel: String): Product- products(filter: ProductFilterInput, sortBy: ProductOrder, stockAvailability: StockAvailability, channel: String, before: String, after: String, first: Int, last: Int): ProductCountableConnection+ products(filter: ProductFilterInput, sortBy: ProductOrder, channel: String, before: String, after: String, first: Int, last: Int): ProductCountableConnectionproductType(id: ID!): ProductTypeproductTypes(filter: ProductTypeFilterInput, sortBy: ProductTypeSortingInput, before: String, after: String, first: Int, last: Int): ProductTypeCountableConnectionproductVariant(id: ID, sku: String, channel: String): ProductVariant@@ -4649,8 +4633,8 @@ type Query {pageTypes(sortBy: PageTypeSortingInput, filter: PageTypeFilterInput, before: String, after: String, first: Int, last: Int): PageTypeCountableConnectionhomepageEvents(before: String, after: String, first: Int, last: Int): OrderEventCountableConnectionorder(id: ID!): Order- orders(sortBy: OrderSortingInput, filter: OrderFilterInput, created: ReportingPeriod, status: OrderStatusFilter, channel: String, before: String, after: String, first: Int, last: Int): OrderCountableConnection- draftOrders(sortBy: OrderSortingInput, filter: OrderDraftFilterInput, created: ReportingPeriod, before: String, after: String, first: Int, last: Int): OrderCountableConnection+ orders(sortBy: OrderSortingInput, filter: OrderFilterInput, channel: String, before: String, after: String, first: Int, last: Int): OrderCountableConnection+ draftOrders(sortBy: OrderSortingInput, filter: OrderDraftFilterInput, before: String, after: String, first: Int, last: Int): OrderCountableConnectionordersTotal(period: ReportingPeriod, channel: String): TaxedMoneyorderByToken(token: UUID!): Ordermenu(channel: String, id: ID, name: String, slug: String): Menu@@ -4697,10 +4681,10 @@ type ReducedRate {}type RefreshToken {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")token: Stringuser: User- accountErrors: [AccountError!]!+ accountErrors: [AccountError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [AccountError!]!}input ReorderInput {@@ -4714,14 +4698,14 @@ enum ReportingPeriod {}type RequestEmailChange {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")user: User- accountErrors: [AccountError!]!+ accountErrors: [AccountError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [AccountError!]!}type RequestPasswordReset {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- accountErrors: [AccountError!]!+ accountErrors: [AccountError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [AccountError!]!}type Sale implements Node {@@ -4740,15 +4724,15 @@ type Sale implements Node {}type SaleAddCatalogues {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")sale: Sale- discountErrors: [DiscountError!]!+ discountErrors: [DiscountError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [DiscountError!]!}type SaleBulkDelete {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")count: Int!- discountErrors: [DiscountError!]!+ discountErrors: [DiscountError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [DiscountError!]!}type SaleChannelListing implements Node {@@ -4769,9 +4753,9 @@ input SaleChannelListingInput {}type SaleChannelListingUpdate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")sale: Sale- discountErrors: [DiscountError!]!+ discountErrors: [DiscountError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [DiscountError!]!}type SaleCountableConnection {@@ -4786,14 +4770,14 @@ type SaleCountableEdge {}type SaleCreate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- discountErrors: [DiscountError!]!+ discountErrors: [DiscountError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [DiscountError!]!sale: Sale}type SaleDelete {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- discountErrors: [DiscountError!]!+ discountErrors: [DiscountError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [DiscountError!]!sale: Sale}@@ -4816,9 +4800,9 @@ input SaleInput {}type SaleRemoveCatalogues {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")sale: Sale- discountErrors: [DiscountError!]!+ discountErrors: [DiscountError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [DiscountError!]!}enum SaleSortField {@@ -4843,8 +4827,8 @@ type SaleTranslatableContent implements Node {}type SaleTranslate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- translationErrors: [TranslationError!]!+ translationErrors: [TranslationError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [TranslationError!]!sale: Sale}@@ -4860,8 +4844,8 @@ enum SaleType {}type SaleUpdate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- discountErrors: [DiscountError!]!+ discountErrors: [DiscountError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [DiscountError!]!sale: Sale}@@ -4876,12 +4860,12 @@ input SeoInput {}type SetPassword {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")token: StringrefreshToken: StringcsrfToken: Stringuser: User- accountErrors: [AccountError!]!+ accountErrors: [AccountError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [AccountError!]!}type ShippingError {@@ -4944,9 +4928,9 @@ input ShippingMethodChannelListingInput {}type ShippingMethodChannelListingUpdate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")shippingMethod: ShippingMethod- shippingErrors: [ShippingError!]!+ shippingErrors: [ShippingError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [ShippingError!]!}type ShippingMethodPostalCodeRule implements Node {@@ -4982,29 +4966,29 @@ input ShippingPostalCodeRulesCreateInputRange {}type ShippingPriceBulkDelete {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")count: Int!- shippingErrors: [ShippingError!]!+ shippingErrors: [ShippingError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [ShippingError!]!}type ShippingPriceCreate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")shippingZone: ShippingZoneshippingMethod: ShippingMethod- shippingErrors: [ShippingError!]!+ shippingErrors: [ShippingError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [ShippingError!]!}type ShippingPriceDelete {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")shippingMethod: ShippingMethodshippingZone: ShippingZone- shippingErrors: [ShippingError!]!+ shippingErrors: [ShippingError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [ShippingError!]!}type ShippingPriceExcludeProducts {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")shippingMethod: ShippingMethod- shippingErrors: [ShippingError!]!+ shippingErrors: [ShippingError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [ShippingError!]!}input ShippingPriceExcludeProductsInput {@@ -5026,14 +5010,14 @@ input ShippingPriceInput {}type ShippingPriceRemoveProductFromExclude {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")shippingMethod: ShippingMethod- shippingErrors: [ShippingError!]!+ shippingErrors: [ShippingError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [ShippingError!]!}type ShippingPriceTranslate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- translationErrors: [TranslationError!]!+ translationErrors: [TranslationError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [TranslationError!]!shippingMethod: ShippingMethod}@@ -5043,10 +5027,10 @@ input ShippingPriceTranslationInput {}type ShippingPriceUpdate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")shippingZone: ShippingZoneshippingMethod: ShippingMethod- shippingErrors: [ShippingError!]!+ shippingErrors: [ShippingError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [ShippingError!]!}type ShippingZone implements Node & ObjectWithMetadata {@@ -5064,9 +5048,9 @@ type ShippingZone implements Node & ObjectWithMetadata {}type ShippingZoneBulkDelete {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")count: Int!- shippingErrors: [ShippingError!]!+ shippingErrors: [ShippingError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [ShippingError!]!}type ShippingZoneCountableConnection {@@ -5081,8 +5065,8 @@ type ShippingZoneCountableEdge {}type ShippingZoneCreate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- shippingErrors: [ShippingError!]!+ shippingErrors: [ShippingError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [ShippingError!]!shippingZone: ShippingZone}@@ -5096,8 +5080,8 @@ input ShippingZoneCreateInput {}type ShippingZoneDelete {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- shippingErrors: [ShippingError!]!+ shippingErrors: [ShippingError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [ShippingError!]!shippingZone: ShippingZone}@@ -5106,8 +5090,8 @@ input ShippingZoneFilterInput {}type ShippingZoneUpdate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- shippingErrors: [ShippingError!]!+ shippingErrors: [ShippingError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [ShippingError!]!shippingZone: ShippingZone}@@ -5134,7 +5118,6 @@ type Shop {domain: Domain!languages: [LanguageDisplay]!name: String!- navigation: Navigation @deprecated(reason: "Fetch menus using the `menu` query with `slug` parameter.")permissions: [Permission]!phonePrefixes: [String]!headerText: String@@ -5155,15 +5138,15 @@ type Shop {}type ShopAddressUpdate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")shop: Shop- shopErrors: [ShopError!]!+ shopErrors: [ShopError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [ShopError!]!}type ShopDomainUpdate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")shop: Shop- shopErrors: [ShopError!]!+ shopErrors: [ShopError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [ShopError!]!}type ShopError {@@ -5183,9 +5166,9 @@ enum ShopErrorCode {}type ShopFetchTaxRates {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")shop: Shop- shopErrors: [ShopError!]!+ shopErrors: [ShopError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [ShopError!]!}input ShopSettingsInput {@@ -5205,9 +5188,9 @@ input ShopSettingsInput {}type ShopSettingsTranslate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")shop: Shop- translationErrors: [TranslationError!]!+ translationErrors: [TranslationError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [TranslationError!]!}input ShopSettingsTranslationInput {@@ -5216,9 +5199,9 @@ input ShopSettingsTranslationInput {}type ShopSettingsUpdate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")shop: Shop- shopErrors: [ShopError!]!+ shopErrors: [ShopError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [ShopError!]!}type ShopTranslation implements Node {@@ -5234,14 +5217,14 @@ input SiteDomainInput {}type StaffBulkDelete {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")count: Int!- staffErrors: [StaffError!]!+ staffErrors: [StaffError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [StaffError!]!}type StaffCreate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- staffErrors: [StaffError!]!+ staffErrors: [StaffError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [StaffError!]!user: User}@@ -5256,8 +5239,8 @@ input StaffCreateInput {}type StaffDelete {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- staffErrors: [StaffError!]!+ staffErrors: [StaffError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [StaffError!]!user: User}@@ -5283,14 +5266,14 @@ type StaffNotificationRecipient implements Node {}type StaffNotificationRecipientCreate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- shopErrors: [ShopError!]!+ shopErrors: [ShopError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [ShopError!]!staffNotificationRecipient: StaffNotificationRecipient}type StaffNotificationRecipientDelete {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- shopErrors: [ShopError!]!+ shopErrors: [ShopError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [ShopError!]!staffNotificationRecipient: StaffNotificationRecipient}@@ -5301,14 +5284,14 @@ input StaffNotificationRecipientInput {}type StaffNotificationRecipientUpdate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- shopErrors: [ShopError!]!+ shopErrors: [ShopError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [ShopError!]!staffNotificationRecipient: StaffNotificationRecipient}type StaffUpdate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- staffErrors: [StaffError!]!+ staffErrors: [StaffError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [StaffError!]!user: User}@@ -5500,14 +5483,14 @@ input UpdateInvoiceInput {}type UpdateMetadata {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- metadataErrors: [MetadataError!]!+ metadataErrors: [MetadataError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [MetadataError!]!item: ObjectWithMetadata}type UpdatePrivateMetadata {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- metadataErrors: [MetadataError!]!+ metadataErrors: [MetadataError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [MetadataError!]!item: ObjectWithMetadata}@@ -5538,11 +5521,10 @@ type User implements Node & ObjectWithMetadata {privateMetadata: [MetadataItem]!metadata: [MetadataItem]!addresses: [Address]- checkout: Checkout @deprecated(reason: "Use the `checkout_tokens` field to fetch the user checkouts.")+ checkout: Checkout @deprecated(reason: "Will be removed in Saleor 4.0. Use the `checkout_tokens` field to fetch the user checkouts.")checkoutTokens(channel: String): [UUID!]giftCards(before: String, after: String, first: Int, last: Int): GiftCardCountableConnectionorders(before: String, after: String, first: Int, last: Int): OrderCountableConnection- permissions: [Permission] @deprecated(reason: "Will be removed in Saleor 2.11.Use the `userPermissions` instead.")userPermissions: [UserPermission]permissionGroups: [Group]editableGroups: [Group]@@ -5553,21 +5535,21 @@ type User implements Node & ObjectWithMetadata {}type UserAvatarDelete {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")user: User- accountErrors: [AccountError!]!+ accountErrors: [AccountError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [AccountError!]!}type UserAvatarUpdate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")user: User- accountErrors: [AccountError!]!+ accountErrors: [AccountError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [AccountError!]!}type UserBulkSetActive {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")count: Int!- accountErrors: [AccountError!]!+ accountErrors: [AccountError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [AccountError!]!}type UserCountableConnection {@@ -5624,17 +5606,17 @@ enum VariantAttributeScope {}type VariantMediaAssign {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")productVariant: ProductVariantmedia: ProductMedia- productErrors: [ProductError!]!+ productErrors: [ProductError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [ProductError!]!}type VariantMediaUnassign {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")productVariant: ProductVariantmedia: ProductMedia- productErrors: [ProductError!]!+ productErrors: [ProductError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [ProductError!]!}type VariantPricingInfo {@@ -5647,11 +5629,11 @@ type VariantPricingInfo {}type VerifyToken {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")user: UserisValid: Boolean!payload: GenericScalar- accountErrors: [AccountError!]!+ accountErrors: [AccountError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [AccountError!]!}type Voucher implements Node {@@ -5679,15 +5661,15 @@ type Voucher implements Node {}type VoucherAddCatalogues {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")voucher: Voucher- discountErrors: [DiscountError!]!+ discountErrors: [DiscountError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [DiscountError!]!}type VoucherBulkDelete {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")count: Int!- discountErrors: [DiscountError!]!+ discountErrors: [DiscountError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [DiscountError!]!}type VoucherChannelListing implements Node {@@ -5710,9 +5692,9 @@ input VoucherChannelListingInput {}type VoucherChannelListingUpdate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")voucher: Voucher- discountErrors: [DiscountError!]!+ discountErrors: [DiscountError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [DiscountError!]!}type VoucherCountableConnection {@@ -5727,14 +5709,14 @@ type VoucherCountableEdge {}type VoucherCreate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- discountErrors: [DiscountError!]!+ discountErrors: [DiscountError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [DiscountError!]!voucher: Voucher}type VoucherDelete {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- discountErrors: [DiscountError!]!+ discountErrors: [DiscountError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [DiscountError!]!voucher: Voucher}@@ -5770,9 +5752,9 @@ input VoucherInput {}type VoucherRemoveCatalogues {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")voucher: Voucher- discountErrors: [DiscountError!]!+ discountErrors: [DiscountError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [DiscountError!]!}enum VoucherSortField {@@ -5799,8 +5781,8 @@ type VoucherTranslatableContent implements Node {}type VoucherTranslate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- translationErrors: [TranslationError!]!+ translationErrors: [TranslationError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [TranslationError!]!voucher: Voucher}@@ -5817,8 +5799,8 @@ enum VoucherTypeEnum {}type VoucherUpdate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- discountErrors: [DiscountError!]!+ discountErrors: [DiscountError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [DiscountError!]!voucher: Voucher}@@ -5857,8 +5839,8 @@ type WarehouseCountableEdge {}type WarehouseCreate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- warehouseErrors: [WarehouseError!]!+ warehouseErrors: [WarehouseError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [WarehouseError!]!warehouse: Warehouse}@@ -5872,8 +5854,8 @@ input WarehouseCreateInput {}type WarehouseDelete {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- warehouseErrors: [WarehouseError!]!+ warehouseErrors: [WarehouseError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [WarehouseError!]!warehouse: Warehouse}@@ -5898,14 +5880,14 @@ input WarehouseFilterInput {}type WarehouseShippingZoneAssign {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- warehouseErrors: [WarehouseError!]!+ warehouseErrors: [WarehouseError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [WarehouseError!]!warehouse: Warehouse}type WarehouseShippingZoneUnassign {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- warehouseErrors: [WarehouseError!]!+ warehouseErrors: [WarehouseError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [WarehouseError!]!warehouse: Warehouse}@@ -5919,8 +5901,8 @@ input WarehouseSortingInput {}type WarehouseUpdate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- warehouseErrors: [WarehouseError!]!+ warehouseErrors: [WarehouseError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [WarehouseError!]!warehouse: Warehouse}@@ -5943,8 +5925,8 @@ type Webhook implements Node {}type WebhookCreate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- webhookErrors: [WebhookError!]!+ webhookErrors: [WebhookError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [WebhookError!]!webhook: Webhook}@@ -5958,8 +5940,8 @@ input WebhookCreateInput {}type WebhookDelete {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- webhookErrors: [WebhookError!]!+ webhookErrors: [WebhookError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [WebhookError!]!webhook: Webhook}@@ -6038,8 +6020,8 @@ enum WebhookSampleEventTypeEnum {}type WebhookUpdate {- errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")- webhookErrors: [WebhookError!]!+ webhookErrors: [WebhookError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.")+ errors: [WebhookError!]!webhook: Webhook}diff --git a/saleor/graphql/shipping/tests/benchmark/test_shipping_methods.py b/saleor/graphql/shipping/tests/benchmark/test_shipping_methods.pyindex 635f5d5192..b400245c06 100644--- a/saleor/graphql/shipping/tests/benchmark/test_shipping_methods.py+++ b/saleor/graphql/shipping/tests/benchmark/test_shipping_methods.py@@ -92,7 +92,7 @@ EXCLUDE_PRODUCTS_MUTATION = """shippingPriceExcludeProducts(id: $idinput: $input) {- shippingErrors {+ errors {fieldcode}@@ -190,7 +190,7 @@ REMOVE_PRODUCTS_FROM_EXCLUDED_PRODUCTS_MUTATION = """shippingPriceRemoveProductFromExclude(id: $idproducts: $products) {- shippingErrors {+ errors {fieldcode}diff --git a/saleor/graphql/shipping/tests/test_shipping_method.py b/saleor/graphql/shipping/tests/test_shipping_method.pyindex 5c95037741..6edfdd4c25 100644--- a/saleor/graphql/shipping/tests/test_shipping_method.py+++ b/saleor/graphql/shipping/tests/test_shipping_method.py@@ -30,7 +30,7 @@ CREATE_SHIPPING_ZONE_QUERY = """addChannels: $addChannels}) {- shippingErrors {+ errors {fieldcodemessage@@ -73,7 +73,7 @@ def test_create_shipping_zone(content = get_graphql_content(response)data = content["data"]["shippingZoneCreate"]zone = data["shippingZone"]- assert not data["shippingErrors"]+ assert not data["errors"]assert zone["name"] == "test shipping"assert zone["description"] == "test description"assert zone["countries"] == [{"code": "PL"}]@@ -97,7 +97,7 @@ def test_create_shipping_zone_with_empty_warehouses()content = get_graphql_content(response)data = content["data"]["shippingZoneCreate"]- assert not data["shippingErrors"]+ assert not data["errors"]zone = data["shippingZone"]assert zone["name"] == "test shipping"assert zone["countries"] == [{"code": "PL"}]@@ -117,7 +117,7 @@ def test_create_shipping_zone_without_warehouses_and_channels()content = get_graphql_content(response)data = content["data"]["shippingZoneCreate"]- assert not data["shippingErrors"]+ assert not data["errors"]zone = data["shippingZone"]assert zone["name"] == "test shipping"assert zone["countries"] == [{"code": "PL"}]@@ -141,7 +141,7 @@ def test_create_default_shipping_zone()content = get_graphql_content(response)data = content["data"]["shippingZoneCreate"]- assert not data["shippingErrors"]+ assert not data["errors"]zone = data["shippingZone"]assert zone["name"] == "test shipping"assert zone["warehouses"][0]["name"] == warehouse.name@@ -167,9 +167,9 @@ def test_create_duplicated_default_shipping_zone()content = get_graphql_content(response)data = content["data"]["shippingZoneCreate"]- assert data["shippingErrors"]- assert data["shippingErrors"][0]["field"] == "default"- assert data["shippingErrors"][0]["code"] == ShippingErrorCode.ALREADY_EXISTS.name+ assert data["errors"]+ assert data["errors"][0]["field"] == "default"+ assert data["errors"][0]["code"] == ShippingErrorCode.ALREADY_EXISTS.nameUPDATE_SHIPPING_ZONE_QUERY = """@@ -208,7 +208,7 @@ UPDATE_SHIPPING_ZONE_QUERY = """id}}- shippingErrors {+ errors {fieldcodewarehouses@@ -236,7 +236,7 @@ def test_update_shipping_zone()content = get_graphql_content(response)data = content["data"]["shippingZoneUpdate"]- assert not data["shippingErrors"]+ assert not data["errors"]data = content["data"]["shippingZoneUpdate"]["shippingZone"]assert data["name"] == nameassert data["description"] == description@@ -258,8 +258,8 @@ def test_update_shipping_zone_default_exists()content = get_graphql_content(response)data = content["data"]["shippingZoneUpdate"]- assert data["shippingErrors"][0]["field"] == "default"- assert data["shippingErrors"][0]["code"] == ShippingErrorCode.ALREADY_EXISTS.name+ assert data["errors"][0]["field"] == "default"+ assert data["errors"][0]["code"] == ShippingErrorCode.ALREADY_EXISTS.namedef test_update_shipping_zone_add_warehouses(@@ -285,7 +285,7 @@ def test_update_shipping_zone_add_warehouses()content = get_graphql_content(response)data = content["data"]["shippingZoneUpdate"]- assert not data["shippingErrors"]+ assert not data["errors"]data = content["data"]["shippingZoneUpdate"]["shippingZone"]for response_warehouse in data["warehouses"]:assert response_warehouse["name"] in warehouse_names@@ -313,7 +313,7 @@ def test_update_shipping_zone_add_second_warehouses()content = get_graphql_content(response)data = content["data"]["shippingZoneUpdate"]- assert not data["shippingErrors"]+ assert not data["errors"]data = content["data"]["shippingZoneUpdate"]["shippingZone"]assert data["warehouses"][1]["slug"] == warehouse.slugassert data["warehouses"][0]["slug"] == warehouse_no_shipping_zone.slug@@ -337,7 +337,7 @@ def test_update_shipping_zone_remove_warehouses()content = get_graphql_content(response)data = content["data"]["shippingZoneUpdate"]- assert not data["shippingErrors"]+ assert not data["errors"]data = content["data"]["shippingZoneUpdate"]["shippingZone"]assert not data["warehouses"]@@ -362,7 +362,7 @@ def test_update_shipping_zone_remove_one_warehouses()content = get_graphql_content(response)data = content["data"]["shippingZoneUpdate"]- assert not data["shippingErrors"]+ assert not data["errors"]data = content["data"]["shippingZoneUpdate"]["shippingZone"]assert data["warehouses"][0]["name"] == warehouses[1].nameassert len(data["warehouses"]) == 1@@ -393,7 +393,7 @@ def test_update_shipping_zone_replace_warehouse()content = get_graphql_content(response)data = content["data"]["shippingZoneUpdate"]- assert not data["shippingErrors"]+ assert not data["errors"]data = content["data"]["shippingZoneUpdate"]["shippingZone"]assert data["warehouses"][0]["name"] == warehouse_no_shipping_zone.nameassert len(data["warehouses"]) == 1@@ -418,13 +418,10 @@ def test_update_shipping_zone_same_warehouse_id_in_add_and_remove()content = get_graphql_content(response)data = content["data"]["shippingZoneUpdate"]- assert data["shippingErrors"]- assert data["shippingErrors"][0]["field"] == "warehouses"- assert (- data["shippingErrors"][0]["code"]- == ShippingErrorCode.DUPLICATED_INPUT_ITEM.name- )- assert data["shippingErrors"][0]["warehouses"][0] == warehouse_id+ assert data["errors"]+ assert data["errors"][0]["field"] == "warehouses"+ assert data["errors"][0]["code"] == ShippingErrorCode.DUPLICATED_INPUT_ITEM.name+ assert data["errors"][0]["warehouses"][0] == warehouse_iddef test_update_shipping_zone_add_channels(@@ -450,7 +447,7 @@ def test_update_shipping_zone_add_channels()content = get_graphql_content(response)data = content["data"]["shippingZoneUpdate"]- assert not data["shippingErrors"]+ assert not data["errors"]data = content["data"]["shippingZoneUpdate"]["shippingZone"]assert len(data["channels"]) == len(channel_ids)assert {channel["id"] for channel in data["channels"]} == set(channel_ids)@@ -490,7 +487,7 @@ def test_update_shipping_zone_remove_channels()content = get_graphql_content(response)data = content["data"]["shippingZoneUpdate"]- assert not data["shippingErrors"]+ assert not data["errors"]data = content["data"]["shippingZoneUpdate"]["shippingZone"]assert len(data["channels"]) == 1assert data["channels"][0]["id"] == graphene.Node.to_global_id(@@ -527,7 +524,7 @@ def test_update_shipping_zone_add_and_remove_channels()content = get_graphql_content(response)data = content["data"]["shippingZoneUpdate"]- assert not data["shippingErrors"]+ assert not data["errors"]data = content["data"]["shippingZoneUpdate"]["shippingZone"]assert len(data["channels"]) == 1assert data["channels"][0]["id"] == add_channel_id@@ -556,7 +553,7 @@ def test_update_shipping_zone_same_channel_id_in_add_and_remove_list()content = get_graphql_content(response)data = content["data"]["shippingZoneUpdate"]- assert not data["shippingErrors"]+ assert not data["errors"]data = content["data"]["shippingZoneUpdate"]["shippingZone"]assert len(data["channels"]) == 1assert data["channels"][0]["id"] == add_channel_id@@ -607,7 +604,7 @@ PRICE_BASED_SHIPPING_QUERY = """deletePostalCodeRules: $deletePostalCodeRules,inclusionType: $inclusionType, description: $description}) {- shippingErrors {+ errors {fieldcode}@@ -676,7 +673,7 @@ def test_create_shipping_method()content = get_graphql_content(response)data = content["data"]["shippingPriceCreate"]- errors = data["shippingErrors"]+ errors = data["errors"]assert not errorsassert data["shippingMethod"]["name"] == nameassert data["shippingMethod"]["description"] == description@@ -708,7 +705,7 @@ def test_create_shipping_method_minimum_delivery_days_higher_than_maximum()content = get_graphql_content(response)data = content["data"]["shippingPriceCreate"]- errors = data["shippingErrors"]+ errors = data["errors"]assert not data["shippingMethod"]assert len(errors) == 1assert errors[0]["code"] == ShippingErrorCode.INVALID.name@@ -736,7 +733,7 @@ def test_create_shipping_method_minimum_delivery_days_below_0()content = get_graphql_content(response)data = content["data"]["shippingPriceCreate"]- errors = data["shippingErrors"]+ errors = data["errors"]assert not data["shippingMethod"]assert len(errors) == 1assert errors[0]["code"] == ShippingErrorCode.INVALID.name@@ -764,7 +761,7 @@ def test_create_shipping_method_maximum_delivery_days_below_0()content = get_graphql_content(response)data = content["data"]["shippingPriceCreate"]- errors = data["shippingErrors"]+ errors = data["errors"]assert not data["shippingMethod"]assert len(errors) == 1assert errors[0]["code"] == ShippingErrorCode.INVALID.name@@ -798,7 +795,7 @@ def test_create_shipping_method_postal_code_duplicate_entry()content = get_graphql_content(response)data = content["data"]["shippingPriceCreate"]- errors = data["shippingErrors"]+ errors = data["errors"]assert not data["shippingMethod"]assert len(errors) == 1assert errors[0]["code"] == ShippingErrorCode.ALREADY_EXISTS.name@@ -830,7 +827,7 @@ def test_create_shipping_method_postal_code_missing_inclusion_type()content = get_graphql_content(response)data = content["data"]["shippingPriceCreate"]- errors = data["shippingErrors"]+ errors = data["errors"]assert not data["shippingMethod"]assert len(errors) == 1assert errors[0]["code"] == ShippingErrorCode.REQUIRED.name@@ -852,7 +849,7 @@ WEIGHT_BASED_SHIPPING_QUERY = """maximumOrderWeight: $maximumOrderWeight,type: $type}) {- shippingErrors {+ errors {fieldcode}@@ -929,7 +926,7 @@ def test_create_weight_shipping_method_errors()content = get_graphql_content(response)data = content["data"]["shippingPriceCreate"]- assert data["shippingErrors"][0]["code"] == ShippingErrorCode.MAX_LESS_THAN_MIN.name+ assert data["errors"][0]["code"] == ShippingErrorCode.MAX_LESS_THAN_MIN.namedef test_create_shipping_method_with_negative_min_weight(@@ -947,7 +944,7 @@ def test_create_shipping_method_with_negative_min_weight()content = get_graphql_content(response)data = content["data"]["shippingPriceCreate"]- error = data["shippingErrors"][0]+ error = data["errors"][0]assert error["field"] == "minimumOrderWeight"assert error["code"] == ShippingErrorCode.INVALID.name@@ -967,7 +964,7 @@ def test_create_shipping_method_with_negative_max_weight()content = get_graphql_content(response)data = content["data"]["shippingPriceCreate"]- error = data["shippingErrors"][0]+ error = data["errors"][0]assert error["field"] == "maximumOrderWeight"assert error["code"] == ShippingErrorCode.INVALID.name@@ -999,7 +996,7 @@ UPDATE_SHIPPING_PRICE_MUTATION = """deletePostalCodeRules: $deletePostalCodeRules,inclusionType: $inclusionType,}) {- shippingErrors {+ errors {fieldcode}@@ -1118,7 +1115,7 @@ def test_update_shipping_method_minimum_delivery_days_higher_than_maximum()content = get_graphql_content(response)data = content["data"]["shippingPriceUpdate"]- errors = data["shippingErrors"]+ errors = data["errors"]assert not data["shippingMethod"]assert len(errors) == 1assert errors[0]["code"] == ShippingErrorCode.INVALID.name@@ -1151,7 +1148,7 @@ def test_update_shipping_method_minimum_delivery_days_below_0()content = get_graphql_content(response)data = content["data"]["shippingPriceUpdate"]- errors = data["shippingErrors"]+ errors = data["errors"]assert not data["shippingMethod"]assert len(errors) == 1assert errors[0]["code"] == ShippingErrorCode.INVALID.name@@ -1184,7 +1181,7 @@ def test_update_shipping_method_maximum_delivery_days_below_0()content = get_graphql_content(response)data = content["data"]["shippingPriceUpdate"]- errors = data["shippingErrors"]+ errors = data["errors"]assert not data["shippingMethod"]assert len(errors) == 1assert errors[0]["code"] == ShippingErrorCode.INVALID.name@@ -1217,7 +1214,7 @@ def test_update_shipping_method_minimum_delivery_days_higher_than_max_from_insta)content = get_graphql_content(response)data = content["data"]["shippingPriceUpdate"]- errors = data["shippingErrors"]+ errors = data["errors"]assert not data["shippingMethod"]assert len(errors) == 1assert errors[0]["code"] == ShippingErrorCode.INVALID.name@@ -1250,7 +1247,7 @@ def test_update_shipping_method_maximum_delivery_days_lower_than_min_from_instan)content = get_graphql_content(response)data = content["data"]["shippingPriceUpdate"]- errors = data["shippingErrors"]+ errors = data["errors"]assert not data["shippingMethod"]assert len(errors) == 1assert errors[0]["code"] == ShippingErrorCode.INVALID.name@@ -1285,7 +1282,7 @@ def test_update_shipping_method_multiple_errors()content = get_graphql_content(response)data = content["data"]["shippingPriceUpdate"]- errors = data["shippingErrors"]+ errors = data["errors"]assert not data["shippingMethod"]assert len(errors) == 3expected_errors = [@@ -1336,7 +1333,7 @@ def test_update_shipping_method_delivery_days_without_value(content = get_graphql_content(response)shipping_method.refresh_from_db()- assert not content["data"]["shippingPriceUpdate"]["shippingErrors"]+ assert not content["data"]["shippingPriceUpdate"]["errors"]assert shipping_method.minimum_delivery_days == min_delivery_daysassert shipping_method.maximum_delivery_days == max_delivery_days@@ -1381,7 +1378,7 @@ EXCLUDE_PRODUCTS_MUTATION = """shippingPriceExcludeProducts(id: $idinput: $input) {- shippingErrors {+ errors {fieldcode}@@ -1466,7 +1463,7 @@ REMOVE_PRODUCTS_FROM_EXCLUDED_PRODUCTS_MUTATION = """shippingPriceRemoveProductFromExclude(id: $idproducts: $products) {- shippingErrors {+ errors {fieldcode}diff --git a/saleor/graphql/shipping/tests/test_shipping_method_channel_listing_update.py b/saleor/graphql/shipping/tests/test_shipping_method_channel_listing_update.pyindex c882c9d4b5..929e17eb39 100644--- a/saleor/graphql/shipping/tests/test_shipping_method_channel_listing_update.py+++ b/saleor/graphql/shipping/tests/test_shipping_method_channel_listing_update.py@@ -13,7 +13,7 @@ mutation UpdateShippingMethodChannelListing($input: ShippingMethodChannelListingInput!) {shippingMethodChannelListingUpdate(id: $id, input: $input) {- shippingErrors {+ errors {fieldmessagecode@@ -83,7 +83,7 @@ def test_shipping_method_channel_listing_create_as_staff_user(# thendata = content["data"]["shippingMethodChannelListingUpdate"]shipping_method_data = data["shippingMethod"]- assert not data["shippingErrors"]+ assert not data["errors"]assert shipping_method_data["name"] == shipping_method.nameassert shipping_method_data["channelListings"][1]["price"]["amount"] == price@@ -145,7 +145,7 @@ def test_shipping_method_channel_listing_update_as_staff_user(data = content["data"]["shippingMethodChannelListingUpdate"]shipping_method_data = data["shippingMethod"]- assert not data["shippingErrors"]+ assert not data["errors"]assert shipping_method_data["name"] == shipping_method.name# then@@ -330,9 +330,9 @@ def test_shipping_method_channel_listing_update_with_max_less_than_min(data = content["data"]["shippingMethodChannelListingUpdate"]# then- assert data["shippingErrors"][0]["field"] == "maximumOrderPrice"- assert data["shippingErrors"][0]["code"] == ShippingErrorCode.MAX_LESS_THAN_MIN.name- assert data["shippingErrors"][0]["channels"] == [channel_id]+ assert data["errors"][0]["field"] == "maximumOrderPrice"+ assert data["errors"][0]["code"] == ShippingErrorCode.MAX_LESS_THAN_MIN.name+ assert data["errors"][0]["channels"] == [channel_id]def test_shipping_method_channel_listing_create_without_price(@@ -373,9 +373,9 @@ def test_shipping_method_channel_listing_create_without_price(data = content["data"]["shippingMethodChannelListingUpdate"]# then- assert data["shippingErrors"][0]["field"] == "price"- assert data["shippingErrors"][0]["code"] == ShippingErrorCode.REQUIRED.name- assert data["shippingErrors"][0]["channels"] == [channel_id]+ assert data["errors"][0]["field"] == "price"+ assert data["errors"][0]["code"] == ShippingErrorCode.REQUIRED.name+ assert data["errors"][0]["channels"] == [channel_id]def test_shipping_method_channel_listing_update_with_to_many_decimal_places_in_price(@@ -418,9 +418,9 @@ def test_shipping_method_channel_listing_update_with_to_many_decimal_places_in_pdata = content["data"]["shippingMethodChannelListingUpdate"]# then- assert data["shippingErrors"][0]["field"] == "price"- assert data["shippingErrors"][0]["code"] == ShippingErrorCode.INVALID.name- assert data["shippingErrors"][0]["channels"] == [channel_id]+ assert data["errors"][0]["field"] == "price"+ assert data["errors"][0]["code"] == ShippingErrorCode.INVALID.name+ assert data["errors"][0]["channels"] == [channel_id]def test_shipping_method_channel_listing_update_with_to_many_decimal_places_in_min_val(@@ -463,9 +463,9 @@ def test_shipping_method_channel_listing_update_with_to_many_decimal_places_in_mdata = content["data"]["shippingMethodChannelListingUpdate"]# then- assert data["shippingErrors"][0]["field"] == "minimumOrderPrice"- assert data["shippingErrors"][0]["code"] == ShippingErrorCode.INVALID.name- assert data["shippingErrors"][0]["channels"] == [channel_id]+ assert data["errors"][0]["field"] == "minimumOrderPrice"+ assert data["errors"][0]["code"] == ShippingErrorCode.INVALID.name+ assert data["errors"][0]["channels"] == [channel_id]def test_shipping_method_channel_listing_update_with_to_many_decimal_places_in_max_val(@@ -508,9 +508,9 @@ def test_shipping_method_channel_listing_update_with_to_many_decimal_places_in_mdata = content["data"]["shippingMethodChannelListingUpdate"]# then- assert data["shippingErrors"][0]["field"] == "maximumOrderPrice"- assert data["shippingErrors"][0]["code"] == ShippingErrorCode.INVALID.name- assert data["shippingErrors"][0]["channels"] == [channel_id]+ assert data["errors"][0]["field"] == "maximumOrderPrice"+ assert data["errors"][0]["code"] == ShippingErrorCode.INVALID.name+ assert data["errors"][0]["channels"] == [channel_id]def test_shipping_method_channel_listing_create_channel_not_valid(@@ -555,9 +555,9 @@ def test_shipping_method_channel_listing_create_channel_not_valid(data = content["data"]["shippingMethodChannelListingUpdate"]# then- assert data["shippingErrors"][0]["field"] == "addChannels"- assert data["shippingErrors"][0]["code"] == ShippingErrorCode.INVALID.name- assert data["shippingErrors"][0]["channels"] == [channel_id]+ assert data["errors"][0]["field"] == "addChannels"+ assert data["errors"][0]["code"] == ShippingErrorCode.INVALID.name+ assert data["errors"][0]["channels"] == [channel_id]@patch(@@ -599,7 +599,7 @@ def test_shipping_method_channel_listing_update_remove_channels(data = content["data"]["shippingMethodChannelListingUpdate"]shipping_method_data = data["shippingMethod"]- assert not data["shippingErrors"]+ assert not data["errors"]assert shipping_method_data["name"] == shipping_method.name# thendiff --git a/saleor/graphql/shop/tests/test_shop.py b/saleor/graphql/shop/tests/test_shop.pyindex f3c0f6917c..ba6268d931 100644--- a/saleor/graphql/shop/tests/test_shop.py+++ b/saleor/graphql/shop/tests/test_shop.py@@ -169,28 +169,6 @@ def test_query_permissions(staff_api_client):assert code in [str_to_enum(code) for code in permissions_codenames]-def test_query_navigation(user_api_client, site_settings):- query = """- query {- shop {- navigation {- main {- name- }- secondary {- name- }- }- }- }- """- response = user_api_client.post_graphql(query)- content = get_graphql_content(response)- navigation_data = content["data"]["shop"]["navigation"]- assert navigation_data["main"]["name"] == site_settings.top_menu.name- assert navigation_data["secondary"]["name"] == site_settings.bottom_menu.name--def test_query_charge_taxes_on_shipping(api_client, site_settings):query = """query {@@ -503,7 +481,7 @@ MUTATION_CUSTOMER_SET_PASSWORD_URL_UPDATE = """shop {customerSetPasswordUrl}- shopErrors {+ errors {messagefieldcode@@ -526,7 +504,7 @@ def test_shop_customer_set_password_url_update()content = get_graphql_content(response)data = content["data"]["shopSettingsUpdate"]- assert not data["shopErrors"]+ assert not data["errors"]site_settings = Site.objects.get_current().settingsassert site_settings.customer_set_password_url == customer_set_password_url@@ -554,7 +532,7 @@ def test_shop_customer_set_password_url_update_invalid_url()content = get_graphql_content(response)data = content["data"]["shopSettingsUpdate"]- assert data["shopErrors"][0] == {+ assert data["errors"][0] == {"field": "customerSetPasswordUrl","code": ShopErrorCode.INVALID.name,"message": ANY,@@ -980,7 +958,7 @@ MUTATION_STAFF_NOTIFICATION_RECIPIENT_CREATE = """}}- shopErrors {+ errors {fieldmessagecode@@ -1013,7 +991,7 @@ def test_staff_notification_create_mutation("email": staff_user.email,},},- "shopErrors": [],+ "errors": [],}@@ -1040,7 +1018,7 @@ def test_staff_notification_create_mutation_with_staffs_email("email": staff_user.email,},},- "shopErrors": [],+ "errors": [],}@@ -1058,7 +1036,7 @@ def test_staff_notification_create_mutation_with_customer_user(assert content["data"]["staffNotificationRecipientCreate"] == {"staffNotificationRecipient": None,- "shopErrors": [+ "errors": [{"code": "INVALID", "field": "user", "message": "User has to be staff user"}],}@@ -1082,7 +1060,7 @@ def test_staff_notification_create_mutation_with_email("email": staff_email,"user": None,},- "shopErrors": [],+ "errors": [],}@@ -1100,7 +1078,7 @@ def test_staff_notification_create_mutation_with_empty_email(assert content["data"]["staffNotificationRecipientCreate"] == {"staffNotificationRecipient": None,- "shopErrors": [+ "errors": [{"code": "INVALID","field": "staffNotification",@@ -1125,7 +1103,7 @@ MUTATION_STAFF_NOTIFICATION_RECIPIENT_UPDATE = """}}- shopErrors {+ errors {fieldmessagecode@@ -1177,7 +1155,7 @@ def test_staff_notification_update_mutation_with_empty_user(staff_notification_recipient.refresh_from_db()assert content["data"]["staffNotificationRecipientUpdate"] == {"staffNotificationRecipient": None,- "shopErrors": [+ "errors": [{"code": "INVALID","field": "staffNotification",@@ -1207,7 +1185,7 @@ def test_staff_notification_update_mutation_with_empty_email(staff_notification_recipient.refresh_from_db()assert content["data"]["staffNotificationRecipientUpdate"] == {"staffNotificationRecipient": None,- "shopErrors": [+ "errors": [{"code": "INVALID","field": "staffNotification",diff --git a/saleor/graphql/shop/types.py b/saleor/graphql/shop/types.pyindex 347bb86054..a723cf6eed 100644--- a/saleor/graphql/shop/types.py+++ b/saleor/graphql/shop/types.py@@ -13,7 +13,6 @@ from ...core.permissions import SitePermissions, get_permissionsfrom ...core.tracing import traced_resolverfrom ...site import models as site_modelsfrom ..account.types import Address, AddressInput, StaffNotificationRecipient-from ..channel import ChannelContextfrom ..checkout.types import PaymentGatewayfrom ..core.connection import CountableDjangoObjectTypefrom ..core.enums import LanguageCodeEnum, WeightUnitsEnum@@ -24,8 +23,6 @@ from ..decorators import (staff_member_or_app_required,staff_member_required,)-from ..menu.dataloaders import MenuByIdLoader-from ..menu.types import Menufrom ..shipping.types import ShippingMethodfrom ..translations.fields import TranslationFieldfrom ..translations.resolvers import resolve_translation@@ -34,14 +31,6 @@ from ..utils import format_permissions_for_displayfrom .resolvers import resolve_available_shipping_methods-class Navigation(graphene.ObjectType):- main = graphene.Field(Menu, description="Main navigation bar.")- secondary = graphene.Field(Menu, description="Secondary navigation bar.")-- class Meta:- description = "Represents shop's navigation menus."--class Domain(graphene.ObjectType):host = graphene.String(description="The host name of the domain.", required=True)ssl_enabled = graphene.Boolean(@@ -147,11 +136,6 @@ class Shop(graphene.ObjectType):required=True,)name = graphene.String(description="Shop's name.", required=True)- navigation = graphene.Field(- Navigation,- description="Shop's navigation.",- deprecation_reason="Fetch menus using the `menu` query with `slug` parameter.",- )permissions = graphene.List(Permission, description="List of available permissions.", required=True)@@ -262,27 +246,6 @@ class Shop(graphene.ObjectType):def resolve_name(_, info):return info.context.site.name- @staticmethod- @traced_resolver- def resolve_navigation(_, info):- site_settings = info.context.site.settings- main = None- if site_settings.top_menu_id:- main = (- MenuByIdLoader(info.context)- .load(site_settings.top_menu_id)- .then(lambda menu: ChannelContext(node=menu, channel_slug=None))- )- secondary = None- if site_settings.bottom_menu_id:- secondary = (- MenuByIdLoader(info.context)- .load(site_settings.bottom_menu_id)- .then(lambda menu: ChannelContext(node=menu, channel_slug=None))- )-- return Navigation(main=main, secondary=secondary)-@staticmethod@traced_resolverdef resolve_permissions(_, _info):diff --git a/saleor/graphql/translations/mutations.py b/saleor/graphql/translations/mutations.pyindex c379206ed0..88524269cd 100644--- a/saleor/graphql/translations/mutations.py+++ b/saleor/graphql/translations/mutations.py@@ -17,9 +17,12 @@ from ..core.utils import from_global_id_or_errorfrom ..product.types import Product, ProductVariantfrom ..shop.types import Shop-# discount types need to be imported to get Voucher in the graphene registry+# discount and menu types need to be imported to get+# Voucher and Menu in the graphene registryfrom ..discount import types # noqa # pylint: disable=unused-import, isort:skip+from ..menu import types # type: ignore # noqa # pylint: disable=unused-import, isort:skip+class BaseTranslateMutation(ModelMutation):class Meta:diff --git a/saleor/graphql/warehouse/tests/test_warehouse.py b/saleor/graphql/warehouse/tests/test_warehouse.pyindex 353087a46f..f2b0c8c9cb 100644--- a/saleor/graphql/warehouse/tests/test_warehouse.py+++ b/saleor/graphql/warehouse/tests/test_warehouse.py@@ -112,7 +112,7 @@ mutation createWarehouse($input: WarehouseCreateInput!) {id}}- warehouseErrors {+ errors {messagefieldcode@@ -125,7 +125,7 @@ mutation createWarehouse($input: WarehouseCreateInput!) {MUTATION_UPDATE_WAREHOUSE = """mutation updateWarehouse($input: WarehouseUpdateInput!, $id: ID!) {updateWarehouse(id: $id, input: $input) {- warehouseErrors {+ errors {messagefieldcode@@ -148,7 +148,7 @@ mutation updateWarehouse($input: WarehouseUpdateInput!, $id: ID!) {MUTATION_DELETE_WAREHOUSE = """mutation deleteWarehouse($id: ID!) {deleteWarehouse(id: $id) {- warehouseErrors {+ errors {messagefieldcode@@ -161,7 +161,7 @@ mutation deleteWarehouse($id: ID!) {MUTATION_ASSIGN_SHIPPING_ZONE_WAREHOUSE = """mutation assignWarehouseShippingZone($id: ID!, $shippingZoneIds: [ID!]!) {assignWarehouseShippingZone(id: $id, shippingZoneIds: $shippingZoneIds) {- warehouseErrors {+ errors {fieldmessagecode@@ -175,7 +175,7 @@ mutation assignWarehouseShippingZone($id: ID!, $shippingZoneIds: [ID!]!) {MUTATION_UNASSIGN_SHIPPING_ZONE_WAREHOUSE = """mutation unassignWarehouseShippingZone($id: ID!, $shippingZoneIds: [ID!]!) {unassignWarehouseShippingZone(id: $id, shippingZoneIds: $shippingZoneIds) {- warehouseErrors {+ errors {fieldmessagecode@@ -490,7 +490,7 @@ def test_mutation_create_warehouse_does_not_create_when_name_is_empty_string()content = get_graphql_content(response)data = content["data"]["createWarehouse"]- errors = data["warehouseErrors"]+ errors = data["errors"]assert Warehouse.objects.count() == 0assert len(errors) == 1assert errors[0]["field"] == "name"@@ -523,7 +523,7 @@ def test_create_warehouse_creates_address(permissions=[permission_manage_products],)content = get_graphql_content(response)- errors = content["data"]["createWarehouse"]["warehouseErrors"]+ errors = content["data"]["createWarehouse"]["errors"]assert len(errors) == 0assert Address.objects.count() == 1address = Address.objects.get(street_address_1="Teczowa 8", city="WROCLAW")@@ -565,7 +565,7 @@ def test_create_warehouse_with_given_slug()content = get_graphql_content(response)data = content["data"]["createWarehouse"]- assert not data["warehouseErrors"]+ assert not data["errors"]assert data["warehouse"]["slug"] == expected_slug@@ -654,7 +654,7 @@ def test_update_warehouse_slug()content = get_graphql_content(response)data = content["data"]["updateWarehouse"]- errors = data["warehouseErrors"]+ errors = data["errors"]if not error_message:assert not errorsassert data["warehouse"]["slug"] == expected_slug@@ -684,7 +684,7 @@ def test_update_warehouse_slug_exists()content = get_graphql_content(response)data = content["data"]["updateWarehouse"]- errors = data["warehouseErrors"]+ errors = data["errors"]assert errorsassert errors[0]["field"] == "slug"assert errors[0]["code"] == WarehouseErrorCode.UNIQUE.name@@ -737,7 +737,7 @@ def test_update_warehouse_slug_and_name(content = get_graphql_content(response)warehouse.refresh_from_db()data = content["data"]["updateWarehouse"]- errors = data["warehouseErrors"]+ errors = data["errors"]if not error_message:assert data["warehouse"]["name"] == expected_name == warehouse.nameassert (@@ -760,7 +760,7 @@ def test_delete_warehouse_mutation(permissions=[permission_manage_products],)content = get_graphql_content(response)- errors = content["data"]["deleteWarehouse"]["warehouseErrors"]+ errors = content["data"]["deleteWarehouse"]["errors"]assert len(errors) == 0assert not Warehouse.objects.exists()@@ -776,7 +776,7 @@ def test_delete_warehouse_deletes_associated_address(permissions=[permission_manage_products],)content = get_graphql_content(response)- errors = content["data"]["deleteWarehouse"]["warehouseErrors"]+ errors = content["data"]["deleteWarehouse"]["errors"]assert len(errors) == 0assert not Address.objects.exists()@@ -810,7 +810,7 @@ def test_shipping_zone_can_be_assigned_only_to_one_warehouse(permissions=[permission_manage_products],)content = get_graphql_content(response)- errors = content["data"]["createWarehouse"]["warehouseErrors"]+ errors = content["data"]["createWarehouse"]["errors"]assert len(errors) == 1assert (errors[0]["message"] == "Shipping zone can be assigned only to one warehouse."@@ -859,7 +859,7 @@ def test_empty_shipping_zone_assign_to_warehouse(MUTATION_ASSIGN_SHIPPING_ZONE_WAREHOUSE, variables=variables)content = get_graphql_content(response)- errors = content["data"]["assignWarehouseShippingZone"]["warehouseErrors"]+ errors = content["data"]["assignWarehouseShippingZone"]["errors"]warehouse_no_shipping_zone.refresh_from_db()shipping_zone.refresh_from_db()diff --git a/saleor/graphql/webhook/tests/test_webhook.py b/saleor/graphql/webhook/tests/test_webhook.pyindex 3a262a4d5b..3cab85c84d 100644--- a/saleor/graphql/webhook/tests/test_webhook.py+++ b/saleor/graphql/webhook/tests/test_webhook.py@@ -164,7 +164,7 @@ def test_webhook_create_by_staff_without_permission(staff_api_client, app):WEBHOOK_DELETE_BY_APP = """mutation webhookDelete($id: ID!){webhookDelete(id: $id){- webhookErrors{+ errors{fieldmessagecode@@ -208,7 +208,7 @@ def test_webhook_delete_by_app_and_missing_webhook(app_api_client, webhook):response = app_api_client.post_graphql(query, variables=variables)content = get_graphql_content(response)- errors = content["data"]["webhookDelete"]["webhookErrors"]+ errors = content["data"]["webhookDelete"]["errors"]assert errors[0]["code"] == "GRAPHQL_ERROR"