Skip to content

Fix UnresolvedValueError in instance statistics

What does this MR do?

This change fixes the GraphQL::EnumType::UnresolvedValueError error when the identifier field is requested in the instance statistics graphql endpoint.

How to reproduce:

  1. Make sure that we have seed data by running:
    • FILTER=instance_statistics bundle exec rake db:seed_fu
  2. Log in as admin.
  3. Go to graphql explorer
  4. Execute the following query:
    {
      instanceStatisticsMeasurements(identifier: GROUPS, first: 1) {
        nodes {
          count
          recordedAt
          identifier
        }
      }
    }

Original error report: !40871 (comment 423596863)

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by Adam Hegyi

Merge request reports