Skip to content

Commit abeaad7

Browse files
committed
[graphql] *LogicException exceptions will implement ClientAware interface.
1 parent 6b4a839 commit abeaad7

File tree

2 files changed

+22
-4
lines changed

2 files changed

+22
-4
lines changed

src/SearchBy/SearchLogicException.php

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@
22

33
namespace LastDragon_ru\LaraASP\GraphQL\SearchBy;
44

5-
class SearchLogicException extends SearchByException {
6-
// empty
5+
use GraphQL\Error\ClientAware;
6+
use LastDragon_ru\LaraASP\GraphQL\Package;
7+
8+
class SearchLogicException extends SearchByException implements ClientAware {
9+
public function isClientSafe(): bool {
10+
return true;
11+
}
12+
13+
public function getCategory(): string {
14+
return Package::Name;
15+
}
716
}

src/SortBy/SortLogicException.php

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@
22

33
namespace LastDragon_ru\LaraASP\GraphQL\SortBy;
44

5-
class SortLogicException extends SortByException {
6-
// empty
5+
use GraphQL\Error\ClientAware;
6+
use LastDragon_ru\LaraASP\GraphQL\Package;
7+
8+
class SortLogicException extends SortByException implements ClientAware {
9+
public function isClientSafe(): bool {
10+
return true;
11+
}
12+
13+
public function getCategory(): string {
14+
return Package::Name;
15+
}
716
}

0 commit comments

Comments
 (0)