gitlabhq/gitlabhq · error · Gitlab::Graphql::Errors::ArgumentError

You must provide at least one filter argument for this query

Error message

You must provide at least one filter argument for this query

What it means

Error "You must provide at least one filter argument for this query" thrown in gitlabhq/gitlabhq.

Source

Thrown at app/graphql/resolvers/concerns/issuables/root_arguments.rb:11

# frozen_string_literal: true

module Issuables
  module RootArguments
    extend ActiveSupport::Concern

    NON_FILTER_ARGUMENTS = %i[sort lookahead include_archived include_subepics].freeze

    def ready?(**args)
      unless filter_provided?(args)
        raise Gitlab::Graphql::Errors::ArgumentError, _('You must provide at least one filter argument for this query')
      end

      super
    end

    private

    def filter_provided?(args)
      args.except(*NON_FILTER_ARGUMENTS).each_value.any? { |value| value == false || value.present? }
    end

    def prepare_finder_params(args)
      super.tap do |prepared|
        prepared[:non_archived] = !prepared.delete(:include_archived)
      end
    end
  end
end

View on GitHub (pinned to 55ee20384a)

When it happens

Trigger: Thrown at app/graphql/resolvers/concerns/issuables/root_arguments.rb:11 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of gitlabhq/gitlabhq@55ee20384a (2026-08-21). Data as JSON: /api/errors/59dfa2ec23e79c65. Report an issue: GitHub.