Skip to content

Commit 588b193

Browse files
committed
Exclude permissions stub from type generator
1 parent 7d13cde commit 588b193

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/GraphQLEntity.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
use Doctrine\ORM\EntityManager;
66
use GraphQL\Doctrine\Definition\EntityID;
77
use InvalidArgumentException;
8+
use GraphQL\Doctrine\Annotation as API;
89
use GraphQL;
910

1011
abstract class GraphQLEntity implements DoctrineUniqueInterface {
@@ -68,6 +69,13 @@ public static function buildFromJson(EntityManager $em, array $input) {
6869
return $entity;
6970
}
7071

72+
/**
73+
* @API\Exclude
74+
*
75+
* @param EntityManager $em
76+
* @param ApiUserInterface $user
77+
* @return bool
78+
*/
7179
public function hasPermission(EntityManager $em, ApiUserInterface $user): bool {
7280
return true;
7381
}

0 commit comments

Comments
 (0)