Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 
 
 
 
 

64 řádky
4.0 KiB

  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. <preference for="Magento\QuoteGraphQl\Model\Cart\SetShippingAddressesOnCartInterface"
  10. type="Magento\QuoteGraphQl\Model\Cart\SetShippingAddressesOnCart"/>
  11. <preference for="Magento\QuoteGraphQl\Model\Cart\SetShippingMethodsOnCartInterface"
  12. type="Magento\QuoteGraphQl\Model\Cart\SetShippingMethodsOnCart"/>
  13. <preference for="Magento\QuoteGraphQl\Model\Cart\MergeCarts\CartQuantityValidatorInterface"
  14. type="Magento\QuoteGraphQl\Model\Cart\MergeCarts\CartQuantityValidator"/>
  15. <type name="Magento\QuoteGraphQl\Model\Cart\BuyRequest\BuyRequestBuilder">
  16. <arguments>
  17. <argument name="providers" xsi:type="array">
  18. <item name="quantity" xsi:type="object">Magento\QuoteGraphQl\Model\Cart\BuyRequest\QuantityDataProvider</item>
  19. <item name="customizable_options" xsi:type="object">Magento\QuoteGraphQl\Model\Cart\BuyRequest\CustomizableOptionsDataProvider</item>
  20. </argument>
  21. </arguments>
  22. </type>
  23. <type name="Magento\Quote\Model\Quote\Config">
  24. <plugin name="append_requested_graphql_attributes" type="Magento\QuoteGraphQl\Plugin\ProductAttributesExtender"/>
  25. </type>
  26. <type name="Magento\Framework\GraphQl\Query\ResolverInterface">
  27. <plugin name="reset-totals" type="Magento\QuoteGraphQl\Plugin\ResetStoredTotalsBeforeTopResolver" sortOrder="1"/>
  28. </type>
  29. <type name="Magento\QuoteGraphQl\Model\Cart\TotalsCollector">
  30. <arguments>
  31. <argument name="quoteTotalsCollector" xsi:type="object">Magento\Quote\Model\Quote\TotalsCollector\Proxy</argument>
  32. </arguments>
  33. </type>
  34. <virtualType name="Magento\QuoteGraphQl\Helper\Error\PlaceOrderMessageFormatter" type="Magento\GraphQl\Helper\Error\AggregateExceptionMessageFormatter">
  35. <arguments>
  36. <argument name="messageFormatters" xsi:type="array">
  37. <item name="graphql" xsi:type="object">Magento\GraphQl\Helper\Error\MessageFormatters\GraphQlExceptionMessageFormatter</item>
  38. <item name="no_such_entity" xsi:type="object">Magento\GraphQl\Helper\Error\MessageFormatters\NoSuchEntityExceptionMessageFormatter</item>
  39. <item name="validation" xsi:type="object">Magento\GraphQl\Helper\Error\MessageFormatters\ValidationExceptionMessageFormatter</item>
  40. <item name="payment" xsi:type="object">Magento\GraphQl\Helper\Error\MessageFormatters\PaymentExceptionMessageFormatter</item>
  41. <item name="payment_gateway_command" xsi:type="object">Magento\PaymentGraphQl\Helper\Error\MessageFormatters\GatewayCommandExceptionMessageFormatter</item>
  42. <item name="payment_gateway_http_client" xsi:type="object">Magento\PaymentGraphQl\Helper\Error\MessageFormatters\GatewayHttpClientExceptionMessageFormatter</item>
  43. <item name="stock_state" xsi:type="object">Magento\CatalogInventoryGraphQl\Helper\Error\MessageFormatters\StockStateExceptionMessageFormatter</item>
  44. </argument>
  45. </arguments>
  46. </virtualType>
  47. <type name="Magento\QuoteGraphQl\Model\Resolver\PlaceOrder">
  48. <arguments>
  49. <argument name="errorMessageFormatter" xsi:type="object">Magento\QuoteGraphQl\Helper\Error\PlaceOrderMessageFormatter</argument>
  50. </arguments>
  51. </type>
  52. <type name="Magento\Framework\GraphQl\Schema\Type\Enum\DefaultDataMapper">
  53. <arguments>
  54. <argument name="map" xsi:type="array">
  55. <item name="CartItemErrorType" xsi:type="array">
  56. <item name="undefined" xsi:type="string">0</item>
  57. <item name="item_qty" xsi:type="string">1</item>
  58. <item name="item_increment" xsi:type="string">2</item>
  59. </item>
  60. </argument>
  61. </arguments>
  62. </type>
  63. </config>