GraphQL\Type\Definition\FloatType::parseLiteral PHP Method

parseLiteral() public method

public parseLiteral ( $ast ) : float | null
$ast
return float | null
    public function parseLiteral($ast)
    {
        if ($ast instanceof FloatValueNode || $ast instanceof IntValueNode) {
            return (double) $ast->value;
        }
        return null;
    }