diff --git a/app/models/doi.rb b/app/models/doi.rb index 023dd6eb0..8c55b9760 100644 --- a/app/models/doi.rb +++ b/app/models/doi.rb @@ -588,6 +588,7 @@ def self.gql_query_aggregations(facet_count: 10) if facet_count.positive? { resource_types: { terms: { field: "resource_type_id_and_name", size: facet_count, min_doc_count: 1 } }, + clients: { terms: { field: "client_id_and_name", size: facet_count, min_doc_count: 1 } }, open_licenses: { filter: { terms: { "rights_list.rightsIdentifier": ["cc-by-1.0", "cc-by-2.0", "cc-by-2.5", "cc-by-3.0", "cc-by-3.0-at", "cc-by-3.0-us", "cc-by-4.0", "cc-pddc", "cc0-1.0", "cc-pdm-1.0"] } }, aggs: { diff --git a/spec/graphql/types/work_type_spec.rb b/spec/graphql/types/work_type_spec.rb index 48aeae609..3e33bb239 100644 --- a/spec/graphql/types/work_type_spec.rb +++ b/spec/graphql/types/work_type_spec.rb @@ -592,6 +592,11 @@ title count } + repositories { + id + title + count + } languages { id title @@ -646,6 +651,9 @@ expect(response.dig("data", "works", "registrationAgencies")).to eq( [{ "count" => 10, "id" => "datacite", "title" => "DataCite" }], ) + expect(response.dig("data", "works", "repositories").first["title"]).to eq( + "My data center" + ) expect(response.dig("data", "works", "languages")).to eq( [{ "count" => 10, "id" => "nl", "title" => "Dutch" }], )