Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Deprecate `taxTypes` query (#15802)

Marcin Gębala9117ab5e775b
diff --git a/CHANGELOG.md b/CHANGELOG.md
index f6c83ed37f..5031460a04 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -11,8 +11,8 @@ All notable, unreleased changes to this project will be documented in this file.
### GraphQL API
- Add `translatableContent` to all translation types; add translated object id to all translatable content types - #15617 by @zedzior
-
- Add a `taxConfiguration` to a `Channel` - #15610 by @Air-t
+- Deprecate the `taxTypes` query - #15802 by @maarcingebala
### Saleor Apps
diff --git a/saleor/graphql/core/schema.py b/saleor/graphql/core/schema.py
index 3e6f856b4a..fac28232cb 100644
--- a/saleor/graphql/core/schema.py
+++ b/saleor/graphql/core/schema.py
@@ -1,5 +1,6 @@
import graphene
+from ..core.descriptions import DEPRECATED_IN_3X_FIELD
from ..core.doc_category import DOC_CATEGORY_TAXES
from ..core.fields import BaseField
from ..plugins.dataloaders import get_plugin_manager_promise
@@ -13,6 +14,7 @@ class CoreQueries(graphene.ObjectType):
NonNullList(TaxType),
description="List of all tax rates available from tax gateway.",
doc_category=DOC_CATEGORY_TAXES,
+ deprecation_reason=f"{DEPRECATED_IN_3X_FIELD} Use `taxClasses` field instead.",
)
def resolve_tax_types(self, info: ResolveInfo):
diff --git a/saleor/graphql/schema.graphql b/saleor/graphql/schema.graphql
index 800908aa58..633ca30825 100644
--- a/saleor/graphql/schema.graphql
+++ b/saleor/graphql/schema.graphql
@@ -1282,7 +1282,7 @@ type Query {
): ExportFileCountableConnection
"""List of all tax rates available from tax gateway."""
- taxTypes: [TaxType!] @doc(category: "Taxes")
+ taxTypes: [TaxType!] @doc(category: "Taxes") @deprecated(reason: "This field will be removed in Saleor 4.0. Use `taxClasses` field instead.")
"""
Look up a checkout by id.