Skip to content

Commit

Permalink
fix total_count. #257
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Fenner committed May 15, 2019
1 parent e9a223b commit d53f976
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ class FunderDatasetConnectionWithMetaType < GraphQL::Types::Relay::BaseConnectio
field :total_count, Integer, null: false

def total_count
Event.query(nil, obj_id: object[:id], citation_type: "Dataset-Funder").dig(:meta, "total").to_i
Event.query(nil, obj_id: object.parent[:id], citation_type: "Dataset-Funder").dig(:meta, "total").to_i
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ class FunderPublicationConnectionWithMetaType < GraphQL::Types::Relay::BaseConne
field :total_count, Integer, null: false

def total_count
Event.query(nil, obj_id: object[:id], citation_type: "Funder-JournalArticle").dig(:meta, "total").to_i
Event.query(nil, obj_id: object.parent[:id], citation_type: "Funder-JournalArticle").dig(:meta, "total").to_i
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ class FunderSoftwareConnectionWithMetaType < GraphQL::Types::Relay::BaseConnecti
field :total_count, Integer, null: false

def total_count
Event.query(nil, obj_id: object[:id], citation_type: "Funder-SoftwareSourceCode").dig(:meta, "total").to_i
Event.query(nil, obj_id: object.parent[:id], citation_type: "Funder-SoftwareSourceCode").dig(:meta, "total").to_i
end
end

0 comments on commit d53f976

Please sign in to comment.