1

I Could not find if there is or there isn't a query to get list of shippings methods available via graphql. ref: https://devdocs.magento.com/guides/v2.4/graphql/

Is there a query available?

Msquare
9,4627 gold badges30 silver badges71 bronze badges
asked Aug 8, 2022 at 10:56

1 Answer 1

0

Try This:

{
 cart(cart_id: "YOUR_CART_ID") {
 email
 shipping_addresses {
 available_shipping_methods {
 amount {
 currency
 value
 }
 available
 carrier_code
 carrier_title
 method_code
 method_title
 price_excl_tax {
 value
 currency
 }
 price_incl_tax {
 value
 currency
 }
 }
 selected_shipping_method {
 amount {
 value
 currency
 }
 carrier_code
 carrier_title
 method_code
 method_title
 }
 }
 }
}

NOTE: Magento 2.4.X

answered Aug 8, 2022 at 15:20
7
  • I understand this is in the docs, but I did not want to create any orders or and empty cart, I just needed a list of enabled/available shipping methods. Maybe I'll have to create a custom graph API Commented Aug 8, 2022 at 16:20
  • 1
    @JulianoVargas Yes you need to create a custom GraphQL API. Commented Aug 9, 2022 at 1:16
  • Getting Error : { "messages": { "error": [ { "code": 500, "message": "Fatal Error: 'Allowed memory size of 792723456 bytes exhausted (tried to allocate 67108872 bytes)' in '/var/www/html/m2/vendor/magento/zendframework1/library/Zend/Db/Select.php' on line 1004", "trace": "Trace is not available." } ] } } Commented Jun 28, 2023 at 11:23
  • Please increase your memory limit, or you can enable developer mode in your store. Then you can go network tab and check your graphql response. And you can also add some log-in files to check code flow. Commented Jun 28, 2023 at 11:27
  • Yes that also tried nothing in log file. Also increased memory limit. Commented Jun 28, 2023 at 11:32

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.