Module: Mutations::ResolvesResourceParent

Extended by:
ActiveSupport::Concern
Includes:
ResolvesGroup, ResolvesProject
Included in:
Boards::Create, Labels::Create
Defined in:
app/graphql/mutations/concerns/mutations/resolves_resource_parent.rb

Instance Method Summary collapse

Methods included from ResolvesProject

#resolve_project

Methods included from ResolvesGroup

#group_resolver, #resolve_group

Instance Method Details

#ready?(**args) ⇒ Boolean

Returns:

  • (Boolean)

19
20
21
22
23
24
25
26
# File 'app/graphql/mutations/concerns/mutations/resolves_resource_parent.rb', line 19

def ready?(**args)
  unless args[:project_path].present? ^ args[:group_path].present?
    raise Gitlab::Graphql::Errors::ArgumentError,
          'Exactly one of group_path or project_path arguments is required'
  end

  super
end