GraphQL Query REST migration

When using the REST API I was able to find out two things which I am having trouble locating now in GraphQL

Using the REST API I was able to access the ShippingLines.code property to tell me if the order was Standard or Express delivery.

Also we cater for Gift Wrapping and I was able to use the Note_Attributes to check if the name was “gift-note”

I cannot find either of these values now.

There is customAttributes field in order object and that’s Note_Attributes.
You can get ShippingLines.code and customAttributes in GraphQL:

query ($id: ID!) {
  order(id: $id) {
    id
    customAttributes {
      key
      value
    }
    shippingLines(first: 5) {
      edges {
        node {
          code
        }
        }
      }
    }
  }
}

1 Like

Remy727,

Thanks for that just what I needed.

Arthur

1 Like