diff --git a/app/graphql/types/base_connection.rb b/app/graphql/types/base_connection.rb index 9ab191daa..ee44dc442 100644 --- a/app/graphql/types/base_connection.rb +++ b/app/graphql/types/base_connection.rb @@ -204,7 +204,7 @@ def facet_by_authors(arr) if orcid_id.nil? next end - + # The aggregation query should only return 1 hit, so hence the index # into first element creators = hsh.dig("authors", "hits", "hits")[0].dig("_source", "creators")