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

Filter error array by unique values #1023

Merged

Conversation

paul-stolk-webdiensten
Copy link
Contributor

Description (*)

Added an array_unique to prevent duplicate errors.

Fixed Issues (if relevant)

  1. graphql-input provides to Customer as many errors as appeared instead of last one like on Magento Storefront #416: graphql-input provides to Customer as many errors as appeared instead of last one like on Magento Storefront 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 (*)

  • [ x ] Pull request has a meaningful description of its purpose
  • [ x ] All commits are accompanied by meaningful commit messages
  • [ x ] All new or changed code is covered with unit/integration tests (if applicable)
  • [ x ] All automated tests passed successfully (all builds are green)

Credits @seegrand

@ghost
Copy link

ghost commented Oct 21, 2019

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.

@lenaorobei lenaorobei added the Event: mleu19 Meet Magento Europe 2019 label Oct 29, 2019
Copy link
Contributor

@lenaorobei lenaorobei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This check should be made on GraphQL level. Please use GraphQlInputException.
More info #1013

@magento-engcom-team
Copy link
Contributor

Hi @lenaorobei, thank you for the review.
ENGCOM-6254 has been created to process this Pull Request
✳️ @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
Copy link
Contributor

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

@TomashKhamlai TomashKhamlai added the QA in progress We are checking label Nov 11, 2019
@TomashKhamlai
Copy link
Contributor

Brilliant!

@ghost
Copy link

ghost commented Nov 14, 2019

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants