Skip to content

Add filters to the milestones resolver

Alex Kalderimis requested to merge ajk-graphql-milestone-filters into master

What does this MR do?

This MR improves the milestone resolver in the following ways:

  • adds arguments allowing milestones to be found by title (exact match and substring search)
  • adds a convenience argument to deal with the common need to find milestones active on a single given date
  • updates the description of time frame arguments to emphasize that they represent an OVERLAPS operation
  • add tests for within_timeframe, since it appeared to be untested.
  • adds a new input object to represent timeframes, which provides better type information to clients

The new input object allows up to statically represent the restriction that if the range is specified, both ends of it must be given. It also encapsulates the validation that start <= end.

The substring search threshold for milestones is reduced to 2 because otherwise the common case of searching for all milestones at 1.x are inexpressible. The smaller number of milestones (compared to tables such as issues) and the short titles that they typically have, means this is likely to result in acceptable performance.

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Edited by Alex Kalderimis

Merge request reports