Skip to content

NoMethodError: undefined method `object' for #<GraphQL::Execution::Lazy:0x00007fc00314f3f0>

Providing iid and iids arguments to the project.mergeRequests GraphQL Query causes errors.

Example query:

{
  project(fullPath: "gitlab-com/www-gitlab-com") {
    name
    mergeRequests(iids: ["1"]) {
      nodes {
        title
      }
    }
  }
}

May be related to #34527 (closed).

Error details

https://sentry.gitlab.net/gitlab/gitlabcom/issues/1461333/?referrer=gitlab_plugin

NoMethodError: undefined method `object' for #<GraphQL::Execution::Lazy:0x00007fc00314f3f0>
Did you mean?  object_id
  gitlab/graphql/authorize/authorize_field_service.rb:84:in `block in filter_allowed'
    allowed_access?(current_user, single_object_type.object)
  gitlab/graphql/authorize/authorize_field_service.rb:83:in `select'
    resolved_type.select do |single_object_type|
  gitlab/graphql/authorize/authorize_field_service.rb:83:in `filter_allowed'
    resolved_type.select do |single_object_type|
  gitlab/graphql/authorize/authorize_field_service.rb:21:in `block in authorized_resolve'
    filter_allowed(ctx[:current_user], resolved_type, authorizing_object)
  graphql/field.rb:136:in `resolve'
    resolve_proc.call(object, arguments, context)
...
(228 additional frame(s) were not displayed)

NoMethodError: undefined method `object' for #<GraphQL::Execution::Lazy:0x00007fc00314f3f0>
Did you mean?  object_id