Version 4.7.8
This commit is contained in:
1 parent
7b7404e741
commit
fd22d99e69
688 files changed
+19814
-10890
No files matched your search
@@ -34,7 +34,7 @@ class _Group
|
||||
/*
|
||||
* @brief Query arguments
|
||||
*/
|
||||
public function args()
|
||||
public function args(): array
|
||||
{
|
||||
return array(
|
||||
'id' => TypeRegistry::nonNull( TypeRegistry::id() )
|
||||
@@ -59,6 +59,13 @@ class _Group
|
||||
*/
|
||||
public function resolve($val, $args, $context)
|
||||
{
|
||||
return \IPS\Member\Group::load( $args['id'] );
|
||||
try
|
||||
{
|
||||
return \IPS\Member\Group::load( $args['id'] );
|
||||
}
|
||||
catch ( \OutOfRangeException $e )
|
||||
{
|
||||
throw new \IPS\Api\GraphQL\SafeException( 'INVALID_GROUP', '1invalid_group_graph', 400 );
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user