public static function defaultFieldResolver($rootValue, array $arguments, $contextValues, ResolveInfo $info)
    {
        $fieldName = $info->getFieldName();
        $property  = null;

        if (\is_array($rootValue) && isset($rootValue[$fieldName])) {
            $property = $rootValue[$fieldName];
        }

        if (\is_object($rootValue)) {
            $getter = 'get' . \ucfirst($fieldName);
            if (\method_exists($rootValue, $getter)) {
                $property = $rootValue->{$getter}();
            } elseif (\method_exists($rootValue, $fieldName)) {
                $property = $rootValue->{$fieldName}($rootValue, $arguments, $contextValues, $info);
            } elseif (\property_exists($rootValue, $fieldName)) {
                $property = $rootValue->{$fieldName};
            }
        }

        return $property instanceof \Closure
            ? $property($rootValue, $arguments, $contextValues, $info)
            : $property;
    }
public static function defaultFieldResolver($rootValue, array $arguments, $contextValues, ResolveInfo $info)
    {
        $fieldName = $info->getFieldName();
        $property  = null;

        if (\is_array($rootValue) && isset($rootValue[$fieldName])) {
            $property = $rootValue[$fieldName];
        }

        if (\is_object($rootValue)) {
            $getter = 'get' . \ucfirst($fieldName);
            if (\method_exists($rootValue, $getter)) {
                $property = $rootValue->{$getter}();
            } elseif (\method_exists($rootValue, $fieldName)) {
                $property = $rootValue->{$fieldName}($rootValue, $arguments, $contextValues, $info);
            } elseif (\property_exists($rootValue, $fieldName)) {
                $property = $rootValue->{$fieldName};
            }
        }

        return $property instanceof \Closure
            ? $property($rootValue, $arguments, $contextValues, $info)
            : $property;
    }
public static function defaultFieldResolver ( $ rootValue , array $ arguments , $ contextValues , ResolveInfo $ info ) { $ fieldName = $ info -> getFieldName ( ) ; $ property = null ; if ( \ is_array ( $ rootValue ) && isset ( $ rootValue [ $ fieldName ] ) ) { $ property = $ rootValue [ $ fieldName ] ; } if ( \ is_object ( $ rootValue ) ) { $ getter = 'get' . \ ucfirst ( $ fieldName ) ; if ( \ method_exists ( $ rootValue , $ getter ) ) { $ property = $ rootValue -> { $ getter } ( ) ; } elseif ( \ method_exists ( $ rootValue , $ fieldName ) ) { $ property = $ rootValue -> { $ fieldName } ( $ rootValue , $ arguments , $ contextValues , $ info ) ; } elseif ( \ property_exists ( $ rootValue , $ fieldName ) ) { $ property = $ rootValue -> { $ fieldName } ; } } return $ property instanceof \ Closure ? $ property ( $ rootValue , $ arguments , $ contextValues , $ info ) : $ property ; }
Try to resolve a field without any field resolver function.

@param array|object $rootValue
@param array        $arguments
@param mixed        $contextValues
@param ResolveInfo  $info

@return mixed|null
Try to resolve a field without any field resolver function .