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

Additional checks for fragments added in category tree #101

Merged
merged 2 commits into from
Jul 19, 2018

Conversation

rogyar
Copy link
Contributor

@rogyar rogyar commented Jun 30, 2018

Description

For category products request on an attempt to add a fragment for checking an implementation (product type) the system throws the fatal error. The example of request:

{
  category(id: 14) {
    id
    name
    products {
      items {
        sku
        ... on ConfigurableProduct {
          variants {
            product {
              sku
            }
          }
        }
      }
    }
  }
}

The fix removes the InlineFragment nodes from category tree processing.

Fixed Issues (if relevant)

#85

Manual testing scenarios

  • Create a configurable product with child products
  • Assign the configurable product to a category with some [category_id]
  • Execute the following request:
{
  category(id: category_id) {
    id
    name
    products {
      items {
        sku
        ... on ConfigurableProduct {
          variants {
            product {
              sku
            }
          }
        }
      }
    }
  }
}
  • You should see the category and products info instead of the fatal error.

@magento-cicd2
Copy link
Contributor

magento-cicd2 commented Jun 30, 2018

CLA assistant check
All committers have signed the CLA.

@paliarush paliarush added the requires-tests PRs which require GraphQL tests label Jul 2, 2018
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.

5 participants