Skip to content

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

Types, schema

Pacu231f32333631e
diff --git a/saleor/graphql/product/types.py b/saleor/graphql/product/types.py
index b3af2db2c1..5eb021b8a6 100644
--- a/saleor/graphql/product/types.py
+++ b/saleor/graphql/product/types.py
@@ -92,6 +92,11 @@ class Attribute(CountableDjangoObjectType):
return self.values.all()
+class AttributeTypeEnum(graphene.Enum):
+ PRODUCT = 'PRODUCT'
+ VARIANT = 'VARIANT'
+
+
class Margin(graphene.ObjectType):
start = graphene.Int()
stop = graphene.Int()
diff --git a/saleor/graphql/schema.graphql b/saleor/graphql/schema.graphql
index 86434e92be..cc2dc705e3 100644
--- a/saleor/graphql/schema.graphql
+++ b/saleor/graphql/schema.graphql
@@ -142,6 +142,11 @@ type AttributeDelete {
scalar AttributeScalar
+enum AttributeTypeEnum {
+ PRODUCT
+ VARIANT
+}
+
type AttributeUpdate {
errors: [Error]
attribute: Attribute
@@ -511,6 +516,10 @@ input FulfillmentUpdateTrackingInput {
scalar GenericScalar
+type Geolocalization {
+ country: CountryDisplay
+}
+
type HomepageCollectionUpdate {
errors: [Error]
shop: Shop
@@ -694,7 +703,7 @@ type Mutations {
pageCreate(input: PageInput!): PageCreate
pageDelete(id: ID!): PageDelete
pageUpdate(id: ID!, input: PageInput!): PageUpdate
- attributeCreate(input: AttributeCreateInput!): AttributeCreate
+ attributeCreate(id: ID!, input: AttributeCreateInput!, type: AttributeTypeEnum!): AttributeCreate
attributeDelete(id: ID!): AttributeDelete
attributeUpdate(id: ID!, input: AttributeUpdateInput!): AttributeUpdate
productCreate(input: ProductCreateInput!): ProductCreate
@@ -1447,6 +1456,7 @@ type ShippingZoneUpdate {
}
type Shop {
+ geolocalization: Geolocalization
authorizationKeys: [AuthorizationKey]!
countries: [CountryDisplay]!
currencies: [String]!