Skip to content

GraphQL: Enable arguments to be marked as deprecated in schema

What does this MR do?

The newer version of the graphql gem updated in !53697 (merged) supports deprecating arguments within the schema (https://github.com/rmosolgo/graphql-ruby/pull/3015).

Previously, GitLab's deprecated arguments were only marked as such in their description. This MR additionally marks deprecated arguments as such in the schema (and therefore also in introspection queries).

What has changed?

Resolvers that include the TimeFrameArguments module receive two deprecated arguments: startDate and endDate. This makes the affected parts of the schema the following fields:

  • Project.milestones
  • Group.milestones
  • Project.iterations
  • Project.milestones
  • Group.epic
  • Group.epics
  • Group.iterations
  • Group.milestones
  • BoardEpic.children
  • Epic.children

Unrelated note: because the deprecated arguments are in a non-deprecated module, over time the module has been included into new resolvers which has had the effect of new fields having instantly deprecated arguments. The arguments in the module are due to be removed in %14.0.

QA testing

There are two ways to see the change in this branch:

Using GraphiQL we can QA that queries that use the deprecated arguments are still valid:

{
  group(fullPath: "gitlab-org") {
    epics(startDate: "2020-12-12", endDate: "2021-01-12") {
      nodes {
        id
      }
    }
  }
}

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Edited by Luke Duncalfe

Merge request reports