Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ShippingMethod type and associate to ShippingRate #187

Merged
merged 1 commit into from
Sep 16, 2021

Commits on Sep 16, 2021

  1. Add ShippingMethod type and associate to ShippingRate

    It allows querying the shipping rates information for orders along
    with the shipping method information, which is something that usually
    needs to be displayed to the end-user.
    
    Example:
    
    ```graphql
    query shippingInformation {
      currentOrder {
        shipments {
          nodes {
            shippingRates {
              nodes {
                cost
                currency
                shippingMethod {
                  name
                  trackingUrl
                  carrier
                }
              }
            }
          }
        }
      }
    }
    ```
    
    Response:
    
    ```json
    {
      "data": {
        "currentOrder": {
          "shipments": {
            "nodes": [
              {
                "shippingRates": {
                  "nodes": [
                    {
                      "cost": "5.0",
                      "currency": "USD",
                      "shippingMethod": {
                        "name": "UPS Ground (USD)",
                        "trackingUrl": null,
                        "carrier": null
                      }
                    },
                    {
                      "cost": "10.0",
                      "currency": "USD",
                      "shippingMethod": {
                        "name": "UPS Two Day (USD)",
                        "trackingUrl": null,
                        "carrier": null
                      }
                    },
                    {
                      "cost": "15.0",
                      "currency": "USD",
                      "shippingMethod": {
                        "name": "UPS One Day (USD)",
                        "trackingUrl": null,
                        "carrier": null
                      }
                    }
                  ]
                }
              }
            ]
          }
        }
    ```
    
    Fixes #179
    waiting-for-dev committed Sep 16, 2021
    Configuration menu
    Copy the full SHA
    73ca449 View commit details
    Browse the repository at this point in the history