- Work done on search request mostly
This commit is contained in:
1 parent
f938e18572
commit
7b35de3258
7 files changed
+26
-14
No files matched your search
@@ -95,7 +95,7 @@ class EntityResolver {
|
||||
return $fieldList;
|
||||
}
|
||||
|
||||
public function relation(string $name) : array
|
||||
public function relation(string $name, bool $throwOnError = true) : ? array
|
||||
{
|
||||
$property = $this->reflectedClass->getProperties(true)[$name] ?? false;
|
||||
|
||||
@@ -111,8 +111,10 @@ class EntityResolver {
|
||||
return [];
|
||||
}
|
||||
catch(\Throwable $e) {
|
||||
throw new \InvalidArgumentException("Can't find entity relation's column named `$name` from entity {$this->entityClass}");
|
||||
$throwOnError && throw new \InvalidArgumentException("Can't find entity relation's column named `$name` from entity {$this->entityClass}");
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public function getPropertyHavingAttribute(array|object|string $type) : array
|
||||
|
||||
Reference in new issue
Block a user