Skip to content

Instantly share code, notes, and snippets.

@richter-alex
Created October 15, 2019 19:39
Show Gist options
  • Save richter-alex/830e95baa9a3e7e772740be6329569e3 to your computer and use it in GitHub Desktop.
Save richter-alex/830e95baa9a3e7e772740be6329569e3 to your computer and use it in GitHub Desktop.
mutation {
deliveryProfileUpdate(id: "gid://shopify/DeliveryProfile/11477418006", profile: {
name: "My GQL Profile - Now with Zones and Rates!",
locationGroupsToCreate: {
locations: ["gid://shopify/Location/37086726"],
zonesToCreate: [{
name: "My 1st GQL Zone - Canada",
countries: [{
code: CA,
provinces: {
code: "ON"
}
}],
methodDefinitionsToCreate: [{
name: "DHL Pakket",
active: true,
participant: {
percentageOfRateFee: 10.0,
carrierServiceId: "gid://shopify/DeliveryCarrierService/17615519766",
participantServices: [{
name: "dhl-pakket",
active: true
}]
}
}, {
name: "DHL Ecommerce",
active: true,
participant: {
percentageOfRateFee: 20.0,
carrierServiceId: "gid://shopify/DeliveryCarrierService/17615519766",
participantServices: [{
name: "dhl-ecommerce",
active: true
}]
}
}]
}]
}
}) {
profile {
id
name
profileLocationGroups {
locationGroup {
id
locations(first: 3) {
edges {
node {
id
name
}
}
}
}
locationGroupZones(first: 3) {
edges {
node {
zone {
name
countries {
name
}
}
methodDefinitions(first: 3) {
edges {
node {
id
name
active
rateProvider {
... on DeliveryRateDefinition {
id
price {
amount
}
}
}
}
}
}
}
}
}
}
}
userErrors {
field
message
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment