public function resolveQuery(array $toResolve, QueryService $query)
    {
        foreach ($toResolve as $field => $valueExpression) {
            if (!is_a($valueExpression, ValueExpression::class)) {
                throw QueryException::queryParseErrorException();
            }

            $method = sprintf("query%s", ucfirst(camel_case($field)));

            if (!method_exists($this, $method)) {
                throw QueryException::queryMethodNotFoundException($method);
            }

            $this->{$method}($query, $valueExpression);
        }

        return true;
    }