• Sarah Yasonik's avatar
    Improve performance of querying alert assignees · b8ccd78e
    Sarah Yasonik authored
    Querying AlertManagementAlerts with the assignee field
    through the GraphQL API would result in a N+1 query.
    
    This fixes the query by using BatchLoader::Graphql to
    group the assignee queries at the end of multiplex query,
    only once all alerts have been processed. The accomodate
    authorizations, this logic circumvents our GraphQL auth
    layer, asserting the same authorization only after
    the BatchLoader has completed its work.
    b8ccd78e
assignees_resolver_spec.rb 1.02 KB