Skip to content

Commit

Permalink
Applying schema suggestions
Browse files Browse the repository at this point in the history
Co-authored-by: Kevin Harper <keharper@users.noreply.github.com>
  • Loading branch information
eduard13 and keharper authored Aug 19, 2020
1 parent 1df4ca7 commit 1978ed8
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion app/code/Magento/BundleGraphQl/etc/schema.graphqls
Original file line number Diff line number Diff line change
Expand Up @@ -119,5 +119,5 @@ type ItemSelectedBundleOptionValue @doc(description: "A list of values for the s
}

type BundleWishlistItem implements WishlistItemInterface {
bundle_options: [SelectedBundleOption!] @doc(description: "An array containing information about the selected bundled items") @resolver(class: "\\Magento\\BundleGraphQl\\Model\\Wishlist\\BundleOptions")
bundle_options: [SelectedBundleOption!] @doc(description: "An array containing information about the selected bundle items") @resolver(class: "\\Magento\\BundleGraphQl\\Model\\Wishlist\\BundleOptions")
}
4 changes: 2 additions & 2 deletions app/code/Magento/CatalogGraphQl/etc/schema.graphqls
Original file line number Diff line number Diff line change
Expand Up @@ -493,8 +493,8 @@ type StoreConfig @doc(description: "The type contains information about a store
root_category_id: Int @doc(description: "The ID of the root category") @resolver(class: "Magento\\CatalogGraphQl\\Model\\Resolver\\RootCategoryId")
}

type SimpleWishlistItem implements WishlistItemInterface @doc(description: "Simple Wishlist Item") {
type SimpleWishlistItem implements WishlistItemInterface @doc(description: "A simple product wishlist Item") {
}

type VirtualWishlistItem implements WishlistItemInterface @doc(description: "Virtual Wishlist Item") {
type VirtualWishlistItem implements WishlistItemInterface @doc(description: "A virtual product wishlist item") {
}
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ type SelectedConfigurableOption {
value_label: String!
}

type ConfigurableWishlistItem implements WishlistItemInterface {
child_sku: String! @doc(description: "SKU of the simple product corresponding to a set of selected configurable options.") @resolver(class: "\\Magento\\ConfigurableProductGraphQl\\Model\\Wishlist\\ChildSku")
configurable_options: [SelectedConfigurableOption!] @resolver(class: "\\Magento\\ConfigurableProductGraphQl\\Model\\Wishlist\\ConfigurableOptions")
type ConfigurableWishlistItem implements WishlistItemInterface @doc(description: "A configurable product wishlist item"){
child_sku: String! @doc(description: "The SKU of the simple product corresponding to a set of selected configurable options") @resolver(class: "\\Magento\\ConfigurableProductGraphQl\\Model\\Wishlist\\ChildSku")
configurable_options: [SelectedConfigurableOption!] @resolver(class: "\\Magento\\ConfigurableProductGraphQl\\Model\\Wishlist\\ConfigurableOptions") @doc (description: "An array of selected configurable options")
}
4 changes: 2 additions & 2 deletions app/code/Magento/DownloadableGraphQl/etc/schema.graphqls
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ type DownloadableProductSamples @doc(description: "DownloadableProductSamples de
sample_file: String @deprecated(reason: "`sample_url` serves to get the downloadable sample")
}

type DownloadableWishlistItem implements WishlistItemInterface @doc(description: "Downloadable Wishlist Item") {
type DownloadableWishlistItem implements WishlistItemInterface @doc(description: "A downloadable product wishlist item") {
links_v2: [DownloadableProductLinks] @doc(description: "An array containing information about the selected links") @resolver(class: "\\Magento\\DownloadableGraphQl\\Model\\Wishlist\\ItemLinks")
samples: [DownloadableProductSamples] @doc(description: "DownloadableProductSamples defines characteristics of a downloadable product") @resolver(class: "Magento\\DownloadableGraphQl\\Resolver\\Product\\Samples")
samples: [DownloadableProductSamples] @doc(description: "An array containing information about the selected samples") @resolver(class: "Magento\\DownloadableGraphQl\\Resolver\\Product\\Samples")
}
20 changes: 10 additions & 10 deletions app/code/Magento/WishlistGraphQl/etc/schema.graphqls
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ type Customer {
wishlists(
pageSize: Int = 20 @doc(description: "Specifies the maximum number of results to return at once. This attribute is optional."),
currentPage: Int = 1 @doc(description: "Specifies which page of results to return. The default value is 1.")
): [Wishlist!]! @doc(description: "Customer wishlists are limited to a max of 1 wishlist in Magento Open Source") @resolver(class:"\\Magento\\WishlistGraphQl\\Model\\Resolver\\CustomerWishlists")
wishlist: Wishlist! @deprecated(reason: "Use `Customer.wishlists` or `Customer.wishlist_v2`") @resolver(class:"\\Magento\\WishlistGraphQl\\Model\\Resolver\\CustomerWishlistResolver") @doc(description: "Contains the contents of a customer's wish lists") @cache(cacheable: false)
wishlist_v2(id: ID!): Wishlist @doc(description: "Get the customer's wishlist by an ID") @resolver(class: "\\Magento\\WishlistGraphQl\\Model\\Resolver\\WishlistById")
): [Wishlist!]! @doc(description: "An array of wishlists. In Magento Open Source, customers are limited to one wishlist. The number of wishlists is not restricted for Magento Commerce") @resolver(class:"\\Magento\\WishlistGraphQl\\Model\\Resolver\\CustomerWishlists")
wishlist: Wishlist! @deprecated(reason: "Use `Customer.wishlists` or `Customer.wishlist_v2`") @resolver(class:"\\Magento\\WishlistGraphQl\\Model\\Resolver\\CustomerWishlistResolver") @doc(description: "Contains a customer's wish lists") @cache(cacheable: false)
wishlist_v2(id: ID!): Wishlist @doc(description: "Retrieve the specified wishlist") @resolver(class: "\\Magento\\WishlistGraphQl\\Model\\Resolver\\WishlistById")
}

type WishlistOutput @doc(description: "Deprecated: `Wishlist` type should be used instead") {
Expand All @@ -25,19 +25,19 @@ type WishlistOutput @doc(description: "Deprecated: `Wishlist` type should be use
type Wishlist {
id: ID @doc(description: "Wishlist unique identifier")
items: [WishlistItem] @resolver(class: "\\Magento\\WishlistGraphQl\\Model\\Resolver\\WishlistItemsResolver") @deprecated(reason: "Use field `items_v2` from type `Wishlist` instead")
items_v2: [WishlistItemInterface] @resolver(class: "\\Magento\\WishlistGraphQl\\Model\\Resolver\\WishlistItems") @doc(description: "An array of items in the customer's wishlist")
items_v2: [WishlistItemInterface] @resolver(class: "\\Magento\\WishlistGraphQl\\Model\\Resolver\\WishlistItems") @doc(description: "An array of items in the customer's wish list")
items_count: Int @doc(description: "The number of items in the wish list")
sharing_code: String @doc(description: "An encrypted code that Magento uses to link to the wish list")
updated_at: String @doc(description: "The time of the last modification to the wish list")
}

interface WishlistItemInterface @typeResolver(class: "Magento\\WishlistGraphQl\\Model\\Resolver\\Type\\WishlistItemType") {
id: ID
quantity: Float
description: String
added_at: String
product: ProductInterface @resolver(class: "\\Magento\\WishlistGraphQl\\Model\\Resolver\\ProductResolver")
customizable_options: [SelectedCustomizableOption]
id: ID @doc(description: "The ID of the wish list item")
quantity: Float @doc(description: "The quantity of this wish list item")
description: String @doc(description: "The description of the item")
added_at: String @doc(description: "The date and time the item was added to the wish list")
product: ProductInterface @doc(description: "Product details of the wish list item") @resolver(class: "\\Magento\\WishlistGraphQl\\Model\\Resolver\\ProductResolver")
customizable_options: [SelectedCustomizableOption] @doc(description: "Custom options selected for the wish list item")
}

type WishlistItem {
Expand Down

0 comments on commit 1978ed8

Please sign in to comment.