diff --git a/app/graphql/types/event_data_type.rb b/app/graphql/types/event_data_type.rb index d6fec484c..50ae18fa1 100644 --- a/app/graphql/types/event_data_type.rb +++ b/app/graphql/types/event_data_type.rb @@ -2,4 +2,5 @@ class EventDataType < BaseObject implements DoiItem + implements MetricInterface end diff --git a/app/graphql/types/person_type.rb b/app/graphql/types/person_type.rb index 86fccc0c4..2870b938e 100644 --- a/app/graphql/types/person_type.rb +++ b/app/graphql/types/person_type.rb @@ -50,21 +50,21 @@ def software_source_codes(**_args) end def citation_count(**_args) - dois = Event.query(nil, obj_id: https_to_http(object[:id])).results.to_a.map do |e| + dois = Event.query(nil, page: { size: 100 }, obj_id: https_to_http(object[:id])).results.to_a.map do |e| doi_from_url(e.subj_id) end EventsQuery.new.citations(dois.join(",")).sum { |h| h[:count] } end def view_count(**_args) - dois = Event.query(nil, obj_id: https_to_http(object[:id])).results.to_a.map do |e| + dois = Event.query(nil, page: { size: 100 }, obj_id: https_to_http(object[:id])).results.to_a.map do |e| doi_from_url(e.subj_id) end EventsQuery.new.views(dois.join(",")).sum { |h| h[:count] } end def download_count(**_args) - dois = Event.query(nil, obj_id: https_to_http(object[:id])).results.to_a.map do |e| + dois = Event.query(nil, page: { size: 100 }, obj_id: https_to_http(object[:id])).results.to_a.map do |e| doi_from_url(e.subj_id) end EventsQuery.new.downloads(dois.join(",")).sum { |h| h[:count] }