1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# Copyright © Magento, Inc. All rights reserved.
# See COPYING.txt for license details.
type Query {
customerDownloadableProducts: CustomerDownloadableProducts @resolver(class: "Magento\\DownloadableGraphQl\\Model\\Resolver\\CustomerDownloadableProducts") @doc(description: "The query returns the contents of a customer's downloadable products")
}
type CustomerDownloadableProducts {
items: [CustomerDownloadableProduct] @doc(description: "List of purchased downloadable items")
}
type CustomerDownloadableProduct {
order_increment_id: String
date: String
status: String
download_url: String
remaining_downloads: String
}
type DownloadableProduct implements ProductInterface, CustomizableProductInterface @doc(description: "DownloadableProduct defines a product that the customer downloads") {
downloadable_product_samples: [DownloadableProductSamples] @resolver(class: "Magento\\DownloadableGraphQl\\Model\\Resolver\\Product\\DownloadableOptions") @doc(description: "An array containing information about samples of this downloadable product.")
downloadable_product_links: [DownloadableProductLinks] @resolver(class: "Magento\\DownloadableGraphQl\\Model\\Resolver\\Product\\DownloadableOptions") @doc(description: "An array containing information about the links for this downloadable product")
links_purchased_separately: Int @doc(description: "A value of 1 indicates that each link in the array must be purchased separately")
links_title: String @doc(description: "The heading above the list of downloadable products")
}
enum DownloadableFileTypeEnum @doc(description: "This enumeration specifies whether a link or sample is a file or URL") {
FILE
URL
}
type DownloadableProductLinks @doc(description: "DownloadableProductLinks defines characteristics of a downloadable product") {
id: Int @doc(description: "The unique ID for the link to the downloadable product")
title: String @doc(description: "The display name of the link")
sort_order: Int @doc(description: "A number indicating the sort order")
is_shareable: Boolean @doc(description: "Indicates whether the link is shareable")
price: Float @doc(description: "The price of the downloadable product")
number_of_downloads: Int @doc(description: "The maximum number of times the product can be downloaded. A value of 0 means unlimited.")
link_type: DownloadableFileTypeEnum @doc(description: "Either FILE or URL")
sample_type: DownloadableFileTypeEnum @doc(description: "Either FILE or URL")
sample_file: String @doc(description: "The relative path to the downloadable sample")
sample_url: String @doc(description: "The relative URL to the downloadable sample")
}
type DownloadableProductSamples @doc(description: "DownloadableProductSamples defines characteristics of a downloadable product") {
id: Int @doc(description: "The unique ID for the downloadable product sample")
title: String @doc(description: "The display name of the sample")
sort_order: Int @doc(description: "A number indicating the sort order")
sample_type: DownloadableFileTypeEnum @doc(description: "Either FILE or URL")
sample_file: String @doc(description: "The relative path to the downloadable sample")
sample_url: String @doc(description: "The relative URL to the downloadable sample")
}