Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Remove products field from collectionUpdate mutation
oldPadavan97f66a57a148
diff --git a/saleor/graphql/product/mutations/products.py b/saleor/graphql/product/mutations/products.pyindex 8c7fc774c9..2d2557e394 100644--- a/saleor/graphql/product/mutations/products.py+++ b/saleor/graphql/product/mutations/products.py@@ -79,17 +79,20 @@ class CollectionInput(graphene.InputObjectType):description='Informs whether a collection is published.')name = graphene.String(description='Name of the collection.')slug = graphene.String(description='Slug of the collection.')+ background_image = Upload(description='Background image file.')+ seo = SeoInput(description='Search engine optimization fields.')+++class CollectionCreateInput(CollectionInput):products = graphene.List(graphene.ID,description='List of products to be added to the collection.',name='products')- background_image = Upload(description='Background image file.')- seo = SeoInput(description='Search engine optimization fields.')class CollectionCreate(ModelMutation):class Arguments:- input = CollectionInput(+ input = CollectionCreateInput(required=True,description='Fields required to create a collection.')diff --git a/saleor/graphql/schema.graphql b/saleor/graphql/schema.graphqlindex 8cbf250226..1ae0d5d0e8 100644--- a/saleor/graphql/schema.graphql+++ b/saleor/graphql/schema.graphql@@ -322,6 +322,14 @@ type CollectionDelete {}input CollectionInput {+ isPublished: Boolean+ name: String+ slug: String+ backgroundImage: Upload+ seo: SeoInput+}++input CollectionCreateInput {isPublished: Booleanname: Stringslug: String@@ -696,7 +704,7 @@ type Mutations {addressCreate(input: AddressCreateInput!): AddressCreateaddressUpdate(id: ID!, input: AddressInput!): AddressUpdateaddressDelete(id: ID!): AddressDelete- collectionCreate(input: CollectionInput!): CollectionCreate+ collectionCreate(input: CollectionCreateInput!): CollectionCreatecollectionUpdate(id: ID!, input: CollectionInput!): CollectionUpdatecollectionDelete(id: ID!): CollectionDeletecollectionAddProducts(collectionId: ID!, products: [ID]!): CollectionAddProducts