| @@ 89-102 (lines=14) @@ | ||
| 86 | } | |
| 87 | ||
| 88 | $argAnnotations = $this->reader->getClassAnnotations($refClass); | |
| 89 |         foreach ($argAnnotations as $argAnnotation) { | |
| 90 |             if ($argAnnotation instanceof Annotation\Argument) { | |
| 91 | $arg = new ArgumentDefinition(); | |
| 92 | $arg->setName($argAnnotation->name); | |
| 93 | $arg->setDescription($argAnnotation->description); | |
| 94 | $arg->setInternalName($argAnnotation->internalName); | |
| 95 | $arg->setDefaultValue($argAnnotation->defaultValue); | |
| 96 | $arg->setType(TypeUtil::normalize($argAnnotation->type)); | |
| 97 | $arg->setList(TypeUtil::isTypeList($argAnnotation->type)); | |
| 98 | $arg->setNonNullList(TypeUtil::isTypeNonNullList($argAnnotation->type)); | |
| 99 | $arg->setNonNull(TypeUtil::isTypeNonNull($argAnnotation->type)); | |
| 100 | $field->addArgument($arg); | |
| 101 | } | |
| 102 | } | |
| 103 | ||
| 104 | $field->setDeprecationReason($annotation->deprecationReason ?? $field->getDeprecationReason()); | |
| 105 | $field->setDescription($annotation->description ?? $field->getDescription()); | |
| @@ 212-225 (lines=14) @@ | ||
| 209 | //resolve field arguments | |
| 210 |                 if ($prop instanceof \ReflectionMethod) { | |
| 211 | $argAnnotations = $this->reader->getMethodAnnotations($prop); | |
| 212 |                     foreach ($argAnnotations as $argAnnotation) { | |
| 213 |                         if ($argAnnotation instanceof Annotation\Argument) { | |
| 214 | $arg = new ArgumentDefinition(); | |
| 215 | $arg->setName($argAnnotation->name); | |
| 216 | $arg->setDescription($argAnnotation->description); | |
| 217 | $arg->setInternalName($argAnnotation->internalName); | |
| 218 | $arg->setDefaultValue($argAnnotation->defaultValue); | |
| 219 | $arg->setType(TypeUtil::normalize($argAnnotation->type)); | |
| 220 | $arg->setList(TypeUtil::isTypeList($argAnnotation->type)); | |
| 221 | $arg->setNonNullList(TypeUtil::isTypeNonNullList($argAnnotation->type)); | |
| 222 | $arg->setNonNull(TypeUtil::isTypeNonNull($argAnnotation->type)); | |
| 223 | $field->addArgument($arg); | |
| 224 | } | |
| 225 | } | |
| 226 | } | |
| 227 | ||
| 228 | /** @var Annotation\Connection $connection */ | |
| @@ 86-99 (lines=14) @@ | ||
| 83 | } | |
| 84 | ||
| 85 | $argAnnotations = $this->reader->getClassAnnotations($refClass); | |
| 86 |         foreach ($argAnnotations as $argAnnotation) { | |
| 87 |             if ($argAnnotation instanceof Annotation\Argument) { | |
| 88 | $arg = new ArgumentDefinition(); | |
| 89 | $arg->setName($argAnnotation->name); | |
| 90 | $arg->setDescription($argAnnotation->description); | |
| 91 | $arg->setInternalName($argAnnotation->internalName); | |
| 92 | $arg->setDefaultValue($argAnnotation->defaultValue); | |
| 93 | $arg->setType(TypeUtil::normalize($argAnnotation->type)); | |
| 94 | $arg->setList(TypeUtil::isTypeList($argAnnotation->type)); | |
| 95 | $arg->setNonNullList(TypeUtil::isTypeNonNullList($argAnnotation->type)); | |
| 96 | $arg->setNonNull(TypeUtil::isTypeNonNull($argAnnotation->type)); | |
| 97 | $query->addArgument($arg); | |
| 98 | } | |
| 99 | } | |
| 100 | ||
| 101 | $query->setResolver($refClass->getName()); | |
| 102 | $query->setDeprecationReason($annotation->deprecationReason); | |