Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Add deprecated message to service account queries and mutations
Maciej Korycinskic5090015a77a
diff --git a/saleor/graphql/account/deprecated/types.py b/saleor/graphql/account/deprecated/types.pyindex 7b064bda29..e90dd50c30 100644--- a/saleor/graphql/account/deprecated/types.py+++ b/saleor/graphql/account/deprecated/types.py@@ -5,10 +5,16 @@ from graphene_federation import keyfrom ....app.models import App, AppTokenfrom ....core.permissions import AccountPermissionsfrom ...core.connection import CountableDjangoObjectType-from ...core.types import PermissionDisplay+from ...core.types import FilterInputObjectType, PermissionDisplayfrom ...meta.deprecated.resolvers import resolve_meta, resolve_private_metafrom ...meta.types import ObjectWithMetadatafrom ...utils import format_permissions_for_display+from .filters import ServiceAccountFilter+++class ServiceAccountFilterInput(FilterInputObjectType):+ class Meta:+ filterset_class = ServiceAccountFilterclass ServiceAccountToken(CountableDjangoObjectType):diff --git a/saleor/graphql/account/schema.py b/saleor/graphql/account/schema.pyindex 10edac2886..7eb60fed23 100644--- a/saleor/graphql/account/schema.py+++ b/saleor/graphql/account/schema.py@@ -5,7 +5,6 @@ from ..core.fields import FilterInputConnectionFieldfrom ..core.types import FilterInputObjectTypefrom ..decorators import one_of_permissions_required, permission_requiredfrom .bulk_mutations import CustomerBulkDelete, StaffBulkDelete, UserBulkSetActive-from .deprecated.filters import ServiceAccountFilterfrom .deprecated.mutations_service_account import (ServiceAccountClearPrivateMeta,ServiceAccountCreate,@@ -17,7 +16,7 @@ from .deprecated.mutations_service_account import ()from .deprecated.resolvers import resolve_service_accountsfrom .deprecated.sorters import ServiceAccountSortingInput-from .deprecated.types import ServiceAccount+from .deprecated.types import ServiceAccount, ServiceAccountFilterInputfrom .enums import CountryCodeEnumfrom .filters import CustomerFilter, PermissionGroupFilter, StaffUserFilterfrom .mutations.account import (@@ -91,11 +90,6 @@ class StaffUserInput(FilterInputObjectType):filterset_class = StaffUserFilter-class ServiceAccountFilterInput(FilterInputObjectType):- class Meta:- filterset_class = ServiceAccountFilter--class AccountQueries(graphene.ObjectType):address_validation_rules = graphene.Field(AddressValidationData,@@ -155,6 +149,9 @@ class AccountQueries(graphene.ObjectType):),sort_by=ServiceAccountSortingInput(description="Sort service accounts."),description="List of the service accounts.",+ deprecation_reason=(+ "Use the `apps` query instead. This field will be removed after 2020-07-31."+ ),)service_account = graphene.Field(ServiceAccount,@@ -162,6 +159,9 @@ class AccountQueries(graphene.ObjectType):graphene.ID, description="ID of the service account.", required=True),description="Look up a service account by ID.",+ deprecation_reason=(+ "Use the `app` query instead. This field will be removed after 2020-07-31."+ ),)user = graphene.Field(@@ -289,9 +289,24 @@ class AccountMutations(graphene.ObjectType):))- service_account_create = ServiceAccountCreate.Field()- service_account_update = ServiceAccountUpdate.Field()- service_account_delete = ServiceAccountDelete.Field()+ service_account_create = ServiceAccountCreate.Field(+ deprecation_reason=(+ "Use the `appCreate` mutation instead. This field will be removed after "+ "2020-07-31."+ )+ )+ service_account_update = ServiceAccountUpdate.Field(+ deprecation_reason=(+ "Use the `appUpdate` mutation instead. This field will be removed after "+ "2020-07-31."+ )+ )+ service_account_delete = ServiceAccountDelete.Field(+ deprecation_reason=(+ "Use the `appDelete` mutation instead. This field will be removed after "+ "2020-07-31."+ )+ )service_account_update_private_metadata = ServiceAccountUpdatePrivateMeta.Field(deprecation_reason=(diff --git a/saleor/graphql/schema.graphql b/saleor/graphql/schema.graphqlindex 97eb7b8845..338ccb8e05 100644--- a/saleor/graphql/schema.graphql+++ b/saleor/graphql/schema.graphql@@ -2408,9 +2408,9 @@ type Mutation {userClearMetadata(id: ID!, input: MetaPath!): UserClearMeta @deprecated(reason: "Will be removed in Saleor 2.11. Use the `DeleteMetadata` mutation instead.")userUpdatePrivateMetadata(id: ID!, input: MetaInput!): UserUpdatePrivateMeta @deprecated(reason: "Will be removed in Saleor 2.11.Use the `UpdatePrivateMetadata` mutation instead.")userClearPrivateMetadata(id: ID!, input: MetaPath!): UserClearPrivateMeta @deprecated(reason: "Will be removed in Saleor 2.11.Use the `DeletePrivateMetadata` mutation instead.")- serviceAccountCreate(input: ServiceAccountInput!): ServiceAccountCreate- serviceAccountUpdate(id: ID!, input: ServiceAccountInput!): ServiceAccountUpdate- serviceAccountDelete(id: ID!): ServiceAccountDelete+ serviceAccountCreate(input: ServiceAccountInput!): ServiceAccountCreate @deprecated(reason: "Use the `appCreate` mutation instead. This field will be removed after 2020-07-31.")+ serviceAccountUpdate(id: ID!, input: ServiceAccountInput!): ServiceAccountUpdate @deprecated(reason: "Use the `appUpdate` mutation instead. This field will be removed after 2020-07-31.")+ serviceAccountDelete(id: ID!): ServiceAccountDelete @deprecated(reason: "Use the `appDelete` mutation instead. This field will be removed after 2020-07-31.")serviceAccountUpdatePrivateMetadata(id: ID!, input: MetaInput!): ServiceAccountUpdatePrivateMeta @deprecated(reason: "Will be removed in Saleor 2.11.Use the `UpdatePrivateMetadata` mutation instead.")serviceAccountClearPrivateMetadata(id: ID!, input: MetaPath!): ServiceAccountClearPrivateMeta @deprecated(reason: "Will be removed in Saleor 2.11.Use the `DeletePrivateMetadata` mutation instead.")serviceAccountTokenCreate(input: ServiceAccountTokenInput!): ServiceAccountTokenCreate@@ -3783,8 +3783,8 @@ type Query {permissionGroup(id: ID!): Groupme: UserstaffUsers(filter: StaffUserInput, sortBy: UserSortingInput, before: String, after: String, first: Int, last: Int): UserCountableConnection- serviceAccounts(filter: ServiceAccountFilterInput, sortBy: ServiceAccountSortingInput, before: String, after: String, first: Int, last: Int): ServiceAccountCountableConnection- serviceAccount(id: ID!): ServiceAccount+ serviceAccounts(filter: ServiceAccountFilterInput, sortBy: ServiceAccountSortingInput, before: String, after: String, first: Int, last: Int): ServiceAccountCountableConnection @deprecated(reason: "Use the `apps` query instead. This field will be removed after 2020-07-31.")+ serviceAccount(id: ID!): ServiceAccount @deprecated(reason: "Use the `app` query instead. This field will be removed after 2020-07-31.")user(id: ID!): User_entities(representations: [_Any]): [_Entity]_service: _Service