Skip to content

Commit 31a6cd7

Browse files
🔃 [Magento Community Engineering] Community Contributions
Accepted Community Pull Requests:
2 parents 71d6954 + af6d0c7 commit 31a6cd7

File tree

25 files changed

+486
-46
lines changed

25 files changed

+486
-46
lines changed

app/code/Magento/ConfigurableProductGraphQl/etc/module.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
<module name="Magento_ConfigurableProduct"/>
1313
<module name="Magento_GraphQl"/>
1414
<module name="Magento_CatalogGraphQl"/>
15+
<module name="Magento_QuoteGraphQl"/>
1516
</sequence>
1617
</module>
1718
</config>

app/code/Magento/DownloadableGraphQl/Resolver/Customer/DownloadableProducts.php renamed to app/code/Magento/CustomerDownloadableGraphQl/Model/Resolver/CustomerDownloadableProducts.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*/
66
declare(strict_types=1);
77

8-
namespace Magento\DownloadableGraphQl\Resolver\Customer;
8+
namespace Magento\CustomerDownloadableGraphQl\Model\Resolver;
99

1010
use Magento\DownloadableGraphQl\Model\ResourceModel\GetPurchasedDownloadableProducts;
1111
use Magento\Framework\GraphQl\Exception\GraphQlAuthorizationException;
@@ -20,7 +20,7 @@
2020
*
2121
* Returns available downloadable products for customer
2222
*/
23-
class DownloadableProducts implements ResolverInterface
23+
class CustomerDownloadableProducts implements ResolverInterface
2424
{
2525
/**
2626
* @var GetPurchasedDownloadableProducts
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# DownloadableGraphQl
2+
3+
**CustomerDownloadableGraphQl** provides type and resolver information for the GraphQl module
4+
to generate downloadable product information.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Downloadable Graph Ql Functional Tests
2+
3+
The Functional Test Module for **Magento Customer Downloadable Graph Ql** module.
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"name": "magento/module-customer-downloadable-graph-ql",
3+
"description": "N/A",
4+
"type": "magento2-module",
5+
"require": {
6+
"php": "~7.1.3||~7.2.0||~7.3.0",
7+
"magento/module-downloadable-graph-ql": "*",
8+
"magento/module-graph-ql": "*",
9+
"magento/framework": "*"
10+
},
11+
"suggest": {
12+
"magento/module-catalog-graph-ql": "*"
13+
},
14+
"license": [
15+
"OSL-3.0",
16+
"AFL-3.0"
17+
],
18+
"autoload": {
19+
"files": [
20+
"registration.php"
21+
],
22+
"psr-4": {
23+
"Magento\\CustomerDownloadableGraphQl\\": ""
24+
}
25+
}
26+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?xml version="1.0"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
9+
<module name="Magento_CustomerDownloadableGraphQl" >
10+
<sequence>
11+
<module name="Magento_GraphQl"/>
12+
<module name="Magento_DownloadableGraphQl"/>
13+
</sequence>
14+
</module>
15+
</config>
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Copyright © Magento, Inc. All rights reserved.
2+
# See COPYING.txt for license details.
3+
4+
type Query {
5+
customerDownloadableProducts: CustomerDownloadableProducts @resolver(class: "Magento\\CustomerDownloadableGraphQl\\Model\\Resolver\\CustomerDownloadableProducts") @doc(description: "The query returns the contents of a customer's downloadable products") @cache(cacheable: false)
6+
}
7+
8+
type CustomerDownloadableProducts {
9+
items: [CustomerDownloadableProduct] @doc(description: "List of purchased downloadable items")
10+
}
11+
12+
type CustomerDownloadableProduct {
13+
order_increment_id: String
14+
date: String
15+
status: String
16+
download_url: String
17+
remaining_downloads: String
18+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
7+
use Magento\Framework\Component\ComponentRegistrar;
8+
9+
ComponentRegistrar::register(ComponentRegistrar::MODULE, 'Magento_CustomerDownloadableGraphQl', __DIR__);

app/code/Magento/DownloadableGraphQl/composer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
"php": "~7.1.3||~7.2.0||~7.3.0",
77
"magento/module-catalog": "*",
88
"magento/module-downloadable": "*",
9-
"magento/module-graph-ql": "*",
109
"magento/module-quote": "*",
1110
"magento/module-quote-graph-ql": "*",
1211
"magento/framework": "*"

app/code/Magento/DownloadableGraphQl/etc/schema.graphqls

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
# Copyright © Magento, Inc. All rights reserved.
22
# See COPYING.txt for license details.
33

4-
type Query {
5-
customerDownloadableProducts: CustomerDownloadableProducts @resolver(class: "Magento\\DownloadableGraphQl\\Resolver\\Customer\\DownloadableProducts") @doc(description: "The query returns the contents of a customer's downloadable products") @cache(cacheable: false)
6-
}
7-
84
type Mutation {
95
addDownloadableProductsToCart(input: AddDownloadableProductsToCartInput): AddDownloadableProductsToCartOutput @resolver(class: "Magento\\QuoteGraphQl\\Model\\Resolver\\AddSimpleProductsToCart")
106
}
@@ -34,18 +30,6 @@ type DownloadableCartItem implements CartItemInterface @doc(description: "Downlo
3430
samples: [DownloadableProductSamples] @resolver(class: "Magento\\DownloadableGraphQl\\Resolver\\DownloadableCartItem\\Samples") @doc(description: "DownloadableProductSamples defines characteristics of a downloadable product")
3531
}
3632

37-
type CustomerDownloadableProducts {
38-
items: [CustomerDownloadableProduct] @doc(description: "List of purchased downloadable items")
39-
}
40-
41-
type CustomerDownloadableProduct {
42-
order_increment_id: String
43-
date: String
44-
status: String
45-
download_url: String
46-
remaining_downloads: String
47-
}
48-
4933
type DownloadableProduct implements ProductInterface, CustomizableProductInterface @doc(description: "DownloadableProduct defines a product that the customer downloads") {
5034
downloadable_product_samples: [DownloadableProductSamples] @resolver(class: "Magento\\DownloadableGraphQl\\Resolver\\Product\\Samples") @doc(description: "An array containing information about samples of this downloadable product.")
5135
downloadable_product_links: [DownloadableProductLinks] @resolver(class: "Magento\\DownloadableGraphQl\\Resolver\\Product\\Links") @doc(description: "An array containing information about the links for this downloadable product")

0 commit comments

Comments
 (0)