Skip to content

Commit 92f8c48

Browse files
committed
B2B-2677: [MediaGallery] Implement data caching for GraphQL results on resolver level
- Unset properties of gallery that are not accepted by the API before calling it
1 parent 9474d36 commit 92f8c48

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

dev/tests/api-functional/testsuite/Magento/GraphQl/Catalog/ResolverCache/MediaGalleryTest.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,11 @@ function (ProductInterface $product) {
393393
'video_content' => $videoContent->toArray(),
394394
];
395395

396+
// unset properties of gallery that are not accepted by the API
397+
unset($galleryEntryArray['entity_id']);
398+
unset($galleryEntryArray['extension_attributes']['video_content']['entity_id']);
399+
400+
// update label
396401
$galleryEntryArray['label'] = 'new label';
397402

398403
$this->_webApiCall(

0 commit comments

Comments
 (0)