From 78c288de6ebfa54a5b9d2697c079a631046ed120 Mon Sep 17 00:00:00 2001 From: Martin Fenner Date: Sat, 22 Feb 2020 16:47:13 +0100 Subject: [PATCH] fix specs. #422 --- app/graphql/schema.graphql | 279 ++++++++++++++++++++++++++++ spec/graphql/types/doi_item_spec.rb | 4 +- 2 files changed, 281 insertions(+), 2 deletions(-) diff --git a/app/graphql/schema.graphql b/app/graphql/schema.graphql index 3ff428248..4646d67cf 100644 --- a/app/graphql/schema.graphql +++ b/app/graphql/schema.graphql @@ -39,6 +39,11 @@ type Audiovisual implements DoiItem { """ citationCount: Int + """ + Citations. + """ + citations: [CreativeWork!] + """ Citations by year. """ @@ -119,6 +124,16 @@ type Audiovisual implements DoiItem { """ publisher: String + """ + Total number of references. + """ + referenceCount: Int + + """ + References. + """ + references: [CreativeWork!] + """ Identifiers of related resources. These must be globally unique identifiers """ @@ -424,6 +439,11 @@ type Collection implements DoiItem { """ citationCount: Int + """ + Citations. + """ + citations: [CreativeWork!] + """ Citations by year. """ @@ -504,6 +524,16 @@ type Collection implements DoiItem { """ publisher: String + """ + Total number of references. + """ + referenceCount: Int + + """ + References. + """ + references: [CreativeWork!] + """ Identifiers of related resources. These must be globally unique identifiers """ @@ -586,6 +616,11 @@ type CreativeWork implements DoiItem { """ citationCount: Int + """ + Citations. + """ + citations: [CreativeWork!] + """ Citations by year. """ @@ -666,6 +701,16 @@ type CreativeWork implements DoiItem { """ publisher: String + """ + Total number of references. + """ + referenceCount: Int + + """ + References. + """ + references: [CreativeWork!] + """ Identifiers of related resources. These must be globally unique identifiers """ @@ -1002,6 +1047,11 @@ type DataPaper implements DoiItem { """ citationCount: Int + """ + Citations. + """ + citations: [CreativeWork!] + """ Citations by year. """ @@ -1082,6 +1132,16 @@ type DataPaper implements DoiItem { """ publisher: String + """ + Total number of references. + """ + referenceCount: Int + + """ + References. + """ + references: [CreativeWork!] + """ Identifiers of related resources. These must be globally unique identifiers """ @@ -1149,6 +1209,11 @@ type Dataset implements DoiItem { """ citationCount: Int + """ + Citations. + """ + citations: [CreativeWork!] + """ Citations by year. """ @@ -1272,6 +1337,16 @@ type Dataset implements DoiItem { """ publisher: String + """ + Total number of references. + """ + referenceCount: Int + + """ + References. + """ + references: [CreativeWork!] + """ Identifiers of related resources. These must be globally unique identifiers """ @@ -1573,6 +1648,11 @@ interface DoiItem { """ citationCount: Int + """ + Citations. + """ + citations: [CreativeWork!] + """ Citations by year. """ @@ -1653,6 +1733,16 @@ interface DoiItem { """ publisher: String + """ + Total number of references. + """ + referenceCount: Int + + """ + References. + """ + references: [CreativeWork!] + """ Identifiers of related resources. These must be globally unique identifiers """ @@ -1720,6 +1810,11 @@ type Event implements DoiItem { """ citationCount: Int + """ + Citations. + """ + citations: [CreativeWork!] + """ Citations by year. """ @@ -1800,6 +1895,16 @@ type Event implements DoiItem { """ publisher: String + """ + Total number of references. + """ + referenceCount: Int + + """ + References. + """ + references: [CreativeWork!] + """ Identifiers of related resources. These must be globally unique identifiers """ @@ -1867,6 +1972,11 @@ type EventData implements DoiItem { """ citationCount: Int + """ + Citations. + """ + citations: [CreativeWork!] + """ Citations by year. """ @@ -1947,6 +2057,16 @@ type EventData implements DoiItem { """ publisher: String + """ + Total number of references. + """ + referenceCount: Int + + """ + References. + """ + references: [CreativeWork!] + """ Identifiers of related resources. These must be globally unique identifiers """ @@ -2321,6 +2441,11 @@ type Image implements DoiItem { """ citationCount: Int + """ + Citations. + """ + citations: [CreativeWork!] + """ Citations by year. """ @@ -2401,6 +2526,16 @@ type Image implements DoiItem { """ publisher: String + """ + Total number of references. + """ + referenceCount: Int + + """ + References. + """ + references: [CreativeWork!] + """ Identifiers of related resources. These must be globally unique identifiers """ @@ -2468,6 +2603,11 @@ type InteractiveResource implements DoiItem { """ citationCount: Int + """ + Citations. + """ + citations: [CreativeWork!] + """ Citations by year. """ @@ -2548,6 +2688,16 @@ type InteractiveResource implements DoiItem { """ publisher: String + """ + Total number of references. + """ + referenceCount: Int + + """ + References. + """ + references: [CreativeWork!] + """ Identifiers of related resources. These must be globally unique identifiers """ @@ -2615,6 +2765,11 @@ type Model implements DoiItem { """ citationCount: Int + """ + Citations. + """ + citations: [CreativeWork!] + """ Citations by year. """ @@ -2695,6 +2850,16 @@ type Model implements DoiItem { """ publisher: String + """ + Total number of references. + """ + referenceCount: Int + + """ + References. + """ + references: [CreativeWork!] + """ Identifiers of related resources. These must be globally unique identifiers """ @@ -2966,6 +3131,11 @@ type Other implements DoiItem { """ citationCount: Int + """ + Citations. + """ + citations: [CreativeWork!] + """ Citations by year. """ @@ -3046,6 +3216,16 @@ type Other implements DoiItem { """ publisher: String + """ + Total number of references. + """ + referenceCount: Int + + """ + References. + """ + references: [CreativeWork!] + """ Identifiers of related resources. These must be globally unique identifiers """ @@ -3392,6 +3572,11 @@ type PhysicalObject implements DoiItem { """ citationCount: Int + """ + Citations. + """ + citations: [CreativeWork!] + """ Citations by year. """ @@ -3472,6 +3657,16 @@ type PhysicalObject implements DoiItem { """ publisher: String + """ + Total number of references. + """ + referenceCount: Int + + """ + References. + """ + references: [CreativeWork!] + """ Identifiers of related resources. These must be globally unique identifiers """ @@ -3767,6 +3962,11 @@ type Publication implements DoiItem { """ citationCount: Int + """ + Citations. + """ + citations: [CreativeWork!] + """ Citations by year. """ @@ -3890,6 +4090,16 @@ type Publication implements DoiItem { """ publisher: String + """ + Total number of references. + """ + referenceCount: Int + + """ + References. + """ + references: [CreativeWork!] + """ Identifiers of related resources. These must be globally unique identifiers """ @@ -4146,6 +4356,9 @@ type Query { before: String clientId: String first: Int = 25 + hasCitations: Int + hasDownloads: Int + hasViews: Int """ Returns the last _n_ elements from the list. @@ -4257,6 +4470,9 @@ type Query { before: String clientId: String first: Int = 25 + hasCitations: Int + hasDownloads: Int + hasViews: Int """ Returns the last _n_ elements from the list. @@ -4299,6 +4515,9 @@ type Query { before: String clientId: String first: Int = 25 + hasCitations: Int + hasDownloads: Int + hasViews: Int """ Returns the last _n_ elements from the list. @@ -4447,6 +4666,11 @@ type Service implements DoiItem { """ citationCount: Int + """ + Citations. + """ + citations: [CreativeWork!] + """ Citations by year. """ @@ -4527,6 +4751,16 @@ type Service implements DoiItem { """ publisher: String + """ + Total number of references. + """ + referenceCount: Int + + """ + References. + """ + references: [CreativeWork!] + """ Identifiers of related resources. These must be globally unique identifiers """ @@ -4615,6 +4849,11 @@ type Software implements DoiItem { """ citationCount: Int + """ + Citations. + """ + citations: [CreativeWork!] + """ Citations by year. """ @@ -4738,6 +4977,16 @@ type Software implements DoiItem { """ publisher: String + """ + Total number of references. + """ + referenceCount: Int + + """ + References. + """ + references: [CreativeWork!] + """ Identifiers of related resources. These must be globally unique identifiers """ @@ -4942,6 +5191,11 @@ type Sound implements DoiItem { """ citationCount: Int + """ + Citations. + """ + citations: [CreativeWork!] + """ Citations by year. """ @@ -5022,6 +5276,16 @@ type Sound implements DoiItem { """ publisher: String + """ + Total number of references. + """ + referenceCount: Int + + """ + References. + """ + references: [CreativeWork!] + """ Identifiers of related resources. These must be globally unique identifiers """ @@ -5242,6 +5506,11 @@ type Workflow implements DoiItem { """ citationCount: Int + """ + Citations. + """ + citations: [CreativeWork!] + """ Citations by year. """ @@ -5322,6 +5591,16 @@ type Workflow implements DoiItem { """ publisher: String + """ + Total number of references. + """ + referenceCount: Int + + """ + References. + """ + references: [CreativeWork!] + """ Identifiers of related resources. These must be globally unique identifiers """ diff --git a/spec/graphql/types/doi_item_spec.rb b/spec/graphql/types/doi_item_spec.rb index 426d22479..f3f47fc1a 100644 --- a/spec/graphql/types/doi_item_spec.rb +++ b/spec/graphql/types/doi_item_spec.rb @@ -17,7 +17,7 @@ it { is_expected.to have_field(:citationsOverTime).of_type("[YearTotal!]") } it { is_expected.to have_field(:viewsOverTime).of_type("[YearMonthTotal!]") } it { is_expected.to have_field(:downloadsOverTime).of_type("[YearMonthTotal!]") } - it { is_expected.to have_field(:citations).of_type("[DoiItem!]") } - it { is_expected.to have_field(:references).of_type("[DoiItem!]") } + it { is_expected.to have_field(:citations).of_type("[CreativeWork!]") } + it { is_expected.to have_field(:references).of_type("[CreativeWork!]") } end end