Checkout object returns null for certain fields even though webUrl has information

Solved
sam-parks
Tourist
7 0 1

After using the checkoutShippingLineUpdate mutation or the appendGiftCardMutation, the checkout object returned from this mutation: 

query($id: ID!){
  node(id: $id) {
    ... on Checkout {
      id
      email
      appliedGiftCards {
        amountUsedV2 {
          amount
          currencyCode
        }
        balanceV2 {
          amount
          currencyCode
        }
        id
      }
      requiresShipping
      shippingLine {
        handle
        priceV2 {
          amount
          currencyCode
        }
        title
      }
      availableShippingRates {
        ready
        shippingRates {
          handle
          title
          priceV2 {
            amount
            currencyCode
          }
        }
      }
      shippingAddress {
        address1
        address2
        city
        company
        country
        countryCodeV2
        firstName
        formattedArea
        id
        lastName
        latitude
        longitude
        name
        phone
        province
        provinceCode
        zip
      }
      completedAt
      createdAt
      currencyCode
      lineItems(first: 10) {
        edges {
          node {
            id
            quantity
            title
            discountAllocations {
              allocatedAmount {
                amount
                currencyCode
              }
            }
            variant {
              id
              priceV2 {
                amount
                currencyCode
              }
              title
              image {
                altText
                originalSrc
                id
              }
              compareAtPriceV2 {
                amount
                currencyCode
              }
              weight
              weightUnit
              availableForSale
              sku
              requiresShipping
            }
          }
        }
      }
      note
      webUrl
      updatedAt
      totalTaxV2 {
        amount
        currencyCode
      }
      totalPriceV2 {
        amount
        currencyCode
      }
      taxesIncluded
      taxExempt
      subtotalPriceV2 {
        amount
        currencyCode
      }
      orderStatusUrl
      order {
        id
      }
    }
  }
}

 

does not have any applied gift cards and the shipping line is null

When I navigate to the weburl for this checkout, I can see that the gift cards have been applied and that a shipping line is selected.

Why does the checkout object not have the information for these corresponding fields?

 

 

Replies 10 (10)
sam-parks
Tourist
7 0 1

I was using a separate request to get the updated checkout information rather than using the shipping line mutation to get the updated checkout object. When I return all the info from the mutation, I seem to be getting the up to date object!