Skip to content

Add achievementsPath to NamespaceType for graphql

  • Please check this box if this contribution uses AI-generated content (including content generated by GitLab Duo features) as outlined in the GitLab DCO & CLA

What does this MR do and why?

Add achievementsPath to NamespaceType for graphql as described in Expose achievementsPath against NamespaceType (#458269 - closed).

The graphql query for namespace needs an achievementsPath so the user can be redirected to the namespace's achievements.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

GraphQL output showing the achievementsPath in group namespace and null in user namespace

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. In rails console enable the experiment fully
    Feature.enable(:achievements)
  2. From GraphQL Explorer - /-/graphql-explorer
  3. Send the following query:
{
  currentUser {
    userAchievements {
      nodes {
        achievement {
          namespace {
            achievementsPath
          }
        }
      }
    }
    namespace {
      achievementsPath
    }
  }
}

The achievementsPath should be populated for group namespace, and null for user namespace.

Edited by 🤖 GitLab Bot 🤖

Merge request reports