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
Juliano Vargas
2,7013 gold badges29 silver badges87 bronze badges
1 Answer 1
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
Msquare
9,4627 gold badges30 silver badges71 bronze badges
-
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 APIJuliano Vargas– Juliano Vargas2022年08月08日 16:20:50 +00:00Commented Aug 8, 2022 at 16:20
-
1@JulianoVargas Yes you need to create a custom GraphQL API.Msquare– Msquare2022年08月09日 01:16:49 +00:00Commented 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." } ] } }Vrajesh Patel– Vrajesh Patel2023年06月28日 11:23:17 +00:00Commented 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.Msquare– Msquare2023年06月28日 11:27:24 +00:00Commented Jun 28, 2023 at 11:27
-
Yes that also tried nothing in log file. Also increased memory limit.Vrajesh Patel– Vrajesh Patel2023年06月28日 11:32:21 +00:00Commented Jun 28, 2023 at 11:32
Explore related questions
See similar questions with these tags.
default