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

ShippingAddressInput.postcode: String, is not required by Schema #961

Closed
TomashKhamlai opened this issue Sep 24, 2019 · 3 comments
Closed
Assignees
Labels
bug Something isn't working Checkout Component: QuoteGraphQl Event: mageconf19 MageConf 2019 Contribution Day

Comments

@TomashKhamlai
Copy link
Contributor

TomashKhamlai commented Sep 24, 2019

Preconditions (*)

  1. Self-registered customer without address
  2. Simple product with weight and salable quantity

Steps to reproduce (*)

  1. Generate Customer Token
  2. Create an empty cart for the customer by including token into authorization headers.
  3. Add simple product to the customer's cart
  4. Set shipping address
mutation {
  setShippingAddressesOnCart(
    input: {
      cart_id: "FD9YMAaXJlHbX4bjEkHiZ3RAsMSbg6fv"
      shipping_addresses: {
        address: {
          firstname: "John"
          lastname: "Doubledo"
          street: "6161 West Centinela Avenue"
          telephone: "+15555555555"
          country_code: "us"
          save_in_address_book: true
          city: "Culver city"
        }
      }
    }
  ) {
    cart {
      email
      shipping_addresses {
        postcode
        firstname
        lastname
        telephone
        selected_shipping_method {
          carrier_code
          method_code
        }
        available_shipping_methods {
          carrier_code
          method_code
        }
      }
    }
  }
}
  1. Get cart_id for the existing cart
mutation{
  createEmptyCart
}

Expected result (*)

  1. Error on step 4 or no errors at all
  2. ShippingAddressInput.postcode is required in schema or validation works in time.

Actual result (*)

  1. Error
{
  "errors": [
    {
      "debugMessage": "\"postcode\" is required. Enter and try again.",
      "message": "Internal server error",
      "extensions": {
        "category": "internal"
      },
      "locations": [
        {
          "line": 2,
          "column": 3
        }
      ],
      "path": [
        "createEmptyCart"
      ]
    }
  ],
  "data": {
    "createEmptyCart": null
  }
}
@kisroman
Copy link
Contributor

Can not reproduce this issue by provided steps.
I see that my shipping address hasn't postcode(it is null), but

mutation{
  createEmptyCart
}

works for me. It returns old cart id.

@kisroman
Copy link
Contributor

Reproduced after communication.

@TomashKhamlai
Copy link
Contributor Author

@kisroman, after rechecking this ticket today I see that the issue was fixed by somebody. I am closing this issue. Please reopen if you are still able to reproduce it.

Cc: @lenaorobei

@lenaorobei lenaorobei added this to the Release: 2.3.4 milestone Oct 23, 2019
lenaorobei added a commit to kisroman/graphql-ce that referenced this issue Oct 23, 2019
lenaorobei added a commit to kisroman/graphql-ce that referenced this issue Oct 23, 2019
lenaorobei added a commit to kisroman/graphql-ce that referenced this issue Oct 24, 2019
lenaorobei added a commit to kisroman/graphql-ce that referenced this issue Oct 24, 2019
lenaorobei added a commit to kisroman/graphql-ce that referenced this issue Oct 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working Checkout Component: QuoteGraphQl Event: mageconf19 MageConf 2019 Contribution Day
Projects
None yet
Development

No branches or pull requests

3 participants