A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
How can I get the Shipping Carrier method names by using the Shopify GraphQL query (GET API) instead of GraphQL mutation?
Let me explain what I'm trying to do:
I am using the availableCarrierServices GraphQL query to fetch the available Shipping Carrier names that are present in my Shopify Store. See the screenshot below.
In the above screenshot, the response from the availableCarrierServices returns only Shipping Carrier names, but I also want to get the method names of the Carriers. for example: "UPS Ground", "UPS Next Day Air", etc.
Also, there aren't any objects that let me fetch the Shipping Carrier method names in this API query.
In the above Screenshot, I can get the Shipping Carrier methods names using the draftOrderCalculate GraphQL mutation, But I want to fetch the Shipping Carrier methods names using GraphQL query (GET API) instead of a mutation.
Can anyone help me with figuring this out? Thank You.
Solved! Go to the solution
This is an accepted solution.
Hey @zainabraja
query{ availableCarrierServices{ carrierService{ formattedName availableServicesForCountries(origins: "gid://shopify/Location/52415234070", countryCodes:CA, restOfWorld:false){ name } } } }
Scott | Developer Advocate @ Shopify
This is an accepted solution.
Hey @zainabraja
query{ availableCarrierServices{ carrierService{ formattedName availableServicesForCountries(origins: "gid://shopify/Location/52415234070", countryCodes:CA, restOfWorld:false){ name } } } }
Scott | Developer Advocate @ Shopify
Thank you so much!