Eliminate N+1 queries in Epics API

This is a follow-up to optimizations in the Todos API: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/25711.

By preloading the required associations and reusing the issuable_metadata keyword from the Todos optimization, we can eliminate N+1 queries in both the Epics and Todos API.

Closes https://gitlab.com/gitlab-org/gitlab-ee/issues/10243

Edited by Stan Hu

Merge request reports

Loading