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

Product media_gallery_entries / types only present if image, thumbnail, small_image is requested #612

Closed
mhaack opened this issue Apr 16, 2019 · 1 comment
Labels
bug Something isn't working Component: CatalogGraphQl magento-core Epics and issues assigned to Magento core team members.

Comments

@mhaack
Copy link
Contributor

mhaack commented Apr 16, 2019

A query for media_gallery_entries / types of a product should always return the correct types of a gallery asset entry. This is currently broken, types are only returned if image, thumbnail, small_image are requested as well. Tested with 2.3.1.

Preconditions (*)

Tested with 2.3.1.

Steps to reproduce (*)

Query 1:

{
  products(filter: {url_key: {eq: "simple-product-23308"}}) {
    items {
      name
      sku
      id
      url_key
      image {
        url
      }
      thumbnail {
        url
      }
      small_image {
        url
      }
      media_gallery_entries {
        id
        file
        types
      }
    }
  }
}

Result: types are present in the response

Query 2:

{
  products(filter: {url_key: {eq: "simple-product-23308"}}) {
    items {
      name
      sku
      id
      url_key
      media_gallery_entries {
        id
        file
        types
      }
    }
  }
}

Result: types are missing in the response, arrays are all empty. For example:

{
  "data": {
    "products": {
      "items": [
        {
          "name": "Simple Product 23308",
          "sku": "product_dynamic_23308",
          "id": 23314,
          "url_key": "simple-product-23308",
          "media_gallery_entries": [
            {
              "id": 520,
              "file": "/f/7/f7e6c85504ce6e82442c770f7c8606f0.jpg",
              "types": []
            },
            {
              "id": 523,
              "file": "/b/f/bf8229696f7a3bb4700cfddef19fa23f.jpg",
              "types": []
            },
            {
              "id": 526,
              "file": "/8/2/82161242827b703e6acf9c726942a1e4.jpg",
              "types": []
            }
          ]
        }
      ]
    }
  }
}

Expected result (*)

The media_gallery_entries - types array is correct, also if one does not explicitly query for image, thumbnail or small_image.

@cherdman cherdman added magento-core Epics and issues assigned to Magento core team members. bug Something isn't working labels Apr 16, 2019
@shikhamis11 shikhamis11 self-assigned this Apr 17, 2019
@GovindaSharma GovindaSharma self-assigned this Apr 30, 2019
@cherdman cherdman removed the magento-core Epics and issues assigned to Magento core team members. label May 2, 2019
@naydav naydav added magento-core Epics and issues assigned to Magento core team members. Component: CatalogGraphQl labels May 3, 2019
@XxXgeoXxX XxXgeoXxX self-assigned this May 16, 2019
lenaorobei added a commit to XxXgeoXxX/graphql-ce that referenced this issue Jun 12, 2019
lenaorobei added a commit to XxXgeoXxX/graphql-ce that referenced this issue Jun 12, 2019
…age, thumbnail, small_image is requested

- skipped test magento#738
naydav pushed a commit that referenced this issue Jun 18, 2019
…age, thumbnai… #718

 - Merge Pull Request #718 from XxXgeoXxX/graphql-ce:2.3-develop##612
 - Merged commits:
   1. bb5ae76
   2. b776ec3
   3. f01d084
   4. 44d7ff4
@naydav
Copy link
Contributor

naydav commented Jun 19, 2019

#718

@naydav naydav closed this as completed Jun 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working Component: CatalogGraphQl magento-core Epics and issues assigned to Magento core team members.
Projects
None yet
Development

No branches or pull requests

6 participants