Platform Release 2 October 2018

It is now possible to create/update/delete categories as well as products via GraphQL API.

Additionally the following query fields where added:

Following changes were introduced in the GraphQL schema:

extend type Mutation {

  createCategory(draft: CategoryDraft!): Category

  updateCategory(
      "Queries with specified ID"
      id: String,
      "Queries with specified key"
      key: String, version: Long!, actions: [CategoryUpdateAction!]!): Category

  deleteCategory(
      "Queries with specified ID"
      id: String,
      "Queries with specified key"
      key: String, version: Long!): Category

  createProduct(draft: ProductDraft!): Product

  updateProduct(
      "Queries with specified ID"
      id: String,
      "Queries with specified key"
      key: String, version: Long!, actions: [ProductUpdateAction!]!): Product

  deleteProduct(
    "Queries with specified ID"
    id: String,
    "Queries with specified key"
    key: String, version: Long!): Product
}

input CategoryUpdateAction {
  addAsset: AddCategoryAsset
  changeAssetName: ChangeCategoryAssetName
  changeAssetOrder: ChangeCategoryAssetOrder
  changeName: ChangeCategoryName
  changeOrderHint: ChangeCategoryOrderHint
  changeSlug: ChangeCategorySlug
  changeParent: ChangeCategoryParent
  removeAsset: RemoveCategoryAsset
  setAssetCustomField: SetCategoryAssetCustomField
  setAssetCustomType: SetCategoryAssetCustomType
  setAssetDescription: SetCategoryAssetDescription
  setAssetKey: SetCategoryAssetKey
  setAssetSources: SetCategoryAssetSources
  setAssetTags: SetCategoryAssetTags
  setCustomField: SetCategoryCustomField
  setCustomType: SetCategoryCustomType
  setDescription: SetCategoryDescription
  setKey: SetCategoryKey
  setMetaDescription: SetCategoryMetaDescription
  setMetaKeywords: SetCategoryMetaKeywords
  setMetaTitle: SetCategoryMetaTitle
  setExternalId: SetCategoryExternalId
}

input ProductUpdateAction {
  moveImageToPosition: MoveProductImageToPosition
  setSearchKeywords: SetSearchKeywords
  revertStagedChanges: RevertStagedChanges
  revertStagedVariantChanges: RevertStagedVariantChanges
  publish: PublishProduct
  unpublish: UnpublishProduct
  transitionState: TransitionProductState
  addAsset: AddProductAsset
  addExternalImage: AddProductExternalImage
  addPrice: AddProductPrice
  addToCategory: AddProductToCategory
  addVariant: AddProductVariant
  changeAssetName: ChangeProductAssetName
  changeAssetOrder: ChangeProductAssetOrder
  changeMasterVariant: ChangeProductMasterVariant
  changeImageLabel: ChangeProductImageLabel
  changeName: ChangeProductName
  changePrice: ChangeProductPrice
  changeSlug: ChangeProductSlug
  removeAsset: RemoveProductAsset
  removeFromCategory: RemoveProductFromCategory
  removeImage: RemoveProductImage
  removePrice: RemoveProductPrice
  removeVariant: RemoveProductVariant
  setAssetCustomField: SetProductAssetCustomField
  setAssetCustomType: SetProductAssetCustomType
  setAssetDescription: SetProductAssetDescription
  setAssetKey: SetProductAssetKey
  setAssetSources: SetProductAssetSources
  setAssetTags: SetProductAssetTags
  setCategoryOrderHint: SetProductCategoryOrderHint
  setDiscountedPrice: SetProductDiscountedPrice
  setAttribute: SetProductAttribute
  setAttributeInAllVariants: SetProductAttributeInAllVariants
  setDescription: SetProductDescription
  setImageLabel: SetProductImageLabel
  setKey: SetProductKey
  setMetaAttributes: SetProductMetaAttributes
  setMetaDescription: SetProductMetaDescription
  setMetaKeywords: SetProductMetaKeywords
  setMetaTitle: SetProductMetaTitle
  setProductPriceCustomField: SetProductPriceCustomField
  setProductPriceCustomType: SetProductPriceCustomType
  setPrices: SetProductPrices
  setSku: SetProductSku
  setTaxCategory: SetProductTaxCategory
  setProductVariantKey: SetProductVariantKey
}

extend type ProductVariant {
  assets: [Asset!]!
}

extend type Category {
  assets: [Asset!]!
}

type Asset {
  id: String!
  key: String
  sources: [AssetSource!]!
  name(
    "String is define for different locales. This argument specifies the desired locale."
    locale: Locale,
    "List of languages the client is able to understand, and which locale variant is preferred."
    acceptLanguage: [Locale!]): String
  nameAllLocales: [LocalizedString!]!
  description(
    locale: Locale,
    acceptLanguage: [Locale!]): String  
  descriptionAllLocales: [LocalizedString!]
  tags: [String!]!
}

type AssetSource {
  uri: String!
  key: String
  dimensions: AssetDimensions
  contentType: String
}

type AssetDimensions {
  width: Int!
  height: Int!
}