Skip to content

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

Use one TaxRateEnum in GraphQL API

fowczarek5e7117f7a9a9
diff --git a/saleor/graphql/product/types.py b/saleor/graphql/product/types.py
index f4ecbad443..556da2e10d 100644
--- a/saleor/graphql/product/types.py
+++ b/saleor/graphql/product/types.py
@@ -286,6 +286,7 @@ class Product(CountableDjangoObjectType):
Money,
description=dedent("""The product's base price (without any discounts
applied)."""))
+ tax_rate = TaxRateType(description='A type of tax rate.')
attributes = graphene.List(
graphene.NonNull(SelectedAttribute), required=True,
description='List of attributes assigned to this product.')
diff --git a/saleor/graphql/schema.graphql b/saleor/graphql/schema.graphql
index 8bf1a9dd0e..d9c4674a25 100644
--- a/saleor/graphql/schema.graphql
+++ b/saleor/graphql/schema.graphql
@@ -1320,7 +1320,7 @@ type Product implements Node {
attributes: [SelectedAttribute!]!
updatedAt: DateTime
chargeTaxes: Boolean!
- taxRate: ProductTaxRate!
+ taxRate: TaxRateType
weight: Weight
variants: [ProductVariant]
images: [ProductImage]
@@ -1448,33 +1448,6 @@ enum ProductOrderField {
DATE
}
-enum ProductTaxRate {
- ACCOMMODATION
- ADMISSION_TO_CULTURAL_EVENTS
- ADMISSION_TO_ENTERTAINMENT_EVENTS
- ADMISSION_TO_SPORTING_EVENTS
- ADVERTISING
- AGRICULTURAL_SUPPLIES
- BABY_FOODSTUFFS
- BIKES
- BOOKS
- CHILDRENS_CLOTHING
- DOMESTIC_FUEL
- DOMESTIC_SERVICES
- E_BOOKS
- FOODSTUFFS
- HOTELS
- MEDICAL
- NEWSPAPERS
- PASSENGER_TRANSPORT
- PHARMACEUTICALS
- PROPERTY_RENOVATIONS
- RESTAURANTS
- SOCIAL_HOUSING
- STANDARD
- WATER
-}
-
type ProductType implements Node {
id: ID!
name: String!