-
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
Oct 5, 2019
1 parent
76a2288
commit c7cef37
Showing
8 changed files
with
42 additions
and
81 deletions.
There are no files selected for viewing
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
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
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
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 |
---|---|---|
@@ -1,22 +1,23 @@ | ||
# frozen_string_literal: true | ||
|
||
class FunderConnectionWithMetaType < BaseConnection | ||
edge_type(FunderEdgeType) | ||
field_class GraphQL::Cache::Field | ||
# class FunderConnectionWithMetaType < BaseConnection | ||
|
||
field :publication_connection_count, Integer, null: false, cache: true | ||
field :dataset_connection_count, Integer, null: false, cache: true | ||
field :software_connection_count, Integer, null: false, cache: true | ||
# edge_type(FunderEdgeType) | ||
# field_class GraphQL::Cache::Field | ||
|
||
# field :publication_connection_count, Integer, null: false, cache: true | ||
# field :dataset_connection_count, Integer, null: false, cache: true | ||
# field :software_connection_count, Integer, null: false, cache: true | ||
|
||
def publication_connection_count | ||
Event.query(nil, citation_type: "Funder-ScholarlyArticle").results.total | ||
end | ||
# def publication_connection_count | ||
# Event.query(nil, citation_type: "Funder-ScholarlyArticle").results.total | ||
# end | ||
|
||
def dataset_connection_count | ||
Event.query(nil, citation_type: "Dataset-Funder").results.total | ||
end | ||
# def dataset_connection_count | ||
# Event.query(nil, citation_type: "Dataset-Funder").results.total | ||
# end | ||
|
||
def software_connection_count | ||
Event.query(nil, citation_type: "Funder-SoftwareSourceCode").results.total | ||
end | ||
end | ||
# def software_connection_count | ||
# Event.query(nil, citation_type: "Funder-SoftwareSourceCode").results.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
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 |
---|---|---|
@@ -1,27 +1,27 @@ | ||
# frozen_string_literal: true | ||
|
||
class PersonConnectionWithMetaType < BaseConnection | ||
edge_type(PersonEdgeType) | ||
field_class GraphQL::Cache::Field | ||
# class PersonConnectionWithMetaType < BaseConnection | ||
# edge_type(PersonEdgeType) | ||
# field_class GraphQL::Cache::Field | ||
|
||
field :publication_connection_count, Integer, null: false, cache: true | ||
field :dataset_connection_count, Integer, null: false, cache: true | ||
field :software_connection_count, Integer, null: false, cache: true | ||
field :organization_connection_count, Integer, null: false, cache: true | ||
# field :publication_connection_count, Integer, null: false, cache: true | ||
# field :dataset_connection_count, Integer, null: false, cache: true | ||
# field :software_connection_count, Integer, null: false, cache: true | ||
# field :organization_connection_count, Integer, null: false, cache: true | ||
|
||
def publication_connection_count | ||
Event.query(nil, citation_type: "Person-ScholarlyArticle").results.total | ||
end | ||
# def publication_connection_count | ||
# Event.query(nil, citation_type: "Person-ScholarlyArticle").results.total | ||
# end | ||
|
||
def dataset_connection_count | ||
Event.query(nil, citation_type: "Dataset-Person").results.total | ||
end | ||
# def dataset_connection_count | ||
# Event.query(nil, citation_type: "Dataset-Person").results.total | ||
# end | ||
|
||
def software_connection_count | ||
Event.query(nil, citation_type: "Person-SoftwareSourceCode").results.total | ||
end | ||
# def software_connection_count | ||
# Event.query(nil, citation_type: "Person-SoftwareSourceCode").results.total | ||
# end | ||
|
||
def organization_connection_count | ||
Event.query(nil, citation_type: "Organization-Person").results.total | ||
end | ||
end | ||
# def organization_connection_count | ||
# Event.query(nil, citation_type: "Organization-Person").results.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
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