From 0043a1db3a89145d2cc68d4a1e9383c0167ddd8c Mon Sep 17 00:00:00 2001 From: Martin Fenner Date: Fri, 10 Apr 2020 14:27:48 +0200 Subject: [PATCH] fix connection queries --- .../types/audiovisual_connection_type.rb | 38 +++++++++--------- .../types/collection_connection_type.rb | 38 +++++++++--------- .../types/data_paper_connection_type.rb | 38 +++++++++--------- app/graphql/types/dataset_connection_type.rb | 38 +++++++++--------- app/graphql/types/event_connection_type.rb | 38 +++++++++--------- app/graphql/types/image_connection_type.rb | 38 +++++++++--------- .../types/instrument_connection_type.rb | 40 +++++++++---------- .../interactive_resource_connection_type.rb | 38 +++++++++--------- .../types/member_prefix_connection_type.rb | 2 +- app/graphql/types/model_connection_type.rb | 38 +++++++++--------- app/graphql/types/other_connection_type.rb | 38 +++++++++--------- .../types/physical_object_connection_type.rb | 38 +++++++++--------- .../types/publication_connection_type.rb | 38 +++++++++--------- app/graphql/types/service_connection_type.rb | 20 +++++++++- app/graphql/types/software_connection_type.rb | 37 ++++++++--------- app/graphql/types/sound_connection_type.rb | 38 +++++++++--------- app/graphql/types/thesis_connection_type.rb | 39 +++++++++--------- app/graphql/types/work_connection_type.rb | 38 +++++++++--------- app/graphql/types/workflow_connection_type.rb | 38 +++++++++--------- 19 files changed, 345 insertions(+), 325 deletions(-) diff --git a/app/graphql/types/audiovisual_connection_type.rb b/app/graphql/types/audiovisual_connection_type.rb index 4477d9306..dc66d432c 100644 --- a/app/graphql/types/audiovisual_connection_type.rb +++ b/app/graphql/types/audiovisual_connection_type.rb @@ -21,24 +21,24 @@ def years end def response(**args) - @response ||= Doi.query(args[:query], - ids: args[:ids], - user_id: args[:user_id], - repository_id: args[:repository_id], - member_id: args[:member_id], - funder_id: args[:funder_id], - affiliation_id: args[:affiliation_id], - re3data_id: args[:re3data_id], - year: args[:year], - resource_type_id: "Audiovisual", - has_person: args[:has_person], - has_funder: args[:has_funder], - has_organization: args[:has_organization], - has_citations: args[:has_citations], - has_parts: args[:has_parts], - has_versions: args[:has_versions], - has_views: args[:has_views], - has_downloads: args[:has_downloads], - page: { number: 1, size: 0 }) + Doi.query(args[:query], + ids: args[:ids], + user_id: args[:user_id], + client_id: args[:repository_id], + provider_id: args[:member_id], + funder_id: args[:funder_id], + affiliation_id: args[:affiliation_id], + re3data_id: args[:re3data_id], + year: args[:year], + resource_type_id: "Audiovisual", + has_person: args[:has_person], + has_funder: args[:has_funder], + has_organization: args[:has_organization], + has_citations: args[:has_citations], + has_parts: args[:has_parts], + has_versions: args[:has_versions], + has_views: args[:has_views], + has_downloads: args[:has_downloads], + page: { number: 1, size: 0 }) end end diff --git a/app/graphql/types/collection_connection_type.rb b/app/graphql/types/collection_connection_type.rb index f2c9b2c94..bd2dedf5c 100644 --- a/app/graphql/types/collection_connection_type.rb +++ b/app/graphql/types/collection_connection_type.rb @@ -21,24 +21,24 @@ def years end def response(**args) - @response ||= Doi.query(args[:query], - ids: args[:ids], - user_id: args[:user_id], - repository_id: args[:repository_id], - member_id: args[:member_id], - funder_id: args[:funder_id], - affiliation_id: args[:affiliation_id], - re3data_id: args[:re3data_id], - year: args[:year], - resource_type_id: "Collection", - has_person: args[:has_person], - has_funder: args[:has_funder], - has_organization: args[:has_organization], - has_citations: args[:has_citations], - has_parts: args[:has_parts], - has_versions: args[:has_versions], - has_views: args[:has_views], - has_downloads: args[:has_downloads], - page: { number: 1, size: 0 }) + Doi.query(args[:query], + ids: args[:ids], + user_id: args[:user_id], + client_id: args[:repository_id], + provider_id: args[:member_id], + funder_id: args[:funder_id], + affiliation_id: args[:affiliation_id], + re3data_id: args[:re3data_id], + year: args[:year], + resource_type_id: "Collection", + has_person: args[:has_person], + has_funder: args[:has_funder], + has_organization: args[:has_organization], + has_citations: args[:has_citations], + has_parts: args[:has_parts], + has_versions: args[:has_versions], + has_views: args[:has_views], + has_downloads: args[:has_downloads], + page: { number: 1, size: 0 }) end end diff --git a/app/graphql/types/data_paper_connection_type.rb b/app/graphql/types/data_paper_connection_type.rb index ba3577890..f5c3d2ac7 100644 --- a/app/graphql/types/data_paper_connection_type.rb +++ b/app/graphql/types/data_paper_connection_type.rb @@ -21,24 +21,24 @@ def years end def response(**args) - @response ||= Doi.query(args[:query], - ids: args[:ids], - user_id: args[:user_id], - repository_id: args[:repository_id], - member_id: args[:member_id], - funder_id: args[:funder_id], - affiliation_id: args[:affiliation_id], - re3data_id: args[:re3data_id], - year: args[:year], - resource_type_id: "DataPaper", - has_person: args[:has_person], - has_funder: args[:has_funder], - has_organization: args[:has_organization], - has_citations: args[:has_citations], - has_parts: args[:has_parts], - has_versions: args[:has_versions], - has_views: args[:has_views], - has_downloads: args[:has_downloads], - page: { number: 1, size: 0 }) + Doi.query(args[:query], + ids: args[:ids], + user_id: args[:user_id], + client_id: args[:repository_id], + provider_id: args[:member_id], + funder_id: args[:funder_id], + affiliation_id: args[:affiliation_id], + re3data_id: args[:re3data_id], + year: args[:year], + resource_type_id: "DataPaper", + has_person: args[:has_person], + has_funder: args[:has_funder], + has_organization: args[:has_organization], + has_citations: args[:has_citations], + has_parts: args[:has_parts], + has_versions: args[:has_versions], + has_views: args[:has_views], + has_downloads: args[:has_downloads], + page: { number: 1, size: 0 }) end end diff --git a/app/graphql/types/dataset_connection_type.rb b/app/graphql/types/dataset_connection_type.rb index 54d6d48e6..3f8d36c53 100644 --- a/app/graphql/types/dataset_connection_type.rb +++ b/app/graphql/types/dataset_connection_type.rb @@ -27,25 +27,25 @@ def years end def response(**args) - @response ||= Doi.query(args[:query], - ids: args[:ids], - user_id: args[:user_id], - repository_id: args[:repository_id], - member_id: args[:member_id], - funder_id: args[:funder_id], - affiliation_id: args[:affiliation_id], - re3data_id: args[:re3data_id], - year: args[:year], - resource_type_id: "Dataset", - has_person: args[:has_person], - has_funder: args[:has_funder], - has_organization: args[:has_organization], - has_citations: args[:has_citations], - has_parts: args[:has_parts], - has_versions: args[:has_versions], - has_views: args[:has_views], - has_downloads: args[:has_downloads], - page: { number: 1, size: 0 }) + Doi.query(args[:query], + ids: args[:ids], + user_id: args[:user_id], + client_id: args[:repository_id], + provider_id: args[:member_id], + funder_id: args[:funder_id], + affiliation_id: args[:affiliation_id], + re3data_id: args[:re3data_id], + year: args[:year], + resource_type_id: "Dataset", + has_person: args[:has_person], + has_funder: args[:has_funder], + has_organization: args[:has_organization], + has_citations: args[:has_citations], + has_parts: args[:has_parts], + has_versions: args[:has_versions], + has_views: args[:has_views], + has_downloads: args[:has_downloads], + page: { number: 1, size: 0 }) end def dataset_connection_count diff --git a/app/graphql/types/event_connection_type.rb b/app/graphql/types/event_connection_type.rb index 324ce40aa..a7e755f5b 100644 --- a/app/graphql/types/event_connection_type.rb +++ b/app/graphql/types/event_connection_type.rb @@ -21,24 +21,24 @@ def years end def response(**args) - @response ||= Doi.query(args[:query], - ids: args[:ids], - user_id: args[:user_id], - repository_id: args[:repository_id], - member_id: args[:member_id], - funder_id: args[:funder_id], - affiliation_id: args[:affiliation_id], - re3data_id: args[:re3data_id], - year: args[:year], - resource_type_id: "Event", - has_person: args[:has_person], - has_funder: args[:has_funder], - has_organization: args[:has_organization], - has_citations: args[:has_citations], - has_parts: args[:has_parts], - has_versions: args[:has_versions], - has_views: args[:has_views], - has_downloads: args[:has_downloads], - page: { number: 1, size: 0 }) + Doi.query(args[:query], + ids: args[:ids], + user_id: args[:user_id], + client_id: args[:repository_id], + provider_id: args[:member_id], + funder_id: args[:funder_id], + affiliation_id: args[:affiliation_id], + re3data_id: args[:re3data_id], + year: args[:year], + resource_type_id: "Event", + has_person: args[:has_person], + has_funder: args[:has_funder], + has_organization: args[:has_organization], + has_citations: args[:has_citations], + has_parts: args[:has_parts], + has_versions: args[:has_versions], + has_views: args[:has_views], + has_downloads: args[:has_downloads], + page: { number: 1, size: 0 }) end end diff --git a/app/graphql/types/image_connection_type.rb b/app/graphql/types/image_connection_type.rb index 59d8d1c59..959ab45a0 100644 --- a/app/graphql/types/image_connection_type.rb +++ b/app/graphql/types/image_connection_type.rb @@ -21,24 +21,24 @@ def years end def response(**args) - @response ||= Doi.query(args[:query], - ids: args[:ids], - user_id: args[:user_id], - repository_id: args[:repository_id], - member_id: args[:member_id], - funder_id: args[:funder_id], - affiliation_id: args[:affiliation_id], - re3data_id: args[:re3data_id], - year: args[:year], - resource_type_id: "Image", - has_person: args[:has_person], - has_funder: args[:has_funder], - has_organization: args[:has_organization], - has_citations: args[:has_citations], - has_parts: args[:has_parts], - has_versions: args[:has_versions], - has_views: args[:has_views], - has_downloads: args[:has_downloads], - page: { number: 1, size: 0 }) + Doi.query(args[:query], + ids: args[:ids], + user_id: args[:user_id], + client_id: args[:repository_id], + provider_id: args[:member_id], + funder_id: args[:funder_id], + affiliation_id: args[:affiliation_id], + re3data_id: args[:re3data_id], + year: args[:year], + resource_type_id: "Image", + has_person: args[:has_person], + has_funder: args[:has_funder], + has_organization: args[:has_organization], + has_citations: args[:has_citations], + has_parts: args[:has_parts], + has_versions: args[:has_versions], + has_views: args[:has_views], + has_downloads: args[:has_downloads], + page: { number: 1, size: 0 }) end end diff --git a/app/graphql/types/instrument_connection_type.rb b/app/graphql/types/instrument_connection_type.rb index 867329fcc..9287fdf80 100644 --- a/app/graphql/types/instrument_connection_type.rb +++ b/app/graphql/types/instrument_connection_type.rb @@ -21,25 +21,25 @@ def years end def response(**args) - @response ||= Doi.query(args[:query], - ids: args[:ids], - user_id: args[:user_id], - repository_id: args[:repository_id], - member_id: args[:member_id], - funder_id: args[:funder_id], - affiliation_id: args[:affiliation_id], - re3data_id: args[:re3data_id], - year: args[:year], - resource_type_id: "Other", - resource_type: "Instrument", - has_person: args[:has_person], - has_funder: args[:has_funder], - has_organization: args[:has_organization], - has_citations: args[:has_citations], - has_parts: args[:has_parts], - has_versions: args[:has_versions], - has_views: args[:has_views], - has_downloads: args[:has_downloads], - page: { number: 1, size: 0 }) + Doi.query(args[:query], + ids: args[:ids], + user_id: args[:user_id], + client_id: args[:repository_id], + provider_id: args[:member_id], + funder_id: args[:funder_id], + affiliation_id: args[:affiliation_id], + re3data_id: args[:re3data_id], + year: args[:year], + resource_type_id: "Other", + resource_type: "Instrument", + has_person: args[:has_person], + has_funder: args[:has_funder], + has_organization: args[:has_organization], + has_citations: args[:has_citations], + has_parts: args[:has_parts], + has_versions: args[:has_versions], + has_views: args[:has_views], + has_downloads: args[:has_downloads], + page: { number: 1, size: 0 }) end end diff --git a/app/graphql/types/interactive_resource_connection_type.rb b/app/graphql/types/interactive_resource_connection_type.rb index 7802f9274..dc8c3cc60 100644 --- a/app/graphql/types/interactive_resource_connection_type.rb +++ b/app/graphql/types/interactive_resource_connection_type.rb @@ -21,24 +21,24 @@ def years end def response(**args) - @response ||= Doi.query(args[:query], - ids: args[:ids], - user_id: args[:user_id], - repository_id: args[:repository_id], - member_id: args[:member_id], - funder_id: args[:funder_id], - affiliation_id: args[:affiliation_id], - re3data_id: args[:re3data_id], - year: args[:year], - resource_type_id: "InteractiveResource", - has_person: args[:has_person], - has_funder: args[:has_funder], - has_organization: args[:has_organization], - has_citations: args[:has_citations], - has_parts: args[:has_parts], - has_versions: args[:has_versions], - has_views: args[:has_views], - has_downloads: args[:has_downloads], - page: { number: 1, size: 0 }) + Doi.query(args[:query], + ids: args[:ids], + user_id: args[:user_id], + client_id: args[:repository_id], + provider_id: args[:member_id], + funder_id: args[:funder_id], + affiliation_id: args[:affiliation_id], + re3data_id: args[:re3data_id], + year: args[:year], + resource_type_id: "InteractiveResource", + has_person: args[:has_person], + has_funder: args[:has_funder], + has_organization: args[:has_organization], + has_citations: args[:has_citations], + has_parts: args[:has_parts], + has_versions: args[:has_versions], + has_views: args[:has_views], + has_downloads: args[:has_downloads], + page: { number: 1, size: 0 }) end end diff --git a/app/graphql/types/member_prefix_connection_type.rb b/app/graphql/types/member_prefix_connection_type.rb index 581f217e6..9f52c265b 100644 --- a/app/graphql/types/member_prefix_connection_type.rb +++ b/app/graphql/types/member_prefix_connection_type.rb @@ -32,6 +32,6 @@ def years end def response(**args) - @response ||= ProviderPrefix.query(args[:query], member_id: args[:member_id], state: args[:state], year: args[:year], page: { number: 1, size: 0 }) + @response ||= ProviderPrefix.query(args[:query], provider_id: args[:member_id], state: args[:state], year: args[:year], page: { number: 1, size: 0 }) end end diff --git a/app/graphql/types/model_connection_type.rb b/app/graphql/types/model_connection_type.rb index 60a81d7c2..07c9a5684 100644 --- a/app/graphql/types/model_connection_type.rb +++ b/app/graphql/types/model_connection_type.rb @@ -21,24 +21,24 @@ def years end def response(**args) - @response ||= Doi.query(args[:query], - ids: args[:ids], - user_id: args[:user_id], - repository_id: args[:repository_id], - member_id: args[:member_id], - funder_id: args[:funder_id], - affiliation_id: args[:affiliation_id], - re3data_id: args[:re3data_id], - year: args[:year], - resource_type_id: "Model", - has_person: args[:has_person], - has_funder: args[:has_funder], - has_organization: args[:has_organization], - has_citations: args[:has_citations], - has_parts: args[:has_parts], - has_versions: args[:has_versions], - has_views: args[:has_views], - has_downloads: args[:has_downloads], - page: { number: 1, size: 0 }) + Doi.query(args[:query], + ids: args[:ids], + user_id: args[:user_id], + client_id: args[:repository_id], + provider_id: args[:member_id], + funder_id: args[:funder_id], + affiliation_id: args[:affiliation_id], + re3data_id: args[:re3data_id], + year: args[:year], + resource_type_id: "Model", + has_person: args[:has_person], + has_funder: args[:has_funder], + has_organization: args[:has_organization], + has_citations: args[:has_citations], + has_parts: args[:has_parts], + has_versions: args[:has_versions], + has_views: args[:has_views], + has_downloads: args[:has_downloads], + page: { number: 1, size: 0 }) end end diff --git a/app/graphql/types/other_connection_type.rb b/app/graphql/types/other_connection_type.rb index 9dc182982..7a29347ce 100644 --- a/app/graphql/types/other_connection_type.rb +++ b/app/graphql/types/other_connection_type.rb @@ -21,24 +21,24 @@ def years end def response(**args) - @response ||= Doi.query(args[:query], - ids: args[:ids], - user_id: args[:user_id], - repository_id: args[:repository_id], - member_id: args[:member_id], - funder_id: args[:funder_id], - affiliation_id: args[:affiliation_id], - re3data_id: args[:re3data_id], - year: args[:year], - resource_type_id: "Other", - has_person: args[:has_person], - has_funder: args[:has_funder], - has_organization: args[:has_organization], - has_citations: args[:has_citations], - has_parts: args[:has_parts], - has_versions: args[:has_versions], - has_views: args[:has_views], - has_downloads: args[:has_downloads], - page: { number: 1, size: 0 }) + Doi.query(args[:query], + ids: args[:ids], + user_id: args[:user_id], + client_id: args[:repository_id], + provider_id: args[:member_id], + funder_id: args[:funder_id], + affiliation_id: args[:affiliation_id], + re3data_id: args[:re3data_id], + year: args[:year], + resource_type_id: "Other", + has_person: args[:has_person], + has_funder: args[:has_funder], + has_organization: args[:has_organization], + has_citations: args[:has_citations], + has_parts: args[:has_parts], + has_versions: args[:has_versions], + has_views: args[:has_views], + has_downloads: args[:has_downloads], + page: { number: 1, size: 0 }) end end diff --git a/app/graphql/types/physical_object_connection_type.rb b/app/graphql/types/physical_object_connection_type.rb index cada1f581..56b967581 100644 --- a/app/graphql/types/physical_object_connection_type.rb +++ b/app/graphql/types/physical_object_connection_type.rb @@ -21,24 +21,24 @@ def years end def response(**args) - @response ||= Doi.query(args[:query], - ids: args[:ids], - user_id: args[:user_id], - client_id: args[:client_id], - member_id: args[:member_id], - funder_id: args[:funder_id], - affiliation_id: args[:affiliation_id], - re3data_id: args[:re3data_id], - year: args[:year], - resource_type_id: "PhysicalObject", - has_person: args[:has_person], - has_funder: args[:has_funder], - has_organization: args[:has_organization], - has_citations: args[:has_citations], - has_parts: args[:has_parts], - has_versions: args[:has_versions], - has_views: args[:has_views], - has_downloads: args[:has_downloads], - page: { number: 1, size: 0 }) + Doi.query(args[:query], + ids: args[:ids], + user_id: args[:user_id], + client_id: args[:repository_id], + provider_id: args[:member_id], + funder_id: args[:funder_id], + affiliation_id: args[:affiliation_id], + re3data_id: args[:re3data_id], + year: args[:year], + resource_type_id: "PhysicalObject", + has_person: args[:has_person], + has_funder: args[:has_funder], + has_organization: args[:has_organization], + has_citations: args[:has_citations], + has_parts: args[:has_parts], + has_versions: args[:has_versions], + has_views: args[:has_views], + has_downloads: args[:has_downloads], + page: { number: 1, size: 0 }) end end diff --git a/app/graphql/types/publication_connection_type.rb b/app/graphql/types/publication_connection_type.rb index 4f1760c55..c7f1ed4e2 100644 --- a/app/graphql/types/publication_connection_type.rb +++ b/app/graphql/types/publication_connection_type.rb @@ -27,25 +27,25 @@ def years end def response(**args) - @response ||= Doi.query(args[:query], - ids: args[:ids], - user_id: args[:user_id], - repository_id: args[:repository_id], - member_id: args[:member_id], - funder_id: args[:funder_id], - affiliation_id: args[:affiliation_id], - re3data_id: args[:re3data_id], - year: args[:year], - resource_type_id: "Text", - has_person: args[:has_person], - has_funder: args[:has_funder], - has_organization: args[:has_organization], - has_citations: args[:has_citations], - has_parts: args[:has_parts], - has_versions: args[:has_versions], - has_views: args[:has_views], - has_downloads: args[:has_downloads], - page: { number: 1, size: 0 }) + Doi.query(args[:query], + ids: args[:ids], + user_id: args[:user_id], + client_id: args[:repository_id], + provider_id: args[:member_id], + funder_id: args[:funder_id], + affiliation_id: args[:affiliation_id], + re3data_id: args[:re3data_id], + year: args[:year], + resource_type_id: "Text", + has_person: args[:has_person], + has_funder: args[:has_funder], + has_organization: args[:has_organization], + has_citations: args[:has_citations], + has_parts: args[:has_parts], + has_versions: args[:has_versions], + has_views: args[:has_views], + has_downloads: args[:has_downloads], + page: { number: 1, size: 0 }) end def publication_connection_count diff --git a/app/graphql/types/service_connection_type.rb b/app/graphql/types/service_connection_type.rb index 80d4ce6d5..6a06cc610 100644 --- a/app/graphql/types/service_connection_type.rb +++ b/app/graphql/types/service_connection_type.rb @@ -21,6 +21,24 @@ def years end def response(**args) - @response ||= Doi.query(args[:query], user_id: args[:user_id], client_id: args[:repository_id], provider_id: args[:member_id], year: args[:year], resource_type_id: "Service", has_citations: args[:has_citations], has_parts: args[:has_parts], has_versions: args[:has_versions], has_views: args[:has_views], has_downloads: args[:has_downloads], page: { number: 1, size: 0 }) + Doi.query(args[:query], + ids: args[:ids], + user_id: args[:user_id], + client_id: args[:repository_id], + provider_id: args[:member_id], + funder_id: args[:funder_id], + affiliation_id: args[:affiliation_id], + re3data_id: args[:re3data_id], + year: args[:year], + resource_type_id: "Service", + has_person: args[:has_person], + has_funder: args[:has_funder], + has_organization: args[:has_organization], + has_citations: args[:has_citations], + has_parts: args[:has_parts], + has_versions: args[:has_versions], + has_views: args[:has_views], + has_downloads: args[:has_downloads], + page: { number: 1, size: 0 }) end end diff --git a/app/graphql/types/software_connection_type.rb b/app/graphql/types/software_connection_type.rb index 946b40c02..36e0c72c3 100644 --- a/app/graphql/types/software_connection_type.rb +++ b/app/graphql/types/software_connection_type.rb @@ -28,24 +28,25 @@ def years end def response(**args) - @response ||= Doi.query(args[:query], - user_id: args[:user_id], - repository_id: args[:repository_id], - member_id: args[:member_id], - funder_id: args[:funder_id], - affiliation_id: args[:affiliation_id], - re3data_id: args[:re3data_id], - year: args[:year], - resource_type_id: "Software", - has_person: args[:has_person], - has_funder: args[:has_funder], - has_organization: args[:has_organization], - has_citations: args[:has_citations], - has_parts: args[:has_parts], - has_versions: args[:has_versions], - has_views: args[:has_views], - has_downloads: args[:has_downloads], - page: { number: 1, size: 0 }) + Doi.query(args[:query], + ids: args[:ids], + user_id: args[:user_id], + repository_id: args[:repository_id], + member_id: args[:member_id], + funder_id: args[:funder_id], + affiliation_id: args[:affiliation_id], + re3data_id: args[:re3data_id], + year: args[:year], + resource_type_id: "Software", + has_person: args[:has_person], + has_funder: args[:has_funder], + has_organization: args[:has_organization], + has_citations: args[:has_citations], + has_parts: args[:has_parts], + has_versions: args[:has_versions], + has_views: args[:has_views], + has_downloads: args[:has_downloads], + page: { number: 1, size: 0 }) end def software_connection_count diff --git a/app/graphql/types/sound_connection_type.rb b/app/graphql/types/sound_connection_type.rb index dc08c1f09..629802c40 100644 --- a/app/graphql/types/sound_connection_type.rb +++ b/app/graphql/types/sound_connection_type.rb @@ -21,24 +21,24 @@ def years end def response(**args) - @response ||= Doi.query(args[:query], - ids: args[:ids], - user_id: args[:user_id], - repository_id: args[:repository_id], - member_id: args[:member_id], - funder_id: args[:funder_id], - affiliation_id: args[:affiliation_id], - re3data_id: args[:re3data_id], - year: args[:year], - resource_type_id: "Sound", - has_person: args[:has_person], - has_funder: args[:has_funder], - has_organization: args[:has_organization], - has_citations: args[:has_citations], - has_parts: args[:has_parts], - has_versions: args[:has_versions], - has_views: args[:has_views], - has_downloads: args[:has_downloads], - page: { number: 1, size: 0 }) + Doi.query(args[:query], + ids: args[:ids], + user_id: args[:user_id], + repository_id: args[:repository_id], + member_id: args[:member_id], + funder_id: args[:funder_id], + affiliation_id: args[:affiliation_id], + re3data_id: args[:re3data_id], + year: args[:year], + resource_type_id: "Sound", + has_person: args[:has_person], + has_funder: args[:has_funder], + has_organization: args[:has_organization], + has_citations: args[:has_citations], + has_parts: args[:has_parts], + has_versions: args[:has_versions], + has_views: args[:has_views], + has_downloads: args[:has_downloads], + page: { number: 1, size: 0 }) end end diff --git a/app/graphql/types/thesis_connection_type.rb b/app/graphql/types/thesis_connection_type.rb index 55d8217e3..9dbf90afa 100644 --- a/app/graphql/types/thesis_connection_type.rb +++ b/app/graphql/types/thesis_connection_type.rb @@ -21,24 +21,25 @@ def years end def response(**args) - @response ||= Doi.query(args[:query], - user_id: args[:user_id], - repository_id: args[:repository_id], - member_id: args[:member_id], - funder_id: args[:funder_id], - affiliation_id: args[:affiliation_id], - re3data_id: args[:re3data_id], - year: args[:year], - resource_type_id: "Text", - resource_type: "Thesis", - has_person: args[:has_person], - has_funder: args[:has_funder], - has_organization: args[:has_organization], - has_citations: args[:has_citations], - has_parts: args[:has_parts], - has_versions: args[:has_versions], - has_views: args[:has_views], - has_downloads: args[:has_downloads], - page: { number: 1, size: 0 }) + Doi.query(args[:query], + ids: args[:ids], + user_id: args[:user_id], + client_id: args[:repository_id], + provider_id: args[:member_id], + funder_id: args[:funder_id], + affiliation_id: args[:affiliation_id], + re3data_id: args[:re3data_id], + year: args[:year], + resource_type_id: "Text", + resource_type: "Thesis", + has_person: args[:has_person], + has_funder: args[:has_funder], + has_organization: args[:has_organization], + has_citations: args[:has_citations], + has_parts: args[:has_parts], + has_versions: args[:has_versions], + has_views: args[:has_views], + has_downloads: args[:has_downloads], + page: { number: 1, size: 0 }) end end diff --git a/app/graphql/types/work_connection_type.rb b/app/graphql/types/work_connection_type.rb index 1f3b802f3..e78109f90 100644 --- a/app/graphql/types/work_connection_type.rb +++ b/app/graphql/types/work_connection_type.rb @@ -29,24 +29,24 @@ def resource_types end def response(**args) - @response ||= Doi.query(args[:query], - ids: args[:ids], - user_id: args[:user_id], - repository_id: args[:repository_id], - member_id: args[:member_id], - funder_id: args[:funder_id], - affiliation_id: args[:affiliation_id], - re3data_id: args[:re3data_id], - year: args[:year], - resource_type_id: args[:resource_type_id], - has_person: args[:has_person], - has_funder: args[:has_funder], - has_organization: args[:has_organization], - has_citations: args[:has_citations], - has_parts: args[:has_parts], - has_versions: args[:has_versions], - has_views: args[:has_views], - has_downloads: args[:has_downloads], - page: { number: 1, size: 0 }) + Doi.query(args[:query], + ids: args[:ids], + user_id: args[:user_id], + client_id: args[:repository_id], + member_id: args[:member_id], + funder_id: args[:funder_id], + affiliation_id: args[:affiliation_id], + re3data_id: args[:re3data_id], + year: args[:year], + resource_type_id: args[:resource_type_id], + has_person: args[:has_person], + has_funder: args[:has_funder], + has_organization: args[:has_organization], + has_citations: args[:has_citations], + has_parts: args[:has_parts], + has_versions: args[:has_versions], + has_views: args[:has_views], + has_downloads: args[:has_downloads], + page: { number: 1, size: 0 }) end end diff --git a/app/graphql/types/workflow_connection_type.rb b/app/graphql/types/workflow_connection_type.rb index 4e0b31401..8fede7f69 100644 --- a/app/graphql/types/workflow_connection_type.rb +++ b/app/graphql/types/workflow_connection_type.rb @@ -21,24 +21,24 @@ def years end def response(**args) - @response ||= Doi.query(args[:query], - ids: args[:ids], - user_id: args[:user_id], - repository_id: args[:repository_id], - member_id: args[:member_id], - funder_id: args[:funder_id], - affiliation_id: args[:affiliation_id], - re3data_id: args[:re3data_id], - year: args[:year], - resource_type_id: "Workflow", - has_person: args[:has_person], - has_funder: args[:has_funder], - has_organization: args[:has_organization], - has_citations: args[:has_citations], - has_parts: args[:has_parts], - has_versions: args[:has_versions], - has_views: args[:has_views], - has_downloads: args[:has_downloads], - page: { number: 1, size: 0 }) + Doi.query(args[:query], + ids: args[:ids], + user_id: args[:user_id], + client_id: args[:repository_id], + member_id: args[:member_id], + funder_id: args[:funder_id], + affiliation_id: args[:affiliation_id], + re3data_id: args[:re3data_id], + year: args[:year], + resource_type_id: "Workflow", + has_person: args[:has_person], + has_funder: args[:has_funder], + has_organization: args[:has_organization], + has_citations: args[:has_citations], + has_parts: args[:has_parts], + has_versions: args[:has_versions], + has_views: args[:has_views], + has_downloads: args[:has_downloads], + page: { number: 1, size: 0 }) end end