diff --git a/app/graphql/types/query_type.rb b/app/graphql/types/query_type.rb index 4500c8ec4..4af572ce2 100644 --- a/app/graphql/types/query_type.rb +++ b/app/graphql/types/query_type.rb @@ -154,7 +154,7 @@ def people(query: nil, first: nil) def creative_works(query: nil, ids: nil, client_id: nil, provider_id: nil, first: nil) if ids.present? dois = ids.split(",").map { |i| doi_from_url(i) } - Doi.find_by_ids(dois, page: { number: 1, size: first }).results.to_a + ElasticsearchLoader.for(Doi).load_many(dois) else Doi.query(query, client_id: client_id, provider_id: provider_id, state: "findable", page: { number: 1, size: first }).results.to_a end