Skip to content

Commit fd1b61c

Browse files
authored
Update annotation retrieval to use getGraphQLElement
1 parent aa87948 commit fd1b61c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/DependencyInjection/GraphQLiteCompilerPass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ private function makePublicInjectedServices(ReflectionClass $refClass, Annotatio
337337
$services = $this->getCodeCache()->get($refClass, function() use ($refClass, $reader, $container, $isController): array {
338338
$services = [];
339339
foreach ($refClass->getMethods(ReflectionMethod::IS_PUBLIC) as $method) {
340-
$field = $reader->getRequestAnnotation($method, Field::class) ?? $reader->getRequestAnnotation($method, Query::class) ?? $reader->getRequestAnnotation($method, Mutation::class);
340+
$field = $reader->getGraphQLElementAnnotation($method, Field::class) ?? $reader->getGraphQLElementAnnotation($method, Query::class) ?? $reader->getGraphQLElementAnnotation($method, Mutation::class);
341341
if ($field !== null) {
342342
if ($isController) {
343343
$services[$refClass->getName()] = $refClass->getName();

0 commit comments

Comments
 (0)