-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Martin Fenner
committed
May 12, 2019
1 parent
60f302a
commit e072fb0
Showing
5 changed files
with
46 additions
and
15 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
11 changes: 11 additions & 0 deletions
11
app/graphql/types/funder_dataset_connection_with_meta_type.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# frozen_string_literal: true | ||
|
||
class FunderDatasetConnectionWithMetaType < GraphQL::Types::Relay::BaseConnection | ||
edge_type(EventEdgeType, edge_class: EventEdge) | ||
|
||
field :total_count, Integer, null: false | ||
|
||
def total_count | ||
Event.query(nil, obj_id: object[:id], citation_type: "Dataset-Funder").fetch(:meta, "total") | ||
end | ||
end |
11 changes: 11 additions & 0 deletions
11
app/graphql/types/funder_publication_connection_with_meta_type.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# frozen_string_literal: true | ||
|
||
class FunderPublicationConnectionWithMetaType < GraphQL::Types::Relay::BaseConnection | ||
edge_type(EventEdgeType, edge_class: EventEdge) | ||
|
||
field :total_count, Integer, null: false | ||
|
||
def total_count | ||
Event.query(nil, obj_id: object[:id], citation_type: "Funder-JournalArticle").fetch(:meta, "total") | ||
end | ||
end |
11 changes: 11 additions & 0 deletions
11
app/graphql/types/funder_software_connection_with_meta_type.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# frozen_string_literal: true | ||
|
||
class FunderSoftwareConnectionWithMetaType < GraphQL::Types::Relay::BaseConnection | ||
edge_type(EventEdgeType, edge_class: EventEdge) | ||
|
||
field :total_count, Integer, null: false | ||
|
||
def total_count | ||
Event.query(nil, obj_id: object[:id], citation_type: "Funder-SoftwareSourceCode").fetch(:meta, "total") | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters