Skip to content
Snippets Groups Projects

Add support for querying epics with GraphQL

Merged Brett Walker requested to merge 10795-add-epic-tree-BE-epic-graphql-support into master
All threads resolved!
3 files
+ 38
2
Compare changes
  • Side-by-side
  • Inline
Files
3
@@ -9,7 +9,8 @@ class AnalyticsStageEntity < Grape::Entity
expose :description
expose :median, as: :value do |stage|
# median returns a BatchLoader instance which we first have to unwrap by using to_i
!stage.median.to_i.zero? ? distance_of_time_in_words(stage.median) : nil
# median returns a BatchLoader instance which we first have to unwrap by using to_f
# we use to_f to make sure results below 1 are presented to the end-user
stage.median.to_f.nonzero? ? distance_of_time_in_words(stage.median) : nil
end
end
Loading