Skip to content

Commit 3b13903

Browse files
committed
Merge remote-tracking branch 'origin/AC-9147' into spartans_pr_19012024
2 parents 03621bb + 2f199b5 commit 3b13903

File tree

12 files changed

+45
-21
lines changed

12 files changed

+45
-21
lines changed

app/code/Magento/CustomerGraphQl/etc/di.xml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,6 @@
3030
<item name="Magento\Customer\Model\Address" xsi:type="object">
3131
Magento\CustomerGraphQl\Model\Resolver\Cache\Customer\Address\TagsStrategy
3232
</item>
33-
<item name="Magento\Newsletter\Model\Subscriber" xsi:type="object">
34-
Magento\CustomerGraphQl\Model\Resolver\Cache\Subscriber\TagsStrategy
35-
</item>
3633
</argument>
3734
</arguments>
3835
</type>

app/code/Magento/CustomerGraphQl/etc/graphql/di.xml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -176,9 +176,6 @@
176176
<item name="Magento\CustomerGraphQl\Model\Resolver\Customer" xsi:type="string">
177177
Magento\CustomerGraphQl\Model\Resolver\Cache\Customer\ResolverCacheIdentity
178178
</item>
179-
<item name="Magento\CustomerGraphQl\Model\Resolver\IsSubscribed" xsi:type="string">
180-
Magento\CustomerGraphQl\Model\Resolver\Cache\Subscriber\ResolverCacheIdentity
181-
</item>
182179
</argument>
183180
</arguments>
184181
</type>
@@ -208,9 +205,6 @@
208205
<item name="Magento\CustomerGraphQl\Model\Resolver\Customer" xsi:type="array">
209206
<item name="current_customer_id" xsi:type="string">Magento\CustomerGraphQl\Model\Resolver\CacheKey\FactorProvider\CurrentCustomerId</item>
210207
</item>
211-
<item name="Magento\CustomerGraphQl\Model\Resolver\IsSubscribed" xsi:type="array">
212-
<item name="parent_customer_entity_id" xsi:type="string">Magento\CustomerGraphQl\Model\Resolver\CacheKey\FactorProvider\ParentCustomerEntityId</item>
213-
</item>
214208
</argument>
215209
</arguments>
216210
</type>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ type Customer @doc(description: "Defines the customer name, addresses, and other
136136
date_of_birth: String @doc(description: "The customer's date of birth.")
137137
taxvat: String @doc(description: "The customer's Value-added tax (VAT) number (for corporate customers).")
138138
id: Int @doc(description: "The ID assigned to the customer.") @deprecated(reason: "`id` is not needed as part of `Customer`, because on the server side, it can be identified based on the customer token used for authentication. There is no need to know customer ID on the client side.")
139-
is_subscribed: Boolean @doc(description: "Indicates whether the customer is subscribed to the company's newsletter.") @resolver(class: "\\Magento\\CustomerGraphQl\\Model\\Resolver\\IsSubscribed")
139+
is_subscribed: Boolean @doc(description: "Indicates whether the customer is subscribed to the company's newsletter.") @resolver(class: "\\Magento\\NewsletterGraphQl\\Model\\Resolver\\IsSubscribed")
140140
addresses: [CustomerAddress] @doc(description: "An array containing the customer's shipping and billing addresses.") @resolver(class: "\\Magento\\CustomerGraphQl\\Model\\Resolver\\CustomerAddresses")
141141
gender: Int @doc(description: "The customer's gender (Male - 1, Female - 2).")
142142
custom_attributes(attributeCodes: [ID!]): [AttributeValueInterface] @doc(description: "Customer's custom attributes.") @resolver(class: "Magento\\CustomerGraphQl\\Model\\Resolver\\CustomAttributeFilter")

app/code/Magento/CustomerGraphQl/Model/Resolver/Cache/Subscriber/ResolverCacheIdentity.php renamed to app/code/Magento/NewsletterGraphQl/Model/Resolver/Cache/Subscriber/ResolverCacheIdentity.php

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

8-
namespace Magento\CustomerGraphQl\Model\Resolver\Cache\Subscriber;
8+
namespace Magento\NewsletterGraphQl\Model\Resolver\Cache\Subscriber;
99

1010
use Magento\GraphQlResolverCache\Model\Resolver\Result\Cache\IdentityInterface;
1111

app/code/Magento/CustomerGraphQl/Model/Resolver/Cache/Subscriber/TagsStrategy.php renamed to app/code/Magento/NewsletterGraphQl/Model/Resolver/Cache/Subscriber/TagsStrategy.php

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

8-
namespace Magento\CustomerGraphQl\Model\Resolver\Cache\Subscriber;
8+
namespace Magento\NewsletterGraphQl\Model\Resolver\Cache\Subscriber;
99

1010
use Magento\Customer\Model\Customer;
1111
use Magento\Framework\App\Cache\Tag\StrategyInterface;

app/code/Magento/CustomerGraphQl/Model/Resolver/CacheKey/FactorProvider/ParentCustomerEntityId.php renamed to app/code/Magento/NewsletterGraphQl/Model/Resolver/CacheKey/FactorProvider/ParentCustomerEntityId.php

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

8-
namespace Magento\CustomerGraphQl\Model\Resolver\CacheKey\FactorProvider;
8+
namespace Magento\NewsletterGraphQl\Model\Resolver\CacheKey\FactorProvider;
99

1010
use Magento\Customer\Api\Data\CustomerInterface;
1111
use Magento\GraphQl\Model\Query\ContextInterface;

app/code/Magento/CustomerGraphQl/Model/Resolver/IsSubscribed.php renamed to app/code/Magento/NewsletterGraphQl/Model/Resolver/IsSubscribed.php

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

8-
namespace Magento\CustomerGraphQl\Model\Resolver;
8+
namespace Magento\NewsletterGraphQl\Model\Resolver;
99

1010
use Magento\Customer\Api\Data\CustomerInterface;
1111
use Magento\Framework\App\ObjectManager;

app/code/Magento/CustomerGraphQl/Test/Unit/Model/Resolver/IsSubscribedTest.php renamed to app/code/Magento/NewsletterGraphQl/Test/Unit/Model/Resolver/IsSubscribedTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66

77
declare(strict_types=1);
88

9-
namespace Magento\CustomerGraphQl\Test\Unit\Model\Resolver;
9+
namespace Magento\NewsletterGraphQl\Test\Unit\Model\Resolver;
1010

1111
use Magento\Customer\Api\Data\CustomerInterface;
12-
use Magento\CustomerGraphQl\Model\Resolver\IsSubscribed;
12+
use Magento\NewsletterGraphQl\Model\Resolver\IsSubscribed;
1313
use Magento\Framework\GraphQl\Config\Element\Field;
1414
use Magento\Framework\GraphQl\Schema\Type\ResolveInfo;
1515
use Magento\Framework\TestFramework\Unit\Helper\ObjectManager;

app/code/Magento/NewsletterGraphQl/composer.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,9 @@
1010
"magento/framework": "*",
1111
"magento/module-customer": "*",
1212
"magento/module-newsletter": "*",
13-
"magento/module-store": "*"
14-
},
15-
"suggest": {
16-
"magento/module-graph-ql": "*"
13+
"magento/module-store": "*",
14+
"magento/module-graph-ql": "*",
15+
"magento/module-graph-ql-resolver-cache": "*"
1716
},
1817
"license": [
1918
"OSL-3.0",
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
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:ObjectManager/etc/config.xsd">
9+
<type name="Magento\Framework\App\Cache\Tag\Strategy\Factory">
10+
<arguments>
11+
<argument name="customStrategies" xsi:type="array">
12+
<item name="Magento\Newsletter\Model\Subscriber" xsi:type="object">Magento\NewsletterGraphQl\Model\Resolver\Cache\Subscriber\TagsStrategy</item>
13+
</argument>
14+
</arguments>
15+
</type>
16+
</config>

0 commit comments

Comments
 (0)