Skip to content

Commit

Permalink
Wrong method names. #258
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Fenner committed May 13, 2019
1 parent c3d89c4 commit afc0df1
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion app/graphql/types/client_type.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class ClientType < GraphQL::Schema::Object
argument :first, Int, required: false, default_value: 25
end

field :publications, ClientSoftwareConnectionWithMetaType, null: false, connection: true, max_page_size: 100, null: false, description: "Software managed by the client" do
field :softwares, ClientSoftwareConnectionWithMetaType, null: false, connection: true, max_page_size: 100, null: false, description: "Software managed by the client" do
argument :query, String, required: false
argument :first, Int, required: false, default_value: 25
end
Expand Down
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").fetch(:meta, "total")
Event.query(nil, obj_id: object[: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").fetch(:meta, "total")
Event.query(nil, obj_id: object[: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").fetch(:meta, "total")
Event.query(nil, obj_id: object[:id], citation_type: "Funder-SoftwareSourceCode").dig(:meta, "total").to_i
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class ResearcherDatasetConnectionWithMetaType < GraphQL::Types::Relay::BaseConne
field :total_count, Integer, null: false

def total_count
Event.query(nil, obj_id: https_to_http(object[:id]), citation_type: "Dataset-Person").fetch(:meta, "total")
Event.query(nil, obj_id: https_to_http(object[:id]), citation_type: "Dataset-Person").dig(:meta, "total").to_i
end

def https_to_http(url)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class ResearcherPublicationConnectionWithMetaType < GraphQL::Types::Relay::BaseC
field :total_count, Integer, null: false

def total_count
Event.query(nil, obj_id: https_to_http(object[:id]), citation_type: "JournalArticle-Person").fetch(:meta, "total")
Event.query(nil, obj_id: https_to_http(object[:id]), citation_type: "JournalArticle-Person").dig(:meta, "total").to_i
end

def https_to_http(url)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class ResearcherSoftwareConnectionWithMetaType < GraphQL::Types::Relay::BaseConn
field :total_count, Integer, null: false

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

def https_to_http(url)
Expand Down

0 comments on commit afc0df1

Please sign in to comment.