Skip to content

Create AbuseReportLabelType GraphQL type

Eugie Limpin requested to merge el-abuse-report-label-graphql-type into master

Context

This MR implements a part of https://gitlab.com/gitlab-org/gitlab/-/issues/430957+ and is MR no. 2 of 3:

  1. Move base label behavior to a concern
  2. Create AbuseReportLabelType GraphQL type - 👈🏼 YOU ARE HERE
  3. Store abuse report labels separate from project/group labels

Gist of https://gitlab.com/gitlab-org/gitlab/-/issues/430957+

Abuse report labels are currently implemented as Labels and stored in labels DB table. Since these labels are for abuse reports they do not have a project_id or a group_id and should be under gitlab_main_clusterwide schema (labels is under gitlab_main_cell).

The goal is to introduce a separate model and database table for abuse report labels so that both labels and abuse report labels features are compatible with Cells 1.0.

What does this MR do and why?

In this MR we introduce an AbuseReportLabelType GraphQL type and use it to represent abuse report labels (still resolves to Label records). In MR#3 this type will resolve to the new AntiAbuse::Reports::Label records.

The new type uses a subset of fields of LabelType so a new LabelInterface is also added to define the common fields preventing duplication across the two types.

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.

Before After

How to set up and validate locally

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

Edited by Eugie Limpin

Merge request reports

Loading