magento / graphql-ce

[ARCHIVED] Please use magento/magento2 project
https://github.com/magento/magento2
Open Software License 3.0
131 stars 156 forks source link

Filter error array by unique values #1023

Closed paul-stolk-webdiensten closed 4 years ago

paul-stolk-webdiensten commented 5 years ago

Description (*)

Added an array_unique to prevent duplicate errors.

Fixed Issues (if relevant)

  1. https://github.com/magento/graphql-ce/issues/416: graphql-input provides to Customer as many errors as appeared instead of last one like on Magento Storefront #416

Manual testing scenarios (*)

  1. Create a product with two or more required customizable options
  2. Add the product with GraphQl to the cart, with for example:
mutation {
  addSimpleProductsToCart(
    input: {
      cart_id: "5qqnw42QYVX5SIHRFHETKhDQfb0mDe5K"
      cart_items: [
        {
          data: {
            quantity: 1
            sku: "416"
          }
        }
      ]
    }
  ) {
    cart {
      items {
        id
        product {
          sku
          stock_status
        }
        quantity
      }
    }
  }
}

Questions or comments

Contribution checklist (*)

Credits @seegrand

ghost commented 5 years ago

Hi @paul-stolk-webdiensten, thank you for your contribution!
Please, complete Contribution Survey, it will take less than a minute.
Your feedback will help us to improve contribution process.

magento-engcom-team commented 5 years ago

Hi @lenaorobei, thank you for the review. ENGCOM-6254 has been created to process this Pull Request :eight_spoked_asterisk: @lenaorobei, could you please add one of the following labels to the Pull Request?

Label Description
Auto-Tests: Covered All changes in Pull Request is covered by auto-tests
Auto-Tests: Not Covered Changes in Pull Request requires coverage by auto-tests
Auto-Tests: Not Required Changes in Pull Request does not require coverage by auto-tests
magento-engcom-team commented 5 years ago

@paul-stolk-webdiensten thank you for contributing. Please accept Community Contributors team invitation here to gain extended permissions for this repository.

TomashKhamlai commented 5 years ago

Brilliant!

ghost commented 4 years ago

Hi @paul-stolk-webdiensten, thank you for your contribution!
Please, complete Contribution Survey, it will take less than a minute.
Your feedback will help us to improve contribution process.