Skip to content
This repository was archived by the owner on Dec 19, 2019. It is now read-only.
This repository was archived by the owner on Dec 19, 2019. It is now read-only.

The shipping address contains null values when there's no shipping address set on a cart #864

@dplaton

Description

@dplaton

Preconditions (*)

  1. Magento 2.3.2

Steps to reproduce (*)

  1. Use your favorite GraphQL client to create a guest cart using the createEmptyCart mutation
  2. Request the cart details (just the shipping address should suffice):
  cart(cart_id: "YaMkSTdY7fOlShTKVJTNCLZHL2dtAWpT") {
    shipping_addresses {
      city
      company
      country {
        code
      }
      firstname
      lastname
      postcode
      region {
        code
      }
      street
      telephone
    }
  }
}

Expected result (*)

  1. The shipping address in the response is an empty array
"data": {
    "cart": {
      "shipping_addresses": [ ]
    }
  }

Actual result (*)

  1. The shipping address is an object with null values
  "data": {
    "cart": {
      "shipping_addresses": [
        {
          "city": null,
          "company": null,
          "country": {
            "code": null
          },
          "firstname": null,
          "lastname": null,
          "postcode": null,
          "region": {
            "code": null
          },
          "street": [
            ""
          ],
          "telephone": null
        }
      ]
    }
  }

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions