diff --git a/vendor/magento/module-catalog-rule/Model/Config/CatalogRule.php b/vendor/magento/module-catalog-rule/Model/Config/CatalogRule.php deleted file mode 100644 index 4a87a8a851d71..0000000000000 --- a/vendor/magento/module-catalog-rule/Model/Config/CatalogRule.php +++ /dev/null @@ -1,46 +0,0 @@ -scopeConfig->isSetFlag(self::XML_PATH_SHARE_ALL_CATALOG_RULES); - } - - /** - * Is 'share_applied_catalog_rules' config enabled - * - * @return bool - */ - public function isShareAppliedCatalogRulesEnabled(): bool - { - return $this->scopeConfig->isSetFlag(self::XML_PATH_SHARE_APPLIED_CATALOG_RULES); - } -} diff --git a/vendor/magento/module-catalog-rule/Model/ResourceModel/GetAllCatalogRules.php b/vendor/magento/module-catalog-rule/Model/ResourceModel/GetAllCatalogRules.php deleted file mode 100644 index b9f7744f6201e..0000000000000 --- a/vendor/magento/module-catalog-rule/Model/ResourceModel/GetAllCatalogRules.php +++ /dev/null @@ -1,56 +0,0 @@ -resourceConnection->getConnection(); - $linkField = $this->metadataPool->getMetadata(RuleInterface::class)->getLinkField(); - - return $connection->fetchAll( - $connection->select() - ->from( - ['cr' => $this->resourceConnection->getTableName('catalogrule')], - ['name'] - ) - ->join( - ['crw' => $this->resourceConnection->getTableName('catalogrule_website')], - "cr.rule_id = crw.$linkField", - ) - ->reset('columns') - ->columns(['name']) - ->distinct(true) - ->where('cr.is_active = ?', 1) - ->where('crw.website_id = ?', $websiteId) - ) ?? []; - } -} diff --git a/vendor/magento/module-catalog-rule/Model/ResourceModel/GetAppliedCatalogRules.php b/vendor/magento/module-catalog-rule/Model/ResourceModel/GetAppliedCatalogRules.php deleted file mode 100644 index aa12a1a66de46..0000000000000 --- a/vendor/magento/module-catalog-rule/Model/ResourceModel/GetAppliedCatalogRules.php +++ /dev/null @@ -1,62 +0,0 @@ -resourceConnection->getConnection(); - $linkField = $this->metadataPool->getMetadata(RuleInterface::class)->getLinkField(); - - return $connection->fetchAll( - $connection->select() - ->from( - ['cr' => $this->resourceConnection->getTableName('catalogrule')], - ['name'] - ) - ->join( - ['crp' => $this->resourceConnection->getTableName('catalogrule_product')], - 'crp.rule_id = cr.rule_id', - ) - ->join( - ['crw' => $this->resourceConnection->getTableName('catalogrule_website')], - "cr.rule_id = crw.$linkField", - ) - ->reset('columns') - ->columns(['name']) - ->distinct(true) - ->where('cr.is_active = ?', 1) - ->where('crp.product_id = ?', $productId) - ->where('crw.website_id = ?', $websiteId) - ) ?? []; - } -} diff --git a/vendor/magento/module-catalog-rule/etc/adminhtml/system.xml b/vendor/magento/module-catalog-rule/etc/adminhtml/system.xml deleted file mode 100644 index 5a14982e44d8e..0000000000000 --- a/vendor/magento/module-catalog-rule/etc/adminhtml/system.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - -
- - - - - Magento\Config\Model\Config\Source\Yesno - Option to disable providing Catalog Rules details via GraphQl - - - - Magento\Config\Model\Config\Source\Yesno - Option to disable providing Applied Catalog Rules details via GraphQl - - -
-
-
diff --git a/vendor/magento/module-catalog-rule/etc/config.xml b/vendor/magento/module-catalog-rule/etc/config.xml deleted file mode 100644 index 42a4966e9b026..0000000000000 --- a/vendor/magento/module-catalog-rule/etc/config.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - 1 - 1 - - - - diff --git a/vendor/magento/module-catalog-rule-graph-ql/Model/Resolver/AllCatalogRules.php b/vendor/magento/module-catalog-rule-graph-ql/Model/Resolver/AllCatalogRules.php deleted file mode 100644 index 2032d0fd1d997..0000000000000 --- a/vendor/magento/module-catalog-rule-graph-ql/Model/Resolver/AllCatalogRules.php +++ /dev/null @@ -1,55 +0,0 @@ -config->isShareAllCatalogRulesEnabled()) { - throw new GraphQlInputException(__('Sharing catalog rules information is disabled or not configured.')); - } - - return array_map( - fn ($rule) => ['name' => $rule['name']], - $this->getAllCatalogRules->execute( - (int)$context->getExtensionAttributes()->getStore()->getWebsiteId() - ) - ); - } -} diff --git a/vendor/magento/module-catalog-rule-graph-ql/Model/Resolver/AppliedCatalogRules.php b/vendor/magento/module-catalog-rule-graph-ql/Model/Resolver/AppliedCatalogRules.php deleted file mode 100644 index aee83683af0e9..0000000000000 --- a/vendor/magento/module-catalog-rule-graph-ql/Model/Resolver/AppliedCatalogRules.php +++ /dev/null @@ -1,60 +0,0 @@ -config->isShareAppliedCatalogRulesEnabled()) { - return null; //Returning `null` to ensure that the entire product response remains intact. - } - - return array_map( - fn ($rule) => ['name' => $rule['name']], - $this->getAppliedCatalogRules->execute( - (int)$value['model']->getId(), - (int)$context->getExtensionAttributes()->getStore()->getWebsiteId() - ) - ); - } -} diff --git a/vendor/magento/module-catalog-rule-graph-ql/etc/graphql/di.xml b/vendor/magento/module-catalog-rule-graph-ql/etc/graphql/di.xml index 1363b1450a4db..104f85c030a1d 100644 --- a/vendor/magento/module-catalog-rule-graph-ql/etc/graphql/di.xml +++ b/vendor/magento/module-catalog-rule-graph-ql/etc/graphql/di.xml @@ -9,12 +9,4 @@ - - - - catalog/rule/share_all_catalog_rules - catalog/rule/share_applied_catalog_rules - - - diff --git a/vendor/magento/module-catalog-rule-graph-ql/etc/schema.graphqls b/vendor/magento/module-catalog-rule-graph-ql/etc/schema.graphqls deleted file mode 100644 index fd445c5e27365..0000000000000 --- a/vendor/magento/module-catalog-rule-graph-ql/etc/schema.graphqls +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright 2025 Adobe -# All Rights Reserved. - -type StoreConfig { - share_all_catalog_rules: Boolean! @doc(description: "Configuration data from catalog/rule/share_all_catalog_rules") - share_applied_catalog_rules: Boolean! @doc(description: "Configuration data from catalog/rule/share_applied_catalog_rules") -} - -type Query { - allCatalogRules: [CatalogRule!] @doc(description: "Provides all active catalog rules in the store.") @resolver(class: "Magento\\CatalogRuleGraphQl\\Model\\Resolver\\AllCatalogRules") -} - -interface ProductInterface { - rules: [CatalogRule!] @doc(description: "Provides applied catalog rules in the current active cart") @resolver(class: "Magento\\CatalogRuleGraphQl\\Model\\Resolver\\AppliedCatalogRules") -} - -type CatalogRule { - name: String! @doc(description: "Name of the catalog rule") -} diff --git a/vendor/magento/module-customer/Model/Config/AccountInformation.php b/vendor/magento/module-customer/Model/Config/AccountInformation.php deleted file mode 100644 index 3120a3123a55e..0000000000000 --- a/vendor/magento/module-customer/Model/Config/AccountInformation.php +++ /dev/null @@ -1,46 +0,0 @@ -scopeConfig->isSetFlag(self::XML_PATH_SHARE_ALL_CUSTOMER_GROUPS); - } - - /** - * Is 'graphql_share_customer_group' config enabled - * - * @return bool - */ - public function isShareCustomerGroupEnabled(): bool - { - return $this->scopeConfig->isSetFlag(self::XML_PATH_SHARE_CUSTOMER_GROUP); - } -} diff --git a/vendor/magento/module-customer/etc/adminhtml/system.xml b/vendor/magento/module-customer/etc/adminhtml/system.xml index c260cb6572ac2..80dab3dc33181 100644 --- a/vendor/magento/module-customer/etc/adminhtml/system.xml +++ b/vendor/magento/module-customer/etc/adminhtml/system.xml @@ -197,16 +197,6 @@ Magento\Config\Model\Config\Source\Yesno - - - Magento\Config\Model\Config\Source\Yesno - Option to disable providing all customer group details via GraphQl - - - - Magento\Config\Model\Config\Source\Yesno - Option to disable providing customer group details via GraphQl for a customer - diff --git a/vendor/magento/module-customer/etc/config.xml b/vendor/magento/module-customer/etc/config.xml index 6164cb5a2c7d1..a14c98b491e75 100644 --- a/vendor/magento/module-customer/etc/config.xml +++ b/vendor/magento/module-customer/etc/config.xml @@ -33,8 +33,6 @@ customer_account_information_change_email_template customer_account_information_change_email_and_password_template 0 - 1 - 1 support diff --git a/vendor/magento/module-customer-graph-ql/Model/Resolver/AllCustomerGroups.php b/vendor/magento/module-customer-graph-ql/Model/Resolver/AllCustomerGroups.php deleted file mode 100644 index 2d44c2071666e..0000000000000 --- a/vendor/magento/module-customer-graph-ql/Model/Resolver/AllCustomerGroups.php +++ /dev/null @@ -1,71 +0,0 @@ -config->isShareAllCustomerGroupsEnabled()) { - throw new GraphQlInputException(__('Sharing customer group information is disabled or not configured.')); - } - - try { - $customerGroups = $this->groupRepository->getList( - $this->searchCriteriaBuilder->create() - )->getItems(); - } catch (Exception $e) { - throw new GraphQlInputException(__('Unable to retrieve customer groups.')); - } - - return array_map( - fn ($group) => ['name' => $group->getCode()], - array_filter( - $customerGroups, - fn ($group) => !in_array( - (int)$context->getExtensionAttributes()->getStore()->getWebsiteId(), - $group->getExtensionAttributes()->getExcludeWebsiteIds() ?? [] - ) - ) - ); - } -} diff --git a/vendor/magento/module-customer-graph-ql/Model/Resolver/CustomerGroup.php b/vendor/magento/module-customer-graph-ql/Model/Resolver/CustomerGroup.php deleted file mode 100644 index 007de18ba9b10..0000000000000 --- a/vendor/magento/module-customer-graph-ql/Model/Resolver/CustomerGroup.php +++ /dev/null @@ -1,55 +0,0 @@ -config->isShareCustomerGroupEnabled() ? null : - $this->getCustomerGroup->execute( - (int) $value['model']->getGroupId(), - (int) $context->getExtensionAttributes()->getStore()->getWebsiteId() - ); - } -} diff --git a/vendor/magento/module-customer-graph-ql/Model/Resolver/GetCustomerGroup.php b/vendor/magento/module-customer-graph-ql/Model/Resolver/GetCustomerGroup.php deleted file mode 100644 index f84bbb1abe5a2..0000000000000 --- a/vendor/magento/module-customer-graph-ql/Model/Resolver/GetCustomerGroup.php +++ /dev/null @@ -1,56 +0,0 @@ -config->isShareCustomerGroupEnabled()) { - throw new GraphQlInputException(__('Sharing customer group information is disabled or not configured.')); - } - - return $this->getCustomerGroup->execute( - $this->customerGroup->execute($context->getUserId()), - (int)$context->getExtensionAttributes()->getStore()->getWebsiteId() - ); - } -} diff --git a/vendor/magento/module-customer-graph-ql/etc/graphql/di.xml b/vendor/magento/module-customer-graph-ql/etc/graphql/di.xml index d8db127361247..ff63736629497 100644 --- a/vendor/magento/module-customer-graph-ql/etc/graphql/di.xml +++ b/vendor/magento/module-customer-graph-ql/etc/graphql/di.xml @@ -38,8 +38,6 @@ customer/password/minimum_password_length customer/password/autocomplete_on_storefront customer/create_account/confirm - customer/account_information/graphql_share_all_customer_groups - customer/account_information/graphql_share_customer_group diff --git a/vendor/magento/module-customer-graph-ql/etc/schema.graphqls b/vendor/magento/module-customer-graph-ql/etc/schema.graphqls index abb8c968b6d1e..c62c9dd73c943 100644 --- a/vendor/magento/module-customer-graph-ql/etc/schema.graphqls +++ b/vendor/magento/module-customer-graph-ql/etc/schema.graphqls @@ -6,8 +6,6 @@ type StoreConfig { minimum_password_length : String @doc(description: "The minimum number of characters required for a valid password.") autocomplete_on_storefront : Boolean @doc(description: "Indicates whether to enable autocomplete on login and forgot password forms.") create_account_confirmation: Boolean @doc(description: "Indicates if the new accounts need confirmation.") - graphql_share_all_customer_groups: Boolean! @doc(description: "Configuration data from customer/account_information/graphql_share_all_customer_groups") - graphql_share_customer_group: Boolean! @doc(description: "Configuration data from customer/account_information/graphql_share_customer_group") } type Query { @@ -15,8 +13,6 @@ type Query { isEmailAvailable ( email: String! @doc(description: "The email address to check.") ): IsEmailAvailableOutput @resolver(class: "Magento\\CustomerGraphQl\\Model\\Resolver\\IsEmailAvailable") @doc(description: "Check whether the specified email has already been used to create a customer account.") - allCustomerGroups: [CustomerGroup!] @doc(description: "An array containing a list of all Customer Groups available.") @resolver(class: "\\Magento\\CustomerGraphQl\\Model\\Resolver\\AllCustomerGroups") - customerGroup: CustomerGroup! @doc(description: "Provides name of the Customer Group assigned to the Customer or Guest.") @resolver(class: "\\Magento\\CustomerGraphQl\\Model\\Resolver\\GetCustomerGroup") } type Mutation { @@ -157,7 +153,6 @@ type Customer @doc(description: "Defines the customer name, addresses, and other gender: Int @doc(description: "The customer's gender (Male - 1, Female - 2).") custom_attributes(attributeCodes: [ID!]): [AttributeValueInterface] @doc(description: "Customer's custom attributes.") @resolver(class: "Magento\\CustomerGraphQl\\Model\\Resolver\\CustomAttributeFilter") confirmation_status: ConfirmationStatusEnum! @doc(description: "The customer's confirmation status.") @resolver(class: "Magento\\CustomerGraphQl\\Model\\Resolver\\ConfirmationStatus") - group: CustomerGroup @doc(description: "Name of the customer group assigned to the customer") @resolver(class: "\\Magento\\CustomerGraphQl\\Model\\Resolver\\CustomerGroup") } type CustomerAddresses { @@ -496,7 +491,3 @@ enum ConfirmationStatusEnum @doc(description: "List of account confirmation stat ACCOUNT_CONFIRMED @doc(description: "Account confirmed") ACCOUNT_CONFIRMATION_NOT_REQUIRED @doc(description: "Account confirmation not required") } - -type CustomerGroup @doc(description: "Data of customer group.") { - name: String @doc(description: "The name of customer group.") -} diff --git a/vendor/magento/module-sales-rule/Model/Config/Coupon.php b/vendor/magento/module-sales-rule/Model/Config/Coupon.php deleted file mode 100644 index c3f0b9dbf843d..0000000000000 --- a/vendor/magento/module-sales-rule/Model/Config/Coupon.php +++ /dev/null @@ -1,53 +0,0 @@ -scopeConfig->isSetFlag( - self::XML_PATH_PROMO_GRAPHQL_SHARE_ALL_RULES, - ScopeInterface::SCOPE_STORE - ); - } - - /** - * Get share currently applied sales rule flag value - * - * @return bool - */ - public function isShareAppliedSalesRulesEnabled(): bool - { - return $this->scopeConfig->isSetFlag( - self::XML_PATH_PROMO_GRAPHQL_SHARE_APPLIED_RULES, - ScopeInterface::SCOPE_STORE - ); - } -} diff --git a/vendor/magento/module-sales-rule/Model/ResourceModel/GetAllCartRules.php b/vendor/magento/module-sales-rule/Model/ResourceModel/GetAllCartRules.php deleted file mode 100644 index 36472aebc01b0..0000000000000 --- a/vendor/magento/module-sales-rule/Model/ResourceModel/GetAllCartRules.php +++ /dev/null @@ -1,59 +0,0 @@ -resourceConnection->getConnection(); - $linkField = $this->metadataPool->getMetadata(RuleInterface::class)->getLinkField(); - - return $connection->fetchAll( - $connection->select() - ->from(['sr' => $this->resourceConnection->getTableName('salesrule')]) - ->reset('columns') - ->columns(['name']) - ->join( - ['srw' => $this->resourceConnection->getTableName('salesrule_website')], - "sr.rule_id = srw.$linkField", - [] - ) - ->where('sr.is_active = ?', 1) - ->where( - 'srw.website_id = ?', - (int)$context->getExtensionAttributes()->getStore()->getWebsiteId() - ) - ) ?? []; - } -} diff --git a/vendor/magento/module-sales-rule/Model/ResourceModel/GetAppliedCartRules.php b/vendor/magento/module-sales-rule/Model/ResourceModel/GetAppliedCartRules.php deleted file mode 100644 index ac28257b1400f..0000000000000 --- a/vendor/magento/module-sales-rule/Model/ResourceModel/GetAppliedCartRules.php +++ /dev/null @@ -1,61 +0,0 @@ -resourceConnection->getConnection(); - $linkField = $this->metadataPool->getMetadata(RuleInterface::class)->getLinkField(); - - return $connection->fetchAll( - $connection->select() - ->from(['sr' => $this->resourceConnection->getTableName('salesrule')]) - ->reset('columns') - ->columns(['name']) - ->join( - ['srw' => $this->resourceConnection->getTableName('salesrule_website')], - "sr.rule_id = srw.$linkField", - [] - ) - ->where('sr.is_active = ?', 1) - ->where('sr.rule_id IN (?)', explode(',', $ruleIds)) - ->where( - 'srw.website_id = ?', - (int)$context->getExtensionAttributes()->getStore()->getWebsiteId() - ) - ) ?? []; - } -} diff --git a/vendor/magento/module-sales-rule/etc/adminhtml/system.xml b/vendor/magento/module-sales-rule/etc/adminhtml/system.xml index 7dc6e1f9278d1..7a0ced76843a9 100755 --- a/vendor/magento/module-sales-rule/etc/adminhtml/system.xml +++ b/vendor/magento/module-sales-rule/etc/adminhtml/system.xml @@ -40,19 +40,6 @@ validate-digits - - - - - Magento\Config\Model\Config\Source\Yesno - Configuration to allow to disable providing all cart rules via GraphQL - - - - Magento\Config\Model\Config\Source\Yesno - Configuration to allow to disable currently applied sales rules for cart via GraphQL - -
diff --git a/vendor/magento/module-sales-rule/etc/config.xml b/vendor/magento/module-sales-rule/etc/config.xml index a488790457a7d..d39f5f81039de 100755 --- a/vendor/magento/module-sales-rule/etc/config.xml +++ b/vendor/magento/module-sales-rule/etc/config.xml @@ -13,10 +13,6 @@ 250000 1 - - 1 - 1 - diff --git a/vendor/magento/module-sales-rule-graph-ql/Model/Resolver/AllCartRules.php b/vendor/magento/module-sales-rule-graph-ql/Model/Resolver/AllCartRules.php deleted file mode 100644 index 6ae43d35c556c..0000000000000 --- a/vendor/magento/module-sales-rule-graph-ql/Model/Resolver/AllCartRules.php +++ /dev/null @@ -1,50 +0,0 @@ -config->isShareAllSalesRulesEnabled()) { - throw new GraphQlInputException(__('Sharing Cart Rules information is disabled or not configured.')); - } - - return array_map( - static fn ($rule) => ['name' => $rule['name']], - $this->getAllCartRules->execute($context) - ); - } -} diff --git a/vendor/magento/module-sales-rule-graph-ql/Model/Resolver/AppliedCartRules.php b/vendor/magento/module-sales-rule-graph-ql/Model/Resolver/AppliedCartRules.php deleted file mode 100644 index 106e77f4cf3f2..0000000000000 --- a/vendor/magento/module-sales-rule-graph-ql/Model/Resolver/AppliedCartRules.php +++ /dev/null @@ -1,57 +0,0 @@ -config->isShareAppliedSalesRulesEnabled()) { - return null; //returning null so that whole cart response is not broken - } - - $ruleIds = $value['model']->getAppliedRuleIds(); - - return $ruleIds ? array_map( - fn ($rule) => ['name' => $rule['name']], - $this->getAppliedCartRules->execute($ruleIds, $context) - ) : []; - } -} diff --git a/vendor/magento/module-sales-rule-graph-ql/etc/graphql/di.xml b/vendor/magento/module-sales-rule-graph-ql/etc/graphql/di.xml deleted file mode 100644 index 066640e3e4635..0000000000000 --- a/vendor/magento/module-sales-rule-graph-ql/etc/graphql/di.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - promo/graphql/share_all_sales_rule - promo/graphql/share_applied_sales_rule - - - - diff --git a/vendor/magento/module-sales-rule-graph-ql/etc/schema.graphqls b/vendor/magento/module-sales-rule-graph-ql/etc/schema.graphqls index 6bac9c7767c1c..d7fbc345ea87f 100644 --- a/vendor/magento/module-sales-rule-graph-ql/etc/schema.graphqls +++ b/vendor/magento/module-sales-rule-graph-ql/etc/schema.graphqls @@ -5,20 +5,3 @@ type Discount { coupon: AppliedCoupon @resolver(class: "Magento\\SalesRuleGraphQl\\Model\\Resolver\\Coupon") @doc(description:"The coupon related to the discount.") } - -type StoreConfig { - share_all_sales_rule: Boolean! @doc(description: "Configuration data from promo/graphql/share_all_sales_rule") - share_applied_sales_rule: Boolean! @doc(description: "Configuration data from promo/graphql/share_applied_sales_rule") -} - -type Query { - allCartRules: [CartRule!] @doc(description: "Provides all active cart rules in the store.") @resolver(class: "Magento\\SalesRuleGraphQl\\Model\\Resolver\\AllCartRules") -} - -type Cart { - rules: [CartRule!] @doc(description: "Provides applied cart rules in the current active cart") @resolver(class: "Magento\\SalesRuleGraphQl\\Model\\Resolver\\AppliedCartRules") -} - -type CartRule { - name: String! @doc(description: "Name of the cart price rule") -}