We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ff5cf8f commit b4ba276Copy full SHA for b4ba276
src/Execution/Executor.php
@@ -759,13 +759,12 @@ private function getDefaultFieldResolver(): Closure
759
if (is_object($source)) {
760
$propertyName = $info["fieldName"];
761
$methodName = "get" . ucwords($info["fieldName"]);
762
+ // try to use the getter
763
if (method_exists($source, $methodName)) {
764
return $source->{$methodName}();
765
}
- if (property_exists($source, $propertyName)) {
766
- return $source->{$propertyName};
767
- }
768
- return null;
+ // get the property
+ return $source->{$propertyName};
769
770
return null;
771
};
0 commit comments