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.

graphql-input provides to Customer as many errors as appeared instead of last one like on Magento Storefront #416

@TomashKhamlai

Description

@TomashKhamlai

Preconditions (*)

  1. Any supported product with more then 1 required customizable options

Steps to reproduce (*)

  1. Add product to cart without providing options

Expected result (*)

  1. Screenshot:
    image

  2. GraphQL:

{
  "errors": [
    {
      "message": "The product's required option(s) weren't entered.
Make sure the options are entered and try again.",
      "category": "graphql-input",
      "locations": [
        {
          "line": 2,
          "column": 3
        }
      ],
      "path": [
        "addSimpleProductsToCart"
      ]
    }
  ],
  "data": {
    "addSimpleProductsToCart": null
  }
}

Actual result (*)

  1. GraphQL:
{
  "errors": [
    {
      "message": "The product's required option(s) weren't entered.
Make sure the options are entered and try again.\n
The product's required option(s) weren't entered.
Make sure the options are entered and try again.",
      "category": "graphql-input",
      "locations": [
        {
          "line": 2,
          "column": 3
        }
      ],
      "path": [
        "addSimpleProductsToCart"
      ]
    }
  ],
  "data": {
    "addSimpleProductsToCart": null
  }
}

If it is the feature then it's worth to document the benefits of such behaviour with usage example. Guidelines or devdocs are good places for this.

Metadata

Metadata

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions