25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 
 
 
 
 

65 satır
4.9 KiB

  1. # Copyright © Magento, Inc. All rights reserved.
  2. # See COPYING.txt for license details.
  3. type ComparableItem @doc(description: "Defines an object used to iterate through items for product comparisons.") {
  4. uid: ID! @doc(description: "The unique ID of an item in a compare list.")
  5. product: ProductInterface! @doc(description: "Details about a product in a compare list.")
  6. attributes: [ProductAttribute]! @doc(description: "An array of product attributes that can be used to compare products.")
  7. }
  8. type ProductAttribute @doc(description: "Contains a product attribute code and value.") {
  9. code: String! @doc(description: "The unique identifier for a product attribute code.")
  10. value: String! @doc(description:"The display value of the attribute.")
  11. }
  12. type ComparableAttribute @doc(description: "Contains an attribute code that is used for product comparisons.") {
  13. code: String! @doc(description: "An attribute code that is enabled for product comparisons.")
  14. label: String! @doc(description: "The label of the attribute code.")
  15. }
  16. type CompareList @doc(description: "Contains iterable information such as the array of items, the count, and attributes that represent the compare list.") {
  17. uid: ID! @doc(description: "The unique ID assigned to the compare list.")
  18. items: [ComparableItem] @doc(description: "An array of products to compare.")
  19. attributes: [ComparableAttribute] @doc(description: "An array of attributes that can be used for comparing products.")
  20. item_count: Int! @doc(description: "The number of items in the compare list.")
  21. }
  22. type Customer {
  23. compare_list: CompareList @resolver(class: "\\Magento\\CompareListGraphQl\\Model\\Resolver\\CustomerCompareList") @doc(description: "The contents of the customer's compare list.")
  24. }
  25. type Query {
  26. compareList(uid: ID! @doc(description: "The unique ID of the compare list to be queried.")): CompareList @resolver(class: "\\Magento\\CompareListGraphQl\\Model\\Resolver\\CompareList") @doc(description: "Return products that have been added to the specified compare list.")
  27. }
  28. type Mutation {
  29. createCompareList(input: CreateCompareListInput): CompareList @resolver(class: "\\Magento\\CompareListGraphQl\\Model\\Resolver\\CreateCompareList") @doc(description: "Create a new compare list. The compare list is saved for logged in customers.")
  30. addProductsToCompareList(input: AddProductsToCompareListInput @doc(description: "An input object that defines which products to add to an existing compare list.")): CompareList @resolver(class: "\\Magento\\CompareListGraphQl\\Model\\Resolver\\AddProductsToCompareList") @doc(description: "Add products to the specified compare list.")
  31. removeProductsFromCompareList(input: RemoveProductsFromCompareListInput @doc(description: "An input object that defines which products to remove from a compare list.")): CompareList @resolver(class: "\\Magento\\CompareListGraphQl\\Model\\Resolver\\RemoveProductsFromCompareList") @doc(description: "Remove products from the specified compare list.")
  32. assignCompareListToCustomer(uid: ID! @doc(description: "The unique ID of the compare list to be assigned.")): AssignCompareListToCustomerOutput @resolver(class: "\\Magento\\CompareListGraphQl\\Model\\Resolver\\AssignCompareListToCustomer") @doc(description: "Assign the specified compare list to the logged in customer.")
  33. deleteCompareList(uid: ID! @doc(description: "The unique ID of the compare list to be deleted.")): DeleteCompareListOutput @resolver(class: "\\Magento\\CompareListGraphQl\\Model\\Resolver\\DeleteCompareList") @doc(description: "Delete the specified compare list.")
  34. }
  35. input CreateCompareListInput @doc(description: "Contains an array of product IDs to use for creating a compare list.") {
  36. products: [ID!] @doc(description: "An array of product IDs to add to the compare list.")
  37. }
  38. input AddProductsToCompareListInput @doc(description: "Contains products to add to an existing compare list.") {
  39. uid: ID!, @doc(description: "The unique identifier of the compare list to modify.")
  40. products: [ID!]! @doc(description: "An array of product IDs to add to the compare list.")
  41. }
  42. input RemoveProductsFromCompareListInput @doc(description: "Defines which products to remove from a compare list.") {
  43. uid: ID!, @doc(description: "The unique identifier of the compare list to modify.")
  44. products: [ID!]! @doc(description: "An array of product IDs to remove from the compare list.")
  45. }
  46. type DeleteCompareListOutput @doc(description: "Contains the results of the request to delete a compare list.") {
  47. result: Boolean! @doc(description: "Indicates whether the compare list was successfully deleted.")
  48. }
  49. type AssignCompareListToCustomerOutput @doc(description: "Contains the results of the request to assign a compare list.") {
  50. result: Boolean! @doc(description: "Indicates whether the compare list was successfully assigned to the customer.")
  51. compare_list: CompareList @doc(description: "The contents of the customer's compare list.")
  52. }