Skip to content

Commit 03a3b6c

Browse files
committed
#7479: GraphQl. Mutation: customerOrders query and gift_message attribute
1 parent ba25897 commit 03a3b6c

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

app/code/Magento/GiftMessageGraphQl/Model/Resolver/Order/GiftMessage.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,17 +55,13 @@ public function resolve(
5555
array $value = null,
5656
array $args = null
5757
) {
58-
if (!isset($value['id'])) {
59-
throw new GraphQlInputException(__('"id" value should be specified'));
60-
}
61-
6258
try {
6359
$orderGiftMessage = $this->orderRepository->get($value['id']);
6460
} catch (LocalizedException $e) {
65-
throw new GraphQlInputException(__('Can\'t load gift message for order'));
61+
return null;
6662
}
6763

68-
if (!isset($orderGiftMessage)) {
64+
if (!$orderGiftMessage->getGiftMessageId()) {
6965
return null;
7066
}
7167

0 commit comments

Comments
 (0)