A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
I'm trying to fetch products and their delivery rates from the [deliveryProfiles] object (or shipping profiles). Using the second query below I am able to pull all products that are associated with a [deliveryProfile] but I can't figure out how to fetch the Delivery Rate for each product. Our store only uses static shipping rates so I believe I need to use something like the [rateProvider] query below. But I don't know or even how to modified the query to include something like this:
rateProvider {
... on DeliveryRateDefinition {
id
price {
amount
}
Current query I'm using:
query {
deliveryProfiles (first: 5) {
edges {
node {
profileItems (first: 10) {
edges {
node {
product {
id
handle
}
variants (first: 10) {
edges {
node {
id
title
sku
}
}
}
}
}
}
}
}
}
}
Figured it out. Here's the solution:
query {
deliveryProfiles (first: 5) {
edges {
node {
profileItems (first: 5) {
edges {
node {
product {
id
handle
}
variants (first: 5) {
edges {
node {
id
title
}
}
}
}
}
}
profileLocationGroups {
locationGroupZones(first: 5) {
edges {
node {
methodDefinitions(first: 5) {
edges {
node {
rateProvider {
... on DeliveryRateDefinition {
id
price {
amount
}
}
... on DeliveryParticipant {
id
fixedFee {
amount
currencyCode
}
percentageOfRateFee
participantServices {
active
name
}
}
}
}
}
}
}
}
}
}
}
}
}
}
It's work. Thank you!!