diff --git a/app/graphql/schema.graphql b/app/graphql/schema.graphql index 3f95c3e12..37072cf20 100644 --- a/app/graphql/schema.graphql +++ b/app/graphql/schema.graphql @@ -451,6 +451,8 @@ type Audiovisual implements DoiItem { The connection type for Audiovisual. """ type AudiovisualConnection { + affiliations: [Facet!] + """ A list of edges. """ @@ -465,6 +467,8 @@ type AudiovisualConnection { Information to aid in pagination. """ pageInfo: PageInfo! + registrationAgencies: [Facet!] + repositories: [Facet!] totalCount: Int! years: [Facet!] } @@ -484,7 +488,7 @@ type AudiovisualEdge { node: Audiovisual } -type Collection implements DoiItem { +type Book implements DoiItem { """ Metadata in bibtex format """ @@ -883,131 +887,23 @@ type Collection implements DoiItem { viewsOverTime: [YearMonthTotal!] } -""" -The connection type for Collection. -""" -type CollectionConnection { - """ - A list of edges. - """ - edges: [CollectionEdge] - - """ - A list of nodes. - """ - nodes: [Collection] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - totalCount: Int! - years: [Facet!] -} - -""" -An edge in a connection. -""" -type CollectionEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: Collection -} - -""" -Information about countries -""" -type Country { - """ - Country ISO 3166-1 code - """ - code: String - - """ - Country name - """ - name: String -} - -""" -A creator. -""" -type Creator { - """ - The organizational or institutional affiliation of the creator. - """ - affiliation: [Organization!] - - """ - Family name. In the U.S., the last name of an Person. - """ - familyName: String - - """ - Given name. In the U.S., the first name of a Person. - """ - givenName: String - - """ - The ID of the creator. - """ - id: ID - - """ - The name of the creator. - """ - name: String! - - """ - The type of the item. - """ - type: String! -} - -""" -A collection of datasets. -""" -type DataCatalog { - """ - An alias for the data catalog. - """ - alternateName: [String!] - +type BookChapter implements DoiItem { """ - Certificates of the data catalog. + Metadata in bibtex format """ - certificates: [DefinedTerm!] + bibtex: String """ - The number of citations. + Total number of citations """ citationCount: Int """ - Repository contact information - """ - contacts: [String!] - - """ - Data accesses - """ - dataAccesses: [TextRestriction!] - - """ - Data uploads + Citations for this DOI. """ - dataUploads: [TextRestriction!] + citations( + affiliationId: String - """ - Funded datasets - """ - datasets( """ Returns the elements in the list that come after the specified cursor. """ @@ -1018,11 +914,16 @@ type DataCatalog { """ before: String first: Int = 25 + funderId: String hasCitations: Int hasDownloads: Int + hasFunder: Boolean + hasOrganization: Boolean hasParts: Int + hasPerson: Boolean hasVersions: Int hasViews: Int + ids: [String!] """ Returns the last _n_ elements from the list. @@ -1032,133 +933,82 @@ type DataCatalog { query: String repositoryId: String userId: String - ): DatasetConnection - - """ - A description of the data catalog. - """ - description: String - - """ - The number of downloads according to the Counter Code of Practice. - """ - downloadCount: Int - - """ - The ID of the data catalog. - """ - id: ID! - - """ - re3data ID - """ - identifier: [Identifier!] - - """ - The language of the content of the data catalog. - """ - inLanguage: [String!] - - """ - Keywords or tags used to describe this data catalog. Multiple entries in a - keywords list are typically delimited by commas. - """ - keywords: String - - """ - The name of the data catalog. - """ - name: String + ): WorkConnection """ - PID Systems + Citations by year """ - pidSystems: [String!] + citationsOverTime: [YearTotal!] """ - Provider types + The main researchers involved in producing the data, or the authors of the publication, in priority order """ - providerTypes: [String!] + creators(first: Int = 20): [Creator!] """ - Software + Different dates relevant to the work """ - softwareApplication: [SoftwareApplication!] + dates: [Date!] """ - Subject areas covered by the data catalog. + All additional information that does not fit in any of the other categories """ - subjects: [DefinedTerm!] + descriptions(first: Int = 5): [Description!] """ - The type of the item. + Total number of downloads """ - type: String! + downloadCount: Int """ - URL of the data catalog. + Downloads by month """ - url: String + downloadsOverTime: [YearMonthTotal!] """ - The number of views according to the Counter Code of Practice. + Technical format of the resource """ - viewCount: Int -} - -""" -The connection type for DataCatalog. -""" -type DataCatalogConnection { - datasetConnectionCount: Int! + formats: [String!] """ - A list of edges. + Metadata as formatted citation """ - edges: [DataCatalogEdge] + formattedCitation(locale: String = "en-US", style: String = "apa"): String """ - A list of nodes. + Information about financial support (funding) for the resource being registered """ - nodes: [DataCatalog] + fundingReferences: [Funding!] """ - Information to aid in pagination. + The persistent identifier for the resource """ - pageInfo: PageInfo! - totalCount: Int -} + id: ID! -""" -An edge in a connection. -""" -type DataCatalogEdge { """ - A cursor for use in pagination. + An identifier or identifiers applied to the resource being registered """ - cursor: String! + identifiers: [Identifier!] """ - The item at the end of the edge. + The primary language of the resource """ - node: DataCatalog -} + language: String -type DataPaper implements DoiItem { """ - Metadata in bibtex format + The member account managing this resource """ - bibtex: String + member: Member """ - Total number of citations + Total number of parts """ - citationCount: Int + partCount: Int """ - Citations for this DOI. + The DOI is a part of this DOI. """ - citations( + partOf( affiliationId: String """ @@ -1193,122 +1043,15 @@ type DataPaper implements DoiItem { ): WorkConnection """ - Citations by year - """ - citationsOverTime: [YearTotal!] - - """ - The main researchers involved in producing the data, or the authors of the publication, in priority order + Total number of DOIs the resource is a part of """ - creators(first: Int = 20): [Creator!] + partOfCount: Int """ - Different dates relevant to the work + Parts of this DOI. """ - dates: [Date!] - - """ - All additional information that does not fit in any of the other categories - """ - descriptions(first: Int = 5): [Description!] - - """ - Total number of downloads - """ - downloadCount: Int - - """ - Downloads by month - """ - downloadsOverTime: [YearMonthTotal!] - - """ - Technical format of the resource - """ - formats: [String!] - - """ - Metadata as formatted citation - """ - formattedCitation(locale: String = "en-US", style: String = "apa"): String - - """ - Information about financial support (funding) for the resource being registered - """ - fundingReferences: [Funding!] - - """ - The persistent identifier for the resource - """ - id: ID! - - """ - An identifier or identifiers applied to the resource being registered - """ - identifiers: [Identifier!] - - """ - The primary language of the resource - """ - language: String - - """ - The member account managing this resource - """ - member: Member - - """ - Total number of parts - """ - partCount: Int - - """ - The DOI is a part of this DOI. - """ - partOf( - affiliationId: String - - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - first: Int = 25 - funderId: String - hasCitations: Int - hasDownloads: Int - hasFunder: Boolean - hasOrganization: Boolean - hasParts: Int - hasPerson: Boolean - hasVersions: Int - hasViews: Int - ids: [String!] - - """ - Returns the last _n_ elements from the list. - """ - last: Int - memberId: String - query: String - repositoryId: String - userId: String - ): WorkConnection - - """ - Total number of DOIs the resource is a part of - """ - partOfCount: Int - - """ - Parts of this DOI. - """ - parts( - affiliationId: String + parts( + affiliationId: String """ Returns the elements in the list that come after the specified cursor. @@ -1544,23 +1287,27 @@ type DataPaper implements DoiItem { } """ -The connection type for DataPaper. +The connection type for BookChapter. """ -type DataPaperConnection { +type BookChapterConnection { + affiliations: [Facet!] + """ A list of edges. """ - edges: [DataPaperEdge] + edges: [BookChapterEdge] """ A list of nodes. """ - nodes: [DataPaper] + nodes: [BookChapter] """ Information to aid in pagination. """ pageInfo: PageInfo! + registrationAgencies: [Facet!] + repositories: [Facet!] totalCount: Int! years: [Facet!] } @@ -1568,7 +1315,7 @@ type DataPaperConnection { """ An edge in a connection. """ -type DataPaperEdge { +type BookChapterEdge { """ A cursor for use in pagination. """ @@ -1577,10 +1324,51 @@ type DataPaperEdge { """ The item at the end of the edge. """ - node: DataPaper + node: BookChapter } -type Dataset implements DoiItem { +""" +The connection type for Book. +""" +type BookConnection { + affiliations: [Facet!] + + """ + A list of edges. + """ + edges: [BookEdge] + + """ + A list of nodes. + """ + nodes: [Book] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + registrationAgencies: [Facet!] + repositories: [Facet!] + totalCount: Int! + years: [Facet!] +} + +""" +An edge in a connection. +""" +type BookEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: Book +} + +type Collection implements DoiItem { """ Metadata in bibtex format """ @@ -1879,27 +1667,6 @@ type Dataset implements DoiItem { """ url: Url - """ - Usage reports for this dataset - """ - usageReports( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - first: Int = 25 - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): DatasetUsageReportConnection! - """ The version number of the resource """ @@ -2001,30 +1768,26 @@ type Dataset implements DoiItem { } """ -The connection type for Dataset. +The connection type for Collection. """ -type DatasetConnection { - datasetConnectionCount: Int! +type CollectionConnection { + affiliations: [Facet!] """ A list of edges. """ - edges: [DatasetEdge] - funderConnectionCount: Int! + edges: [CollectionEdge] """ A list of nodes. """ - nodes: [Dataset] - organizationConnectionCount: Int! + nodes: [Collection] """ Information to aid in pagination. """ pageInfo: PageInfo! - personConnectionCount: Int! - publicationConnectionCount: Int! - softwareConnectionCount: Int! + repositories: [Facet!] totalCount: Int! years: [Facet!] } @@ -2032,7 +1795,7 @@ type DatasetConnection { """ An edge in a connection. """ -type DatasetEdge { +type CollectionEdge { """ A cursor for use in pagination. """ @@ -2041,157 +1804,71 @@ type DatasetEdge { """ The item at the end of the edge. """ - node: Dataset + node: Collection } -""" -The connection type for EventData. -""" -type DatasetUsageReportConnection { +type ConferencePaper implements DoiItem { """ - A list of edges. + Metadata in bibtex format """ - edges: [EventDataEdge] + bibtex: String """ - A list of nodes. + Total number of citations """ - nodes: [EventData] + citationCount: Int """ - Information to aid in pagination. + Citations for this DOI. """ - pageInfo: PageInfo! - totalCount: Int! -} + citations( + affiliationId: String + + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + first: Int = 25 + funderId: String + hasCitations: Int + hasDownloads: Int + hasFunder: Boolean + hasOrganization: Boolean + hasParts: Int + hasPerson: Boolean + hasVersions: Int + hasViews: Int + ids: [String!] + + """ + Returns the last _n_ elements from the list. + """ + last: Int + memberId: String + query: String + repositoryId: String + userId: String + ): WorkConnection -""" -Information about dates -""" -type Date { """ - Date information for this resource + Citations by year """ - date: ISO8601DateTime! + citationsOverTime: [YearTotal!] """ - The type of date + The main researchers involved in producing the data, or the authors of the publication, in priority order """ - dateType: String -} + creators(first: Int = 20): [Creator!] -""" -A word, name, acronym, phrase, etc. with a formal definition. Often used in the -context of category or subject classification, glossaries or dictionaries, -product or creative work types, etc. -""" -type DefinedTerm { """ - A description of the item. + Different dates relevant to the work """ - description: String - - """ - A DefinedTermSet that contains this term. - """ - inDefinedTermSet: String - - """ - The name of the item. - """ - name: String - - """ - A code that identifies this DefinedTerm within a DefinedTermSet. - """ - termCode: String -} - -""" -Information about descriptions -""" -type Description { - """ - Description - """ - description: String - - """ - Description type - """ - descriptionType: String - - """ - Language - """ - lang: ID -} - -""" -Information about DOIs -""" -interface DoiItem { - """ - Metadata in bibtex format - """ - bibtex: String - - """ - Total number of citations - """ - citationCount: Int - - """ - Citations for this DOI. - """ - citations( - affiliationId: String - - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - first: Int = 25 - funderId: String - hasCitations: Int - hasDownloads: Int - hasFunder: Boolean - hasOrganization: Boolean - hasParts: Int - hasPerson: Boolean - hasVersions: Int - hasViews: Int - ids: [String!] - - """ - Returns the last _n_ elements from the list. - """ - last: Int - memberId: String - query: String - repositoryId: String - userId: String - ): WorkConnection - - """ - Citations by year - """ - citationsOverTime: [YearTotal!] - - """ - The main researchers involved in producing the data, or the authors of the publication, in priority order - """ - creators(first: Int = 20): [Creator!] - - """ - Different dates relevant to the work - """ - dates: [Date!] + dates: [Date!] """ All additional information that does not fit in any of the other categories @@ -2529,130 +2206,135 @@ interface DoiItem { viewsOverTime: [YearMonthTotal!] } -type Event implements DoiItem { +""" +The connection type for ConferencePaper. +""" +type ConferencePaperConnection { + affiliations: [Facet!] + """ - Metadata in bibtex format + A list of edges. """ - bibtex: String + edges: [ConferencePaperEdge] """ - Total number of citations + A list of nodes. """ - citationCount: Int + nodes: [ConferencePaper] """ - Citations for this DOI. + Information to aid in pagination. """ - citations( - affiliationId: String - - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - first: Int = 25 - funderId: String - hasCitations: Int - hasDownloads: Int - hasFunder: Boolean - hasOrganization: Boolean - hasParts: Int - hasPerson: Boolean - hasVersions: Int - hasViews: Int - ids: [String!] + pageInfo: PageInfo! + registrationAgencies: [Facet!] + repositories: [Facet!] + totalCount: Int! + years: [Facet!] +} - """ - Returns the last _n_ elements from the list. - """ - last: Int - memberId: String - query: String - repositoryId: String - userId: String - ): WorkConnection +""" +An edge in a connection. +""" +type ConferencePaperEdge { + """ + A cursor for use in pagination. + """ + cursor: String! """ - Citations by year + The item at the end of the edge. """ - citationsOverTime: [YearTotal!] + node: ConferencePaper +} +""" +Information about countries +""" +type Country { """ - The main researchers involved in producing the data, or the authors of the publication, in priority order + Country ISO 3166-1 code """ - creators(first: Int = 20): [Creator!] + code: String """ - Different dates relevant to the work + Country name """ - dates: [Date!] + name: String +} +""" +A creator. +""" +type Creator { """ - All additional information that does not fit in any of the other categories + The organizational or institutional affiliation of the creator. """ - descriptions(first: Int = 5): [Description!] + affiliation: [Organization!] """ - Total number of downloads + Family name. In the U.S., the last name of an Person. """ - downloadCount: Int + familyName: String """ - Downloads by month + Given name. In the U.S., the first name of a Person. """ - downloadsOverTime: [YearMonthTotal!] + givenName: String """ - Technical format of the resource + The ID of the creator. """ - formats: [String!] + id: ID """ - Metadata as formatted citation + The name of the creator. """ - formattedCitation(locale: String = "en-US", style: String = "apa"): String + name: String! """ - Information about financial support (funding) for the resource being registered + The type of the item. """ - fundingReferences: [Funding!] + type: String! +} +""" +A collection of datasets. +""" +type DataCatalog { """ - The persistent identifier for the resource + An alias for the data catalog. """ - id: ID! + alternateName: [String!] """ - An identifier or identifiers applied to the resource being registered + Certificates of the data catalog. """ - identifiers: [Identifier!] + certificates: [DefinedTerm!] """ - The primary language of the resource + The number of citations. """ - language: String + citationCount: Int """ - The member account managing this resource + Repository contact information """ - member: Member + contacts: [String!] """ - Total number of parts + Data accesses """ - partCount: Int + dataAccesses: [TextRestriction!] """ - The DOI is a part of this DOI. + Data uploads """ - partOf( - affiliationId: String + dataUploads: [TextRestriction!] + """ + Funded datasets + """ + datasets( """ Returns the elements in the list that come after the specified cursor. """ @@ -2663,16 +2345,11 @@ type Event implements DoiItem { """ before: String first: Int = 25 - funderId: String hasCitations: Int hasDownloads: Int - hasFunder: Boolean - hasOrganization: Boolean hasParts: Int - hasPerson: Boolean hasVersions: Int hasViews: Int - ids: [String!] """ Returns the last _n_ elements from the list. @@ -2682,136 +2359,63 @@ type Event implements DoiItem { query: String repositoryId: String userId: String - ): WorkConnection + ): DatasetConnection """ - Total number of DOIs the resource is a part of + A description of the data catalog. """ - partOfCount: Int + description: String """ - Parts of this DOI. + The number of downloads according to the Counter Code of Practice. """ - parts( - affiliationId: String - - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - first: Int = 25 - funderId: String - hasCitations: Int - hasDownloads: Int - hasFunder: Boolean - hasOrganization: Boolean - hasParts: Int - hasPerson: Boolean - hasVersions: Int - hasViews: Int - ids: [String!] - - """ - Returns the last _n_ elements from the list. - """ - last: Int - memberId: String - query: String - repositoryId: String - userId: String - ): WorkConnection - - """ - The year when the data was or will be made publicly available - """ - publicationYear: Int - - """ - The name of the entity that holds, archives, publishes prints, distributes, releases, issues, or produces the resource - """ - publisher: String + downloadCount: Int """ - Total number of references + The ID of the data catalog. """ - referenceCount: Int + id: ID! """ - References for this DOI + re3data ID """ - references( - affiliationId: String - - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - first: Int = 25 - funderId: String - hasCitations: Int - hasDownloads: Int - hasFunder: Boolean - hasOrganization: Boolean - hasParts: Int - hasPerson: Boolean - hasVersions: Int - hasViews: Int - ids: [String!] - - """ - Returns the last _n_ elements from the list. - """ - last: Int - memberId: String - query: String - repositoryId: String - userId: String - ): WorkConnection + identifier: [Identifier!] """ - The DOI registration agency for the resource + The language of the content of the data catalog. """ - registrationAgency: String + inLanguage: [String!] """ - Identifiers of related resources. These must be globally unique identifiers + Keywords or tags used to describe this data catalog. Multiple entries in a + keywords list are typically delimited by commas. """ - relatedIdentifiers: [RelatedIdentifier!] + keywords: String """ - The repository account managing this resource + The name of the data catalog. """ - repository: Repository + name: String """ - Any rights information for this resource + PID Systems """ - rights: [Rights!] + pidSystems: [String!] """ - Size (e.g. bytes, pages, inches, etc.) or duration (extent), e.g. hours, minutes, days, etc., of a resource + Provider types """ - sizes: [String!] + providerTypes: [String!] """ - Subject, keyword, classification code, or key phrase describing the resource + Software """ - subjects: [Subject!] + softwareApplication: [SoftwareApplication!] """ - A name or title by which a resource is known + Subject areas covered by the data catalog. """ - titles(first: Int = 5): [Title!] + subjects: [DefinedTerm!] """ The type of the item. @@ -2819,138 +2423,55 @@ type Event implements DoiItem { type: String! """ - The resource type - """ - types: ResourceType! - - """ - The URL registered for the resource - """ - url: Url - - """ - The version number of the resource - """ - version: String - - """ - Total number of versions + URL of the data catalog. """ - versionCount: Int + url: String """ - The DOI is a version of this DOI. + The number of views according to the Counter Code of Practice. """ - versionOf( - affiliationId: String - - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - first: Int = 25 - funderId: String - hasCitations: Int - hasDownloads: Int - hasFunder: Boolean - hasOrganization: Boolean - hasParts: Int - hasPerson: Boolean - hasVersions: Int - hasViews: Int - ids: [String!] - - """ - Returns the last _n_ elements from the list. - """ - last: Int - memberId: String - query: String - repositoryId: String - userId: String - ): WorkConnection + viewCount: Int +} - """ - Total number of DOIs the resource is a version of - """ - versionOfCount: Int +""" +The connection type for DataCatalog. +""" +type DataCatalogConnection { + datasetConnectionCount: Int! """ - Versions of this DOI. + A list of edges. """ - versions( - affiliationId: String - - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - first: Int = 25 - funderId: String - hasCitations: Int - hasDownloads: Int - hasFunder: Boolean - hasOrganization: Boolean - hasParts: Int - hasPerson: Boolean - hasVersions: Int - hasViews: Int - ids: [String!] - - """ - Returns the last _n_ elements from the list. - """ - last: Int - memberId: String - query: String - repositoryId: String - userId: String - ): WorkConnection + edges: [DataCatalogEdge] """ - Total number of views + A list of nodes. """ - viewCount: Int + nodes: [DataCatalog] """ - Views by month + Information to aid in pagination. """ - viewsOverTime: [YearMonthTotal!] + pageInfo: PageInfo! + totalCount: Int } """ -The connection type for Event. +An edge in a connection. """ -type EventConnection { - """ - A list of edges. - """ - edges: [EventEdge] - +type DataCatalogEdge { """ - A list of nodes. + A cursor for use in pagination. """ - nodes: [Event] + cursor: String! """ - Information to aid in pagination. + The item at the end of the edge. """ - pageInfo: PageInfo! - totalCount: Int! - years: [Facet!] + node: DataCatalog } -type EventData implements DoiItem { +type DataPaper implements DoiItem { """ Metadata in bibtex format """ @@ -3350,49 +2871,35 @@ type EventData implements DoiItem { } """ -An edge in a connection. +The connection type for DataPaper. """ -type EventDataEdge { - """ - A cursor for use in pagination. - """ - cursor: String! +type DataPaperConnection { + affiliations: [Facet!] """ - The item at the end of the edge. + A list of edges. """ - node: EventData + edges: [DataPaperEdge] """ - Relation type for this event. + A list of nodes. """ - relationType: String + nodes: [DataPaper] """ - Source for this event + Information to aid in pagination. """ - source: String - - """ - The source ID of the event. - """ - sourceId: String - - """ - The target ID of the event. - """ - targetId: String - - """ - Total count for this event. - """ - total: Int + pageInfo: PageInfo! + registrationAgencies: [Facet!] + repositories: [Facet!] + totalCount: Int! + years: [Facet!] } """ An edge in a connection. """ -type EventEdge { +type DataPaperEdge { """ A cursor for use in pagination. """ @@ -3401,52 +2908,26 @@ type EventEdge { """ The item at the end of the edge. """ - node: Event -} - -""" -Summary information -""" -type Facet { - """ - Count - """ - count: Int - - """ - ID - """ - id: String - - """ - Title - """ - title: String + node: DataPaper } -""" -Information about funders -""" -type Funder { - """ - Physical address of the funder. - """ - address: Address - +type Dataset implements DoiItem { """ - An alias for the funder. + Metadata in bibtex format """ - alternateName: [String!] + bibtex: String """ - The number of citations. + Total number of citations """ citationCount: Int """ - Funded datasets + Citations for this DOI. """ - datasets( + citations( + affiliationId: String + """ Returns the elements in the list that come after the specified cursor. """ @@ -3457,8 +2938,10 @@ type Funder { """ before: String first: Int = 25 + funderId: String hasCitations: Int hasDownloads: Int + hasFunder: Boolean hasOrganization: Boolean hasParts: Int hasPerson: Boolean @@ -3474,27 +2957,84 @@ type Funder { query: String repositoryId: String userId: String - ): DatasetConnection + ): WorkConnection """ - The number of downloads according to the Counter Code of Practice. + Citations by year + """ + citationsOverTime: [YearTotal!] + + """ + The main researchers involved in producing the data, or the authors of the publication, in priority order + """ + creators(first: Int = 20): [Creator!] + + """ + Different dates relevant to the work + """ + dates: [Date!] + + """ + All additional information that does not fit in any of the other categories + """ + descriptions(first: Int = 5): [Description!] + + """ + Total number of downloads """ downloadCount: Int """ - Crossref Funder ID + Downloads by month + """ + downloadsOverTime: [YearMonthTotal!] + + """ + Technical format of the resource + """ + formats: [String!] + + """ + Metadata as formatted citation + """ + formattedCitation(locale: String = "en-US", style: String = "apa"): String + + """ + Information about financial support (funding) for the resource being registered + """ + fundingReferences: [Funding!] + + """ + The persistent identifier for the resource """ id: ID! """ - The name of the funder. + An identifier or identifiers applied to the resource being registered """ - name: String! + identifiers: [Identifier!] """ - Funded publications + The primary language of the resource """ - publications( + language: String + + """ + The member account managing this resource + """ + member: Member + + """ + Total number of parts + """ + partCount: Int + + """ + The DOI is a part of this DOI. + """ + partOf( + affiliationId: String + """ Returns the elements in the list that come after the specified cursor. """ @@ -3505,8 +3045,10 @@ type Funder { """ before: String first: Int = 25 + funderId: String hasCitations: Int hasDownloads: Int + hasFunder: Boolean hasOrganization: Boolean hasParts: Int hasPerson: Boolean @@ -3522,12 +3064,19 @@ type Funder { query: String repositoryId: String userId: String - ): PublicationConnection + ): WorkConnection """ - Funded software + Total number of DOIs the resource is a part of """ - softwares( + partOfCount: Int + + """ + Parts of this DOI. + """ + parts( + affiliationId: String + """ Returns the elements in the list that come after the specified cursor. """ @@ -3538,8 +3087,10 @@ type Funder { """ before: String first: Int = 25 + funderId: String hasCitations: Int hasDownloads: Int + hasFunder: Boolean hasOrganization: Boolean hasParts: Int hasPerson: Boolean @@ -3555,22 +3106,27 @@ type Funder { query: String repositoryId: String userId: String - ): SoftwareConnection + ): WorkConnection """ - The type of the item. + The year when the data was or will be made publicly available """ - type: String! + publicationYear: Int """ - The number of views according to the Counter Code of Practice. + The name of the entity that holds, archives, publishes prints, distributes, releases, issues, or produces the resource """ - viewCount: Int + publisher: String """ - Funded works + Total number of references """ - works( + referenceCount: Int + + """ + References for this DOI + """ + references( affiliationId: String """ @@ -3583,8 +3139,10 @@ type Funder { """ before: String first: Int = 25 + funderId: String hasCitations: Int hasDownloads: Int + hasFunder: Boolean hasOrganization: Boolean hasParts: Int hasPerson: Boolean @@ -3599,112 +3157,311 @@ type Funder { memberId: String query: String repositoryId: String - resourceTypeId: String userId: String ): WorkConnection -} - -""" -The connection type for Funder. -""" -type FunderConnection { - datasetConnectionCount: Int! """ - A list of edges. + The DOI registration agency for the resource """ - edges: [FunderEdge] + registrationAgency: String """ - A list of nodes. + Identifiers of related resources. These must be globally unique identifiers """ - nodes: [Funder] + relatedIdentifiers: [RelatedIdentifier!] """ - Information to aid in pagination. + The repository account managing this resource """ - pageInfo: PageInfo! - publicationConnectionCount: Int! - softwareConnectionCount: Int! - totalCount: Int! -} + repository: Repository -""" -An edge in a connection. -""" -type FunderEdge { """ - A cursor for use in pagination. + Any rights information for this resource """ - cursor: String! + rights: [Rights!] """ - The item at the end of the edge. + Size (e.g. bytes, pages, inches, etc.) or duration (extent), e.g. hours, minutes, days, etc., of a resource """ - node: Funder -} + sizes: [String!] -""" -Information about funding -""" -type Funding { """ - Award number + Subject, keyword, classification code, or key phrase describing the resource """ - awardNumber: String + subjects: [Subject!] """ - Award title + A name or title by which a resource is known """ - awardTitle: String + titles(first: Int = 5): [Title!] """ - Award URI + The type of the item. """ - awardUri: String + type: String! """ - Funder identifier + The resource type """ - funderIdentifier: String + types: ResourceType! """ - Funder identifier type + The URL registered for the resource """ - funderIdentifierType: String + url: Url """ - Funder name + Usage reports for this dataset """ - funderName: String -} + usageReports( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String -""" -An ISO 8601-encoded date -""" -scalar ISO8601Date + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + first: Int = 25 -""" -An ISO 8601-encoded datetime -""" -scalar ISO8601DateTime + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): DatasetUsageReportConnection! + + """ + The version number of the resource + """ + version: String + + """ + Total number of versions + """ + versionCount: Int + + """ + The DOI is a version of this DOI. + """ + versionOf( + affiliationId: String + + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + first: Int = 25 + funderId: String + hasCitations: Int + hasDownloads: Int + hasFunder: Boolean + hasOrganization: Boolean + hasParts: Int + hasPerson: Boolean + hasVersions: Int + hasViews: Int + ids: [String!] + + """ + Returns the last _n_ elements from the list. + """ + last: Int + memberId: String + query: String + repositoryId: String + userId: String + ): WorkConnection + + """ + Total number of DOIs the resource is a version of + """ + versionOfCount: Int + + """ + Versions of this DOI. + """ + versions( + affiliationId: String + + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + first: Int = 25 + funderId: String + hasCitations: Int + hasDownloads: Int + hasFunder: Boolean + hasOrganization: Boolean + hasParts: Int + hasPerson: Boolean + hasVersions: Int + hasViews: Int + ids: [String!] + + """ + Returns the last _n_ elements from the list. + """ + last: Int + memberId: String + query: String + repositoryId: String + userId: String + ): WorkConnection + + """ + Total number of views + """ + viewCount: Int + + """ + Views by month + """ + viewsOverTime: [YearMonthTotal!] +} """ -Information about identifiers +The connection type for Dataset. """ -type Identifier { +type DatasetConnection { + affiliations: [Facet!] + datasetConnectionCount: Int! + """ - The value of the identifier. + A list of edges. """ - identifier: String + edges: [DatasetEdge] + funderConnectionCount: Int! """ - The type of identifier. + A list of nodes. """ - identifierType: String + nodes: [Dataset] + organizationConnectionCount: Int! + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + personConnectionCount: Int! + publicationConnectionCount: Int! + registrationAgencies: [Facet!] + repositories: [Facet!] + softwareConnectionCount: Int! + totalCount: Int! + years: [Facet!] } -type Image implements DoiItem { +""" +An edge in a connection. +""" +type DatasetEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: Dataset +} + +""" +The connection type for EventData. +""" +type DatasetUsageReportConnection { + """ + A list of edges. + """ + edges: [EventDataEdge] + + """ + A list of nodes. + """ + nodes: [EventData] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + totalCount: Int! +} + +""" +Information about dates +""" +type Date { + """ + Date information for this resource + """ + date: ISO8601DateTime! + + """ + The type of date + """ + dateType: String +} + +""" +A word, name, acronym, phrase, etc. with a formal definition. Often used in the +context of category or subject classification, glossaries or dictionaries, +product or creative work types, etc. +""" +type DefinedTerm { + """ + A description of the item. + """ + description: String + + """ + A DefinedTermSet that contains this term. + """ + inDefinedTermSet: String + + """ + The name of the item. + """ + name: String + + """ + A code that identifies this DefinedTerm within a DefinedTermSet. + """ + termCode: String +} + +""" +Information about descriptions +""" +type Description { + """ + Description + """ + description: String + + """ + Description type + """ + descriptionType: String + + """ + Language + """ + lang: ID +} + +type Dissertation implements DoiItem { """ Metadata in bibtex format """ @@ -4104,23 +3861,27 @@ type Image implements DoiItem { } """ -The connection type for Image. +The connection type for Dissertation. """ -type ImageConnection { +type DissertationConnection { + affiliations: [Facet!] + """ A list of edges. """ - edges: [ImageEdge] + edges: [DissertationEdge] """ A list of nodes. """ - nodes: [Image] + nodes: [Dissertation] """ Information to aid in pagination. """ pageInfo: PageInfo! + registrationAgencies: [Facet!] + repositories: [Facet!] totalCount: Int! years: [Facet!] } @@ -4128,7 +3889,7 @@ type ImageConnection { """ An edge in a connection. """ -type ImageEdge { +type DissertationEdge { """ A cursor for use in pagination. """ @@ -4137,10 +3898,13 @@ type ImageEdge { """ The item at the end of the edge. """ - node: Image + node: Dissertation } -type Instrument implements DoiItem { +""" +Information about DOIs +""" +interface DoiItem { """ Metadata in bibtex format """ @@ -4539,53 +4303,16 @@ type Instrument implements DoiItem { viewsOverTime: [YearMonthTotal!] } -""" -The connection type for Instrument. -""" -type InstrumentConnection { +type Event implements DoiItem { """ - A list of edges. + Metadata in bibtex format """ - edges: [InstrumentEdge] + bibtex: String """ - A list of nodes. + Total number of citations """ - nodes: [Instrument] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - totalCount: Int! - years: [Facet!] -} - -""" -An edge in a connection. -""" -type InstrumentEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: Instrument -} - -type InteractiveResource implements DoiItem { - """ - Metadata in bibtex format - """ - bibtex: String - - """ - Total number of citations - """ - citationCount: Int + citationCount: Int """ Citations for this DOI. @@ -4976,80 +4703,46 @@ type InteractiveResource implements DoiItem { } """ -The connection type for InteractiveResource. +The connection type for Event. """ -type InteractiveResourceConnection { +type EventConnection { + affiliations: [Facet!] + """ A list of edges. """ - edges: [InteractiveResourceEdge] + edges: [EventEdge] """ A list of nodes. """ - nodes: [InteractiveResource] + nodes: [Event] """ Information to aid in pagination. """ pageInfo: PageInfo! + registrationAgencies: [Facet!] + repositories: [Facet!] totalCount: Int! years: [Facet!] } -""" -An edge in a connection. -""" -type InteractiveResourceEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: InteractiveResource -} - -""" -Information about ISSN -""" -type Issn { - """ - The electronic ISSN - """ - electronic: String - - """ - The ISSNL - """ - issnl: String - +type EventData implements DoiItem { """ - The print ISSN + Metadata in bibtex format """ - print: String -} + bibtex: String -""" -Information about providers -""" -type Member { """ - The number of citations. + Total number of citations """ citationCount: Int """ - Country where the provider is located - """ - country: Country - - """ - Datasets by this provider. + Citations for this DOI. """ - datasets( + citations( affiliationId: String """ @@ -5071,91 +4764,92 @@ type Member { hasPerson: Boolean hasVersions: Int hasViews: Int - ids: String + ids: [String!] """ Returns the last _n_ elements from the list. """ last: Int + memberId: String query: String repositoryId: String - resourceTypeId: String userId: String - ): DatasetConnection + ): WorkConnection """ - Description of the provider + Citations by year """ - description: String + citationsOverTime: [YearTotal!] """ - Provider display name + The main researchers involved in producing the data, or the authors of the publication, in priority order """ - displayName: String! + creators(first: Int = 20): [Creator!] """ - The number of downloads according to the Counter Code of Practice. + Different dates relevant to the work + """ + dates: [Date!] + + """ + All additional information that does not fit in any of the other categories + """ + descriptions(first: Int = 5): [Description!] + + """ + Total number of downloads """ downloadCount: Int """ - Field of science covered by provider + Downloads by month """ - focusArea: String + downloadsOverTime: [YearMonthTotal!] """ - Unique identifier for each provider + Technical format of the resource """ - id: ID! + formats: [String!] """ - Date provider joined DataCite + Metadata as formatted citation """ - joined: ISO8601Date + formattedCitation(locale: String = "en-US", style: String = "apa"): String """ - URL for the provider logo + Information about financial support (funding) for the resource being registered """ - logoUrl: Url + fundingReferences: [Funding!] """ - Provider name + The persistent identifier for the resource """ - name: String! + id: ID! """ - Type of organization + An identifier or identifiers applied to the resource being registered """ - organizationType: String + identifiers: [Identifier!] """ - Prefixes managed by the member + The primary language of the resource """ - prefixes( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String + language: String - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - first: Int = 25 + """ + The member account managing this resource + """ + member: Member - """ - Returns the last _n_ elements from the list. - """ - last: Int - query: String - state: String - year: String - ): MemberPrefixConnection + """ + Total number of parts + """ + partCount: Int """ - Publications by this provider. + The DOI is a part of this DOI. """ - publications( + partOf( affiliationId: String """ @@ -5177,56 +4871,27 @@ type Member { hasPerson: Boolean hasVersions: Int hasViews: Int - ids: String + ids: [String!] """ Returns the last _n_ elements from the list. """ last: Int + memberId: String query: String repositoryId: String - resourceTypeId: String userId: String - ): PublicationConnection - - """ - Geographic region where the provider is located - """ - region: String - - """ - Repositories associated with the member - """ - repositories( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - first: Int = 25 - - """ - Returns the last _n_ elements from the list. - """ - last: Int - query: String - software: String - year: String - ): RepositoryConnection + ): WorkConnection """ - Research Organization Registry (ROR) identifier + Total number of DOIs the resource is a part of """ - rorId: ID + partOfCount: Int """ - Software by this provider. + Parts of this DOI. """ - softwares( + parts( affiliationId: String """ @@ -5254,31 +4919,31 @@ type Member { Returns the last _n_ elements from the list. """ last: Int + memberId: String query: String repositoryId: String - resourceTypeId: String userId: String - ): SoftwareConnection + ): WorkConnection """ - The type of the item. + The year when the data was or will be made publicly available """ - type: String! + publicationYear: Int """ - The number of views according to the Counter Code of Practice. + The name of the entity that holds, archives, publishes prints, distributes, releases, issues, or produces the resource """ - viewCount: Int + publisher: String """ - Website of the provider + Total number of references """ - website: Url + referenceCount: Int """ - Works by this provider. + References for this DOI """ - works( + references( affiliationId: String """ @@ -5306,122 +4971,118 @@ type Member { Returns the last _n_ elements from the list. """ last: Int + memberId: String query: String repositoryId: String - resourceTypeId: String userId: String ): WorkConnection -} -""" -The connection type for Member. -""" -type MemberConnection { """ - A list of edges. + The DOI registration agency for the resource """ - edges: [MemberEdge] + registrationAgency: String """ - A list of nodes. + Identifiers of related resources. These must be globally unique identifiers """ - nodes: [Member] + relatedIdentifiers: [RelatedIdentifier!] """ - Information to aid in pagination. + The repository account managing this resource """ - pageInfo: PageInfo! - totalCount: Int! -} + repository: Repository -""" -An edge in a connection. -""" -type MemberEdge { """ - A cursor for use in pagination. + Any rights information for this resource """ - cursor: String! + rights: [Rights!] """ - The item at the end of the edge. + Size (e.g. bytes, pages, inches, etc.) or duration (extent), e.g. hours, minutes, days, etc., of a resource """ - node: Member -} + sizes: [String!] -""" -Information about member prefixes -""" -type MemberPrefix { """ - Unique identifier for each provider prefix + Subject, keyword, classification code, or key phrase describing the resource """ - id: ID! + subjects: [Subject!] """ - Provider prefix name + A name or title by which a resource is known """ - name: String! + titles(first: Int = 5): [Title!] """ The type of the item. """ type: String! -} -""" -The connection type for MemberPrefix. -""" -type MemberPrefixConnection { """ - A list of edges. + The resource type """ - edges: [MemberPrefixEdge] + types: ResourceType! """ - A list of nodes. + The URL registered for the resource """ - nodes: [MemberPrefix] + url: Url """ - Information to aid in pagination. + The version number of the resource """ - pageInfo: PageInfo! - states: [Facet!]! - totalCount: Int! - years: [Facet!]! -} + version: String -""" -An edge in a connection. -""" -type MemberPrefixEdge { """ - A cursor for use in pagination. + Total number of versions """ - cursor: String! + versionCount: Int """ - The item at the end of the edge. + The DOI is a version of this DOI. """ - node: MemberPrefix -} + versionOf( + affiliationId: String -type Model implements DoiItem { - """ - Metadata in bibtex format - """ - bibtex: String + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + first: Int = 25 + funderId: String + hasCitations: Int + hasDownloads: Int + hasFunder: Boolean + hasOrganization: Boolean + hasParts: Int + hasPerson: Boolean + hasVersions: Int + hasViews: Int + ids: [String!] + + """ + Returns the last _n_ elements from the list. + """ + last: Int + memberId: String + query: String + repositoryId: String + userId: String + ): WorkConnection """ - Total number of citations + Total number of DOIs the resource is a version of """ - citationCount: Int + versionOfCount: Int """ - Citations for this DOI. + Versions of this DOI. """ - citations( + versions( affiliationId: String """ @@ -5456,81 +5117,114 @@ type Model implements DoiItem { ): WorkConnection """ - Citations by year + Total number of views """ - citationsOverTime: [YearTotal!] + viewCount: Int """ - The main researchers involved in producing the data, or the authors of the publication, in priority order + Views by month """ - creators(first: Int = 20): [Creator!] + viewsOverTime: [YearMonthTotal!] +} +""" +An edge in a connection. +""" +type EventDataEdge { """ - Different dates relevant to the work + A cursor for use in pagination. """ - dates: [Date!] + cursor: String! """ - All additional information that does not fit in any of the other categories + The item at the end of the edge. """ - descriptions(first: Int = 5): [Description!] + node: EventData """ - Total number of downloads + Relation type for this event. """ - downloadCount: Int + relationType: String """ - Downloads by month + Source for this event """ - downloadsOverTime: [YearMonthTotal!] + source: String """ - Technical format of the resource + The source ID of the event. """ - formats: [String!] + sourceId: String """ - Metadata as formatted citation + The target ID of the event. """ - formattedCitation(locale: String = "en-US", style: String = "apa"): String + targetId: String """ - Information about financial support (funding) for the resource being registered + Total count for this event. """ - fundingReferences: [Funding!] + total: Int +} +""" +An edge in a connection. +""" +type EventEdge { """ - The persistent identifier for the resource + A cursor for use in pagination. """ - id: ID! + cursor: String! """ - An identifier or identifiers applied to the resource being registered + The item at the end of the edge. """ - identifiers: [Identifier!] + node: Event +} +""" +Summary information +""" +type Facet { """ - The primary language of the resource + Count """ - language: String + count: Int """ - The member account managing this resource + ID """ - member: Member + id: String """ - Total number of parts + Title """ - partCount: Int + title: String +} +""" +Information about funders +""" +type Funder { """ - The DOI is a part of this DOI. + Physical address of the funder. """ - partOf( - affiliationId: String + address: Address + + """ + An alias for the funder. + """ + alternateName: [String!] + + """ + The number of citations. + """ + citationCount: Int + """ + Funded datasets + """ + datasets( """ Returns the elements in the list that come after the specified cursor. """ @@ -5541,10 +5235,8 @@ type Model implements DoiItem { """ before: String first: Int = 25 - funderId: String hasCitations: Int hasDownloads: Int - hasFunder: Boolean hasOrganization: Boolean hasParts: Int hasPerson: Boolean @@ -5560,19 +5252,27 @@ type Model implements DoiItem { query: String repositoryId: String userId: String - ): WorkConnection + ): DatasetConnection """ - Total number of DOIs the resource is a part of + The number of downloads according to the Counter Code of Practice. """ - partOfCount: Int + downloadCount: Int """ - Parts of this DOI. + Crossref Funder ID """ - parts( - affiliationId: String + id: ID! + + """ + The name of the funder. + """ + name: String! + """ + Funded publications + """ + publications( """ Returns the elements in the list that come after the specified cursor. """ @@ -5583,10 +5283,8 @@ type Model implements DoiItem { """ before: String first: Int = 25 - funderId: String hasCitations: Int hasDownloads: Int - hasFunder: Boolean hasOrganization: Boolean hasParts: Int hasPerson: Boolean @@ -5602,29 +5300,12 @@ type Model implements DoiItem { query: String repositoryId: String userId: String - ): WorkConnection - - """ - The year when the data was or will be made publicly available - """ - publicationYear: Int - - """ - The name of the entity that holds, archives, publishes prints, distributes, releases, issues, or produces the resource - """ - publisher: String - - """ - Total number of references - """ - referenceCount: Int + ): PublicationConnection """ - References for this DOI + Funded software """ - references( - affiliationId: String - + softwares( """ Returns the elements in the list that come after the specified cursor. """ @@ -5635,10 +5316,8 @@ type Model implements DoiItem { """ before: String first: Int = 25 - funderId: String hasCitations: Int hasDownloads: Int - hasFunder: Boolean hasOrganization: Boolean hasParts: Int hasPerson: Boolean @@ -5654,12 +5333,3688 @@ type Model implements DoiItem { query: String repositoryId: String userId: String - ): WorkConnection + ): SoftwareConnection """ - The DOI registration agency for the resource + The type of the item. """ - registrationAgency: String + type: String! + + """ + The number of views according to the Counter Code of Practice. + """ + viewCount: Int + + """ + Funded works + """ + works( + affiliationId: String + + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + first: Int = 25 + hasCitations: Int + hasDownloads: Int + hasOrganization: Boolean + hasParts: Int + hasPerson: Boolean + hasVersions: Int + hasViews: Int + ids: [String!] + + """ + Returns the last _n_ elements from the list. + """ + last: Int + memberId: String + query: String + repositoryId: String + resourceTypeId: String + userId: String + ): WorkConnection +} + +""" +The connection type for Funder. +""" +type FunderConnection { + datasetConnectionCount: Int! + + """ + A list of edges. + """ + edges: [FunderEdge] + + """ + A list of nodes. + """ + nodes: [Funder] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + publicationConnectionCount: Int! + softwareConnectionCount: Int! + totalCount: Int! +} + +""" +An edge in a connection. +""" +type FunderEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: Funder +} + +""" +Information about funding +""" +type Funding { + """ + Award number + """ + awardNumber: String + + """ + Award title + """ + awardTitle: String + + """ + Award URI + """ + awardUri: String + + """ + Funder identifier + """ + funderIdentifier: String + + """ + Funder identifier type + """ + funderIdentifierType: String + + """ + Funder name + """ + funderName: String +} + +""" +An ISO 8601-encoded date +""" +scalar ISO8601Date + +""" +An ISO 8601-encoded datetime +""" +scalar ISO8601DateTime + +""" +Information about identifiers +""" +type Identifier { + """ + The value of the identifier. + """ + identifier: String + + """ + The type of identifier. + """ + identifierType: String +} + +type Image implements DoiItem { + """ + Metadata in bibtex format + """ + bibtex: String + + """ + Total number of citations + """ + citationCount: Int + + """ + Citations for this DOI. + """ + citations( + affiliationId: String + + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + first: Int = 25 + funderId: String + hasCitations: Int + hasDownloads: Int + hasFunder: Boolean + hasOrganization: Boolean + hasParts: Int + hasPerson: Boolean + hasVersions: Int + hasViews: Int + ids: [String!] + + """ + Returns the last _n_ elements from the list. + """ + last: Int + memberId: String + query: String + repositoryId: String + userId: String + ): WorkConnection + + """ + Citations by year + """ + citationsOverTime: [YearTotal!] + + """ + The main researchers involved in producing the data, or the authors of the publication, in priority order + """ + creators(first: Int = 20): [Creator!] + + """ + Different dates relevant to the work + """ + dates: [Date!] + + """ + All additional information that does not fit in any of the other categories + """ + descriptions(first: Int = 5): [Description!] + + """ + Total number of downloads + """ + downloadCount: Int + + """ + Downloads by month + """ + downloadsOverTime: [YearMonthTotal!] + + """ + Technical format of the resource + """ + formats: [String!] + + """ + Metadata as formatted citation + """ + formattedCitation(locale: String = "en-US", style: String = "apa"): String + + """ + Information about financial support (funding) for the resource being registered + """ + fundingReferences: [Funding!] + + """ + The persistent identifier for the resource + """ + id: ID! + + """ + An identifier or identifiers applied to the resource being registered + """ + identifiers: [Identifier!] + + """ + The primary language of the resource + """ + language: String + + """ + The member account managing this resource + """ + member: Member + + """ + Total number of parts + """ + partCount: Int + + """ + The DOI is a part of this DOI. + """ + partOf( + affiliationId: String + + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + first: Int = 25 + funderId: String + hasCitations: Int + hasDownloads: Int + hasFunder: Boolean + hasOrganization: Boolean + hasParts: Int + hasPerson: Boolean + hasVersions: Int + hasViews: Int + ids: [String!] + + """ + Returns the last _n_ elements from the list. + """ + last: Int + memberId: String + query: String + repositoryId: String + userId: String + ): WorkConnection + + """ + Total number of DOIs the resource is a part of + """ + partOfCount: Int + + """ + Parts of this DOI. + """ + parts( + affiliationId: String + + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + first: Int = 25 + funderId: String + hasCitations: Int + hasDownloads: Int + hasFunder: Boolean + hasOrganization: Boolean + hasParts: Int + hasPerson: Boolean + hasVersions: Int + hasViews: Int + ids: [String!] + + """ + Returns the last _n_ elements from the list. + """ + last: Int + memberId: String + query: String + repositoryId: String + userId: String + ): WorkConnection + + """ + The year when the data was or will be made publicly available + """ + publicationYear: Int + + """ + The name of the entity that holds, archives, publishes prints, distributes, releases, issues, or produces the resource + """ + publisher: String + + """ + Total number of references + """ + referenceCount: Int + + """ + References for this DOI + """ + references( + affiliationId: String + + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + first: Int = 25 + funderId: String + hasCitations: Int + hasDownloads: Int + hasFunder: Boolean + hasOrganization: Boolean + hasParts: Int + hasPerson: Boolean + hasVersions: Int + hasViews: Int + ids: [String!] + + """ + Returns the last _n_ elements from the list. + """ + last: Int + memberId: String + query: String + repositoryId: String + userId: String + ): WorkConnection + + """ + The DOI registration agency for the resource + """ + registrationAgency: String + + """ + Identifiers of related resources. These must be globally unique identifiers + """ + relatedIdentifiers: [RelatedIdentifier!] + + """ + The repository account managing this resource + """ + repository: Repository + + """ + Any rights information for this resource + """ + rights: [Rights!] + + """ + Size (e.g. bytes, pages, inches, etc.) or duration (extent), e.g. hours, minutes, days, etc., of a resource + """ + sizes: [String!] + + """ + Subject, keyword, classification code, or key phrase describing the resource + """ + subjects: [Subject!] + + """ + A name or title by which a resource is known + """ + titles(first: Int = 5): [Title!] + + """ + The type of the item. + """ + type: String! + + """ + The resource type + """ + types: ResourceType! + + """ + The URL registered for the resource + """ + url: Url + + """ + The version number of the resource + """ + version: String + + """ + Total number of versions + """ + versionCount: Int + + """ + The DOI is a version of this DOI. + """ + versionOf( + affiliationId: String + + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + first: Int = 25 + funderId: String + hasCitations: Int + hasDownloads: Int + hasFunder: Boolean + hasOrganization: Boolean + hasParts: Int + hasPerson: Boolean + hasVersions: Int + hasViews: Int + ids: [String!] + + """ + Returns the last _n_ elements from the list. + """ + last: Int + memberId: String + query: String + repositoryId: String + userId: String + ): WorkConnection + + """ + Total number of DOIs the resource is a version of + """ + versionOfCount: Int + + """ + Versions of this DOI. + """ + versions( + affiliationId: String + + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + first: Int = 25 + funderId: String + hasCitations: Int + hasDownloads: Int + hasFunder: Boolean + hasOrganization: Boolean + hasParts: Int + hasPerson: Boolean + hasVersions: Int + hasViews: Int + ids: [String!] + + """ + Returns the last _n_ elements from the list. + """ + last: Int + memberId: String + query: String + repositoryId: String + userId: String + ): WorkConnection + + """ + Total number of views + """ + viewCount: Int + + """ + Views by month + """ + viewsOverTime: [YearMonthTotal!] +} + +""" +The connection type for Image. +""" +type ImageConnection { + affiliations: [Facet!] + + """ + A list of edges. + """ + edges: [ImageEdge] + + """ + A list of nodes. + """ + nodes: [Image] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + registrationAgencies: [Facet!] + repositories: [Facet!] + totalCount: Int! + years: [Facet!] +} + +""" +An edge in a connection. +""" +type ImageEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: Image +} + +type Instrument implements DoiItem { + """ + Metadata in bibtex format + """ + bibtex: String + + """ + Total number of citations + """ + citationCount: Int + + """ + Citations for this DOI. + """ + citations( + affiliationId: String + + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + first: Int = 25 + funderId: String + hasCitations: Int + hasDownloads: Int + hasFunder: Boolean + hasOrganization: Boolean + hasParts: Int + hasPerson: Boolean + hasVersions: Int + hasViews: Int + ids: [String!] + + """ + Returns the last _n_ elements from the list. + """ + last: Int + memberId: String + query: String + repositoryId: String + userId: String + ): WorkConnection + + """ + Citations by year + """ + citationsOverTime: [YearTotal!] + + """ + The main researchers involved in producing the data, or the authors of the publication, in priority order + """ + creators(first: Int = 20): [Creator!] + + """ + Different dates relevant to the work + """ + dates: [Date!] + + """ + All additional information that does not fit in any of the other categories + """ + descriptions(first: Int = 5): [Description!] + + """ + Total number of downloads + """ + downloadCount: Int + + """ + Downloads by month + """ + downloadsOverTime: [YearMonthTotal!] + + """ + Technical format of the resource + """ + formats: [String!] + + """ + Metadata as formatted citation + """ + formattedCitation(locale: String = "en-US", style: String = "apa"): String + + """ + Information about financial support (funding) for the resource being registered + """ + fundingReferences: [Funding!] + + """ + The persistent identifier for the resource + """ + id: ID! + + """ + An identifier or identifiers applied to the resource being registered + """ + identifiers: [Identifier!] + + """ + The primary language of the resource + """ + language: String + + """ + The member account managing this resource + """ + member: Member + + """ + Total number of parts + """ + partCount: Int + + """ + The DOI is a part of this DOI. + """ + partOf( + affiliationId: String + + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + first: Int = 25 + funderId: String + hasCitations: Int + hasDownloads: Int + hasFunder: Boolean + hasOrganization: Boolean + hasParts: Int + hasPerson: Boolean + hasVersions: Int + hasViews: Int + ids: [String!] + + """ + Returns the last _n_ elements from the list. + """ + last: Int + memberId: String + query: String + repositoryId: String + userId: String + ): WorkConnection + + """ + Total number of DOIs the resource is a part of + """ + partOfCount: Int + + """ + Parts of this DOI. + """ + parts( + affiliationId: String + + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + first: Int = 25 + funderId: String + hasCitations: Int + hasDownloads: Int + hasFunder: Boolean + hasOrganization: Boolean + hasParts: Int + hasPerson: Boolean + hasVersions: Int + hasViews: Int + ids: [String!] + + """ + Returns the last _n_ elements from the list. + """ + last: Int + memberId: String + query: String + repositoryId: String + userId: String + ): WorkConnection + + """ + The year when the data was or will be made publicly available + """ + publicationYear: Int + + """ + The name of the entity that holds, archives, publishes prints, distributes, releases, issues, or produces the resource + """ + publisher: String + + """ + Total number of references + """ + referenceCount: Int + + """ + References for this DOI + """ + references( + affiliationId: String + + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + first: Int = 25 + funderId: String + hasCitations: Int + hasDownloads: Int + hasFunder: Boolean + hasOrganization: Boolean + hasParts: Int + hasPerson: Boolean + hasVersions: Int + hasViews: Int + ids: [String!] + + """ + Returns the last _n_ elements from the list. + """ + last: Int + memberId: String + query: String + repositoryId: String + userId: String + ): WorkConnection + + """ + The DOI registration agency for the resource + """ + registrationAgency: String + + """ + Identifiers of related resources. These must be globally unique identifiers + """ + relatedIdentifiers: [RelatedIdentifier!] + + """ + The repository account managing this resource + """ + repository: Repository + + """ + Any rights information for this resource + """ + rights: [Rights!] + + """ + Size (e.g. bytes, pages, inches, etc.) or duration (extent), e.g. hours, minutes, days, etc., of a resource + """ + sizes: [String!] + + """ + Subject, keyword, classification code, or key phrase describing the resource + """ + subjects: [Subject!] + + """ + A name or title by which a resource is known + """ + titles(first: Int = 5): [Title!] + + """ + The type of the item. + """ + type: String! + + """ + The resource type + """ + types: ResourceType! + + """ + The URL registered for the resource + """ + url: Url + + """ + The version number of the resource + """ + version: String + + """ + Total number of versions + """ + versionCount: Int + + """ + The DOI is a version of this DOI. + """ + versionOf( + affiliationId: String + + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + first: Int = 25 + funderId: String + hasCitations: Int + hasDownloads: Int + hasFunder: Boolean + hasOrganization: Boolean + hasParts: Int + hasPerson: Boolean + hasVersions: Int + hasViews: Int + ids: [String!] + + """ + Returns the last _n_ elements from the list. + """ + last: Int + memberId: String + query: String + repositoryId: String + userId: String + ): WorkConnection + + """ + Total number of DOIs the resource is a version of + """ + versionOfCount: Int + + """ + Versions of this DOI. + """ + versions( + affiliationId: String + + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + first: Int = 25 + funderId: String + hasCitations: Int + hasDownloads: Int + hasFunder: Boolean + hasOrganization: Boolean + hasParts: Int + hasPerson: Boolean + hasVersions: Int + hasViews: Int + ids: [String!] + + """ + Returns the last _n_ elements from the list. + """ + last: Int + memberId: String + query: String + repositoryId: String + userId: String + ): WorkConnection + + """ + Total number of views + """ + viewCount: Int + + """ + Views by month + """ + viewsOverTime: [YearMonthTotal!] +} + +""" +The connection type for Instrument. +""" +type InstrumentConnection { + affiliations: [Facet!] + + """ + A list of edges. + """ + edges: [InstrumentEdge] + + """ + A list of nodes. + """ + nodes: [Instrument] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + registrationAgencies: [Facet!] + repositories: [Facet!] + totalCount: Int! + years: [Facet!] +} + +""" +An edge in a connection. +""" +type InstrumentEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: Instrument +} + +type InteractiveResource implements DoiItem { + """ + Metadata in bibtex format + """ + bibtex: String + + """ + Total number of citations + """ + citationCount: Int + + """ + Citations for this DOI. + """ + citations( + affiliationId: String + + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + first: Int = 25 + funderId: String + hasCitations: Int + hasDownloads: Int + hasFunder: Boolean + hasOrganization: Boolean + hasParts: Int + hasPerson: Boolean + hasVersions: Int + hasViews: Int + ids: [String!] + + """ + Returns the last _n_ elements from the list. + """ + last: Int + memberId: String + query: String + repositoryId: String + userId: String + ): WorkConnection + + """ + Citations by year + """ + citationsOverTime: [YearTotal!] + + """ + The main researchers involved in producing the data, or the authors of the publication, in priority order + """ + creators(first: Int = 20): [Creator!] + + """ + Different dates relevant to the work + """ + dates: [Date!] + + """ + All additional information that does not fit in any of the other categories + """ + descriptions(first: Int = 5): [Description!] + + """ + Total number of downloads + """ + downloadCount: Int + + """ + Downloads by month + """ + downloadsOverTime: [YearMonthTotal!] + + """ + Technical format of the resource + """ + formats: [String!] + + """ + Metadata as formatted citation + """ + formattedCitation(locale: String = "en-US", style: String = "apa"): String + + """ + Information about financial support (funding) for the resource being registered + """ + fundingReferences: [Funding!] + + """ + The persistent identifier for the resource + """ + id: ID! + + """ + An identifier or identifiers applied to the resource being registered + """ + identifiers: [Identifier!] + + """ + The primary language of the resource + """ + language: String + + """ + The member account managing this resource + """ + member: Member + + """ + Total number of parts + """ + partCount: Int + + """ + The DOI is a part of this DOI. + """ + partOf( + affiliationId: String + + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + first: Int = 25 + funderId: String + hasCitations: Int + hasDownloads: Int + hasFunder: Boolean + hasOrganization: Boolean + hasParts: Int + hasPerson: Boolean + hasVersions: Int + hasViews: Int + ids: [String!] + + """ + Returns the last _n_ elements from the list. + """ + last: Int + memberId: String + query: String + repositoryId: String + userId: String + ): WorkConnection + + """ + Total number of DOIs the resource is a part of + """ + partOfCount: Int + + """ + Parts of this DOI. + """ + parts( + affiliationId: String + + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + first: Int = 25 + funderId: String + hasCitations: Int + hasDownloads: Int + hasFunder: Boolean + hasOrganization: Boolean + hasParts: Int + hasPerson: Boolean + hasVersions: Int + hasViews: Int + ids: [String!] + + """ + Returns the last _n_ elements from the list. + """ + last: Int + memberId: String + query: String + repositoryId: String + userId: String + ): WorkConnection + + """ + The year when the data was or will be made publicly available + """ + publicationYear: Int + + """ + The name of the entity that holds, archives, publishes prints, distributes, releases, issues, or produces the resource + """ + publisher: String + + """ + Total number of references + """ + referenceCount: Int + + """ + References for this DOI + """ + references( + affiliationId: String + + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + first: Int = 25 + funderId: String + hasCitations: Int + hasDownloads: Int + hasFunder: Boolean + hasOrganization: Boolean + hasParts: Int + hasPerson: Boolean + hasVersions: Int + hasViews: Int + ids: [String!] + + """ + Returns the last _n_ elements from the list. + """ + last: Int + memberId: String + query: String + repositoryId: String + userId: String + ): WorkConnection + + """ + The DOI registration agency for the resource + """ + registrationAgency: String + + """ + Identifiers of related resources. These must be globally unique identifiers + """ + relatedIdentifiers: [RelatedIdentifier!] + + """ + The repository account managing this resource + """ + repository: Repository + + """ + Any rights information for this resource + """ + rights: [Rights!] + + """ + Size (e.g. bytes, pages, inches, etc.) or duration (extent), e.g. hours, minutes, days, etc., of a resource + """ + sizes: [String!] + + """ + Subject, keyword, classification code, or key phrase describing the resource + """ + subjects: [Subject!] + + """ + A name or title by which a resource is known + """ + titles(first: Int = 5): [Title!] + + """ + The type of the item. + """ + type: String! + + """ + The resource type + """ + types: ResourceType! + + """ + The URL registered for the resource + """ + url: Url + + """ + The version number of the resource + """ + version: String + + """ + Total number of versions + """ + versionCount: Int + + """ + The DOI is a version of this DOI. + """ + versionOf( + affiliationId: String + + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + first: Int = 25 + funderId: String + hasCitations: Int + hasDownloads: Int + hasFunder: Boolean + hasOrganization: Boolean + hasParts: Int + hasPerson: Boolean + hasVersions: Int + hasViews: Int + ids: [String!] + + """ + Returns the last _n_ elements from the list. + """ + last: Int + memberId: String + query: String + repositoryId: String + userId: String + ): WorkConnection + + """ + Total number of DOIs the resource is a version of + """ + versionOfCount: Int + + """ + Versions of this DOI. + """ + versions( + affiliationId: String + + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + first: Int = 25 + funderId: String + hasCitations: Int + hasDownloads: Int + hasFunder: Boolean + hasOrganization: Boolean + hasParts: Int + hasPerson: Boolean + hasVersions: Int + hasViews: Int + ids: [String!] + + """ + Returns the last _n_ elements from the list. + """ + last: Int + memberId: String + query: String + repositoryId: String + userId: String + ): WorkConnection + + """ + Total number of views + """ + viewCount: Int + + """ + Views by month + """ + viewsOverTime: [YearMonthTotal!] +} + +""" +The connection type for InteractiveResource. +""" +type InteractiveResourceConnection { + affiliations: [Facet!] + + """ + A list of edges. + """ + edges: [InteractiveResourceEdge] + + """ + A list of nodes. + """ + nodes: [InteractiveResource] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + registrationAgencies: [Facet!] + repositories: [Facet!] + totalCount: Int! + years: [Facet!] +} + +""" +An edge in a connection. +""" +type InteractiveResourceEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: InteractiveResource +} + +""" +Information about ISSN +""" +type Issn { + """ + The electronic ISSN + """ + electronic: String + + """ + The ISSNL + """ + issnl: String + + """ + The print ISSN + """ + print: String +} + +type JournalArticle implements DoiItem { + """ + Metadata in bibtex format + """ + bibtex: String + + """ + Total number of citations + """ + citationCount: Int + + """ + Citations for this DOI. + """ + citations( + affiliationId: String + + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + first: Int = 25 + funderId: String + hasCitations: Int + hasDownloads: Int + hasFunder: Boolean + hasOrganization: Boolean + hasParts: Int + hasPerson: Boolean + hasVersions: Int + hasViews: Int + ids: [String!] + + """ + Returns the last _n_ elements from the list. + """ + last: Int + memberId: String + query: String + repositoryId: String + userId: String + ): WorkConnection + + """ + Citations by year + """ + citationsOverTime: [YearTotal!] + + """ + The main researchers involved in producing the data, or the authors of the publication, in priority order + """ + creators(first: Int = 20): [Creator!] + + """ + Different dates relevant to the work + """ + dates: [Date!] + + """ + All additional information that does not fit in any of the other categories + """ + descriptions(first: Int = 5): [Description!] + + """ + Total number of downloads + """ + downloadCount: Int + + """ + Downloads by month + """ + downloadsOverTime: [YearMonthTotal!] + + """ + Technical format of the resource + """ + formats: [String!] + + """ + Metadata as formatted citation + """ + formattedCitation(locale: String = "en-US", style: String = "apa"): String + + """ + Information about financial support (funding) for the resource being registered + """ + fundingReferences: [Funding!] + + """ + The persistent identifier for the resource + """ + id: ID! + + """ + An identifier or identifiers applied to the resource being registered + """ + identifiers: [Identifier!] + + """ + The primary language of the resource + """ + language: String + + """ + The member account managing this resource + """ + member: Member + + """ + Total number of parts + """ + partCount: Int + + """ + The DOI is a part of this DOI. + """ + partOf( + affiliationId: String + + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + first: Int = 25 + funderId: String + hasCitations: Int + hasDownloads: Int + hasFunder: Boolean + hasOrganization: Boolean + hasParts: Int + hasPerson: Boolean + hasVersions: Int + hasViews: Int + ids: [String!] + + """ + Returns the last _n_ elements from the list. + """ + last: Int + memberId: String + query: String + repositoryId: String + userId: String + ): WorkConnection + + """ + Total number of DOIs the resource is a part of + """ + partOfCount: Int + + """ + Parts of this DOI. + """ + parts( + affiliationId: String + + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + first: Int = 25 + funderId: String + hasCitations: Int + hasDownloads: Int + hasFunder: Boolean + hasOrganization: Boolean + hasParts: Int + hasPerson: Boolean + hasVersions: Int + hasViews: Int + ids: [String!] + + """ + Returns the last _n_ elements from the list. + """ + last: Int + memberId: String + query: String + repositoryId: String + userId: String + ): WorkConnection + + """ + The year when the data was or will be made publicly available + """ + publicationYear: Int + + """ + The name of the entity that holds, archives, publishes prints, distributes, releases, issues, or produces the resource + """ + publisher: String + + """ + Total number of references + """ + referenceCount: Int + + """ + References for this DOI + """ + references( + affiliationId: String + + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + first: Int = 25 + funderId: String + hasCitations: Int + hasDownloads: Int + hasFunder: Boolean + hasOrganization: Boolean + hasParts: Int + hasPerson: Boolean + hasVersions: Int + hasViews: Int + ids: [String!] + + """ + Returns the last _n_ elements from the list. + """ + last: Int + memberId: String + query: String + repositoryId: String + userId: String + ): WorkConnection + + """ + The DOI registration agency for the resource + """ + registrationAgency: String + + """ + Identifiers of related resources. These must be globally unique identifiers + """ + relatedIdentifiers: [RelatedIdentifier!] + + """ + The repository account managing this resource + """ + repository: Repository + + """ + Any rights information for this resource + """ + rights: [Rights!] + + """ + Size (e.g. bytes, pages, inches, etc.) or duration (extent), e.g. hours, minutes, days, etc., of a resource + """ + sizes: [String!] + + """ + Subject, keyword, classification code, or key phrase describing the resource + """ + subjects: [Subject!] + + """ + A name or title by which a resource is known + """ + titles(first: Int = 5): [Title!] + + """ + The type of the item. + """ + type: String! + + """ + The resource type + """ + types: ResourceType! + + """ + The URL registered for the resource + """ + url: Url + + """ + The version number of the resource + """ + version: String + + """ + Total number of versions + """ + versionCount: Int + + """ + The DOI is a version of this DOI. + """ + versionOf( + affiliationId: String + + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + first: Int = 25 + funderId: String + hasCitations: Int + hasDownloads: Int + hasFunder: Boolean + hasOrganization: Boolean + hasParts: Int + hasPerson: Boolean + hasVersions: Int + hasViews: Int + ids: [String!] + + """ + Returns the last _n_ elements from the list. + """ + last: Int + memberId: String + query: String + repositoryId: String + userId: String + ): WorkConnection + + """ + Total number of DOIs the resource is a version of + """ + versionOfCount: Int + + """ + Versions of this DOI. + """ + versions( + affiliationId: String + + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + first: Int = 25 + funderId: String + hasCitations: Int + hasDownloads: Int + hasFunder: Boolean + hasOrganization: Boolean + hasParts: Int + hasPerson: Boolean + hasVersions: Int + hasViews: Int + ids: [String!] + + """ + Returns the last _n_ elements from the list. + """ + last: Int + memberId: String + query: String + repositoryId: String + userId: String + ): WorkConnection + + """ + Total number of views + """ + viewCount: Int + + """ + Views by month + """ + viewsOverTime: [YearMonthTotal!] +} + +""" +The connection type for JournalArticle. +""" +type JournalArticleConnection { + affiliations: [Facet!] + + """ + A list of edges. + """ + edges: [JournalArticleEdge] + + """ + A list of nodes. + """ + nodes: [JournalArticle] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + registrationAgencies: [Facet!] + repositories: [Facet!] + totalCount: Int! + years: [Facet!] +} + +""" +An edge in a connection. +""" +type JournalArticleEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: JournalArticle +} + +""" +Information about providers +""" +type Member { + """ + The number of citations. + """ + citationCount: Int + + """ + Country where the provider is located + """ + country: Country + + """ + Datasets by this provider. + """ + datasets( + affiliationId: String + + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + first: Int = 25 + funderId: String + hasCitations: Int + hasDownloads: Int + hasFunder: Boolean + hasOrganization: Boolean + hasParts: Int + hasPerson: Boolean + hasVersions: Int + hasViews: Int + ids: String + + """ + Returns the last _n_ elements from the list. + """ + last: Int + query: String + repositoryId: String + resourceTypeId: String + userId: String + ): DatasetConnection + + """ + Description of the provider + """ + description: String + + """ + Provider display name + """ + displayName: String! + + """ + The number of downloads according to the Counter Code of Practice. + """ + downloadCount: Int + + """ + Field of science covered by provider + """ + focusArea: String + + """ + Unique identifier for each provider + """ + id: ID! + + """ + Date provider joined DataCite + """ + joined: ISO8601Date + + """ + URL for the provider logo + """ + logoUrl: Url + + """ + Provider name + """ + name: String! + + """ + Type of organization + """ + organizationType: String + + """ + Prefixes managed by the member + """ + prefixes( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + first: Int = 25 + + """ + Returns the last _n_ elements from the list. + """ + last: Int + query: String + state: String + year: String + ): MemberPrefixConnection + + """ + Publications by this provider. + """ + publications( + affiliationId: String + + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + first: Int = 25 + funderId: String + hasCitations: Int + hasDownloads: Int + hasFunder: Boolean + hasOrganization: Boolean + hasParts: Int + hasPerson: Boolean + hasVersions: Int + hasViews: Int + ids: String + + """ + Returns the last _n_ elements from the list. + """ + last: Int + query: String + repositoryId: String + resourceTypeId: String + userId: String + ): PublicationConnection + + """ + Geographic region where the provider is located + """ + region: String + + """ + Repositories associated with the member + """ + repositories( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + first: Int = 25 + + """ + Returns the last _n_ elements from the list. + """ + last: Int + query: String + software: String + year: String + ): RepositoryConnection + + """ + Research Organization Registry (ROR) identifier + """ + rorId: ID + + """ + Software by this provider. + """ + softwares( + affiliationId: String + + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + first: Int = 25 + funderId: String + hasCitations: Int + hasDownloads: Int + hasFunder: Boolean + hasOrganization: Boolean + hasParts: Int + hasPerson: Boolean + hasVersions: Int + hasViews: Int + ids: [String!] + + """ + Returns the last _n_ elements from the list. + """ + last: Int + query: String + repositoryId: String + resourceTypeId: String + userId: String + ): SoftwareConnection + + """ + The type of the item. + """ + type: String! + + """ + The number of views according to the Counter Code of Practice. + """ + viewCount: Int + + """ + Website of the provider + """ + website: Url + + """ + Works by this provider. + """ + works( + affiliationId: String + + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + first: Int = 25 + funderId: String + hasCitations: Int + hasDownloads: Int + hasFunder: Boolean + hasOrganization: Boolean + hasParts: Int + hasPerson: Boolean + hasVersions: Int + hasViews: Int + ids: [String!] + + """ + Returns the last _n_ elements from the list. + """ + last: Int + query: String + repositoryId: String + resourceTypeId: String + userId: String + ): WorkConnection +} + +""" +The connection type for Member. +""" +type MemberConnection { + """ + A list of edges. + """ + edges: [MemberEdge] + + """ + A list of nodes. + """ + nodes: [Member] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + totalCount: Int! +} + +""" +An edge in a connection. +""" +type MemberEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: Member +} + +""" +Information about member prefixes +""" +type MemberPrefix { + """ + Unique identifier for each provider prefix + """ + id: ID! + + """ + Provider prefix name + """ + name: String! + + """ + The type of the item. + """ + type: String! +} + +""" +The connection type for MemberPrefix. +""" +type MemberPrefixConnection { + """ + A list of edges. + """ + edges: [MemberPrefixEdge] + + """ + A list of nodes. + """ + nodes: [MemberPrefix] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + states: [Facet!]! + totalCount: Int! + years: [Facet!]! +} + +""" +An edge in a connection. +""" +type MemberPrefixEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: MemberPrefix +} + +type Model implements DoiItem { + """ + Metadata in bibtex format + """ + bibtex: String + + """ + Total number of citations + """ + citationCount: Int + + """ + Citations for this DOI. + """ + citations( + affiliationId: String + + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + first: Int = 25 + funderId: String + hasCitations: Int + hasDownloads: Int + hasFunder: Boolean + hasOrganization: Boolean + hasParts: Int + hasPerson: Boolean + hasVersions: Int + hasViews: Int + ids: [String!] + + """ + Returns the last _n_ elements from the list. + """ + last: Int + memberId: String + query: String + repositoryId: String + userId: String + ): WorkConnection + + """ + Citations by year + """ + citationsOverTime: [YearTotal!] + + """ + The main researchers involved in producing the data, or the authors of the publication, in priority order + """ + creators(first: Int = 20): [Creator!] + + """ + Different dates relevant to the work + """ + dates: [Date!] + + """ + All additional information that does not fit in any of the other categories + """ + descriptions(first: Int = 5): [Description!] + + """ + Total number of downloads + """ + downloadCount: Int + + """ + Downloads by month + """ + downloadsOverTime: [YearMonthTotal!] + + """ + Technical format of the resource + """ + formats: [String!] + + """ + Metadata as formatted citation + """ + formattedCitation(locale: String = "en-US", style: String = "apa"): String + + """ + Information about financial support (funding) for the resource being registered + """ + fundingReferences: [Funding!] + + """ + The persistent identifier for the resource + """ + id: ID! + + """ + An identifier or identifiers applied to the resource being registered + """ + identifiers: [Identifier!] + + """ + The primary language of the resource + """ + language: String + + """ + The member account managing this resource + """ + member: Member + + """ + Total number of parts + """ + partCount: Int + + """ + The DOI is a part of this DOI. + """ + partOf( + affiliationId: String + + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + first: Int = 25 + funderId: String + hasCitations: Int + hasDownloads: Int + hasFunder: Boolean + hasOrganization: Boolean + hasParts: Int + hasPerson: Boolean + hasVersions: Int + hasViews: Int + ids: [String!] + + """ + Returns the last _n_ elements from the list. + """ + last: Int + memberId: String + query: String + repositoryId: String + userId: String + ): WorkConnection + + """ + Total number of DOIs the resource is a part of + """ + partOfCount: Int + + """ + Parts of this DOI. + """ + parts( + affiliationId: String + + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + first: Int = 25 + funderId: String + hasCitations: Int + hasDownloads: Int + hasFunder: Boolean + hasOrganization: Boolean + hasParts: Int + hasPerson: Boolean + hasVersions: Int + hasViews: Int + ids: [String!] + + """ + Returns the last _n_ elements from the list. + """ + last: Int + memberId: String + query: String + repositoryId: String + userId: String + ): WorkConnection + + """ + The year when the data was or will be made publicly available + """ + publicationYear: Int + + """ + The name of the entity that holds, archives, publishes prints, distributes, releases, issues, or produces the resource + """ + publisher: String + + """ + Total number of references + """ + referenceCount: Int + + """ + References for this DOI + """ + references( + affiliationId: String + + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + first: Int = 25 + funderId: String + hasCitations: Int + hasDownloads: Int + hasFunder: Boolean + hasOrganization: Boolean + hasParts: Int + hasPerson: Boolean + hasVersions: Int + hasViews: Int + ids: [String!] + + """ + Returns the last _n_ elements from the list. + """ + last: Int + memberId: String + query: String + repositoryId: String + userId: String + ): WorkConnection + + """ + The DOI registration agency for the resource + """ + registrationAgency: String + + """ + Identifiers of related resources. These must be globally unique identifiers + """ + relatedIdentifiers: [RelatedIdentifier!] + + """ + The repository account managing this resource + """ + repository: Repository + + """ + Any rights information for this resource + """ + rights: [Rights!] + + """ + Size (e.g. bytes, pages, inches, etc.) or duration (extent), e.g. hours, minutes, days, etc., of a resource + """ + sizes: [String!] + + """ + Subject, keyword, classification code, or key phrase describing the resource + """ + subjects: [Subject!] + + """ + A name or title by which a resource is known + """ + titles(first: Int = 5): [Title!] + + """ + The type of the item. + """ + type: String! + + """ + The resource type + """ + types: ResourceType! + + """ + The URL registered for the resource + """ + url: Url + + """ + The version number of the resource + """ + version: String + + """ + Total number of versions + """ + versionCount: Int + + """ + The DOI is a version of this DOI. + """ + versionOf( + affiliationId: String + + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + first: Int = 25 + funderId: String + hasCitations: Int + hasDownloads: Int + hasFunder: Boolean + hasOrganization: Boolean + hasParts: Int + hasPerson: Boolean + hasVersions: Int + hasViews: Int + ids: [String!] + + """ + Returns the last _n_ elements from the list. + """ + last: Int + memberId: String + query: String + repositoryId: String + userId: String + ): WorkConnection + + """ + Total number of DOIs the resource is a version of + """ + versionOfCount: Int + + """ + Versions of this DOI. + """ + versions( + affiliationId: String + + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + first: Int = 25 + funderId: String + hasCitations: Int + hasDownloads: Int + hasFunder: Boolean + hasOrganization: Boolean + hasParts: Int + hasPerson: Boolean + hasVersions: Int + hasViews: Int + ids: [String!] + + """ + Returns the last _n_ elements from the list. + """ + last: Int + memberId: String + query: String + repositoryId: String + userId: String + ): WorkConnection + + """ + Total number of views + """ + viewCount: Int + + """ + Views by month + """ + viewsOverTime: [YearMonthTotal!] +} + +""" +The connection type for Model. +""" +type ModelConnection { + affiliations: [Facet!] + + """ + A list of edges. + """ + edges: [ModelEdge] + + """ + A list of nodes. + """ + nodes: [Model] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + registrationAgencies: [Facet!] + repositories: [Facet!] + totalCount: Int! + years: [Facet!] +} + +""" +An edge in a connection. +""" +type ModelEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: Model +} + +""" +Information about organizations +""" +type Organization { + """ + Physical address of the organization. + """ + address: Address + + """ + An alias for the organization. + """ + alternateName: [String!] + + """ + The number of citations. + """ + citationCount: Int + + """ + Datasets from this organization + """ + datasets( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + first: Int = 25 + funderId: String + hasCitations: Int + hasDownloads: Int + hasParts: Int + hasVersions: Int + hasViews: Int + ids: [String!] + + """ + Returns the last _n_ elements from the list. + """ + last: Int + memberId: String + query: String + repositoryId: String + userId: String + ): DatasetConnection + + """ + The number of downloads according to the Counter Code of Practice. + """ + downloadCount: Int + + """ + ROR ID + """ + id: ID + + """ + The identifier(s) for the organization. + """ + identifiers: [Identifier!] + + """ + The name of the organization. + """ + name: String! + + """ + Publications from this organization + """ + publications( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + first: Int = 25 + funderId: String + hasCitations: Int + hasDownloads: Int + hasParts: Int + hasVersions: Int + hasViews: Int + ids: [String!] + + """ + Returns the last _n_ elements from the list. + """ + last: Int + memberId: String + query: String + repositoryId: String + userId: String + ): PublicationConnection + + """ + Software from this organization + """ + softwares( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + first: Int = 25 + funderId: String + hasCitations: Int + hasDownloads: Int + hasParts: Int + hasVersions: Int + hasViews: Int + ids: [String!] + + """ + Returns the last _n_ elements from the list. + """ + last: Int + memberId: String + query: String + repositoryId: String + userId: String + ): SoftwareConnection + + """ + The type of the item. + """ + type: String! + + """ + URL of the organization. + """ + url: [String!] + + """ + The number of views according to the Counter Code of Practice. + """ + viewCount: Int + + """ + Works from this organization + """ + works( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + first: Int = 25 + funderId: String + hasCitations: Int + hasDownloads: Int + hasParts: Int + hasVersions: Int + hasViews: Int + ids: [String!] + + """ + Returns the last _n_ elements from the list. + """ + last: Int + memberId: String + query: String + repositoryId: String + userId: String + ): WorkConnection +} + +""" +The connection type for Organization. +""" +type OrganizationConnection { + """ + A list of edges. + """ + edges: [OrganizationEdge] + + """ + A list of nodes. + """ + nodes: [Organization] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + personConnectionCount: Int! + totalCount: Int! +} + +""" +An edge in a connection. +""" +type OrganizationEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: Organization +} + +type Other implements DoiItem { + """ + Metadata in bibtex format + """ + bibtex: String + + """ + Total number of citations + """ + citationCount: Int + + """ + Citations for this DOI. + """ + citations( + affiliationId: String + + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + first: Int = 25 + funderId: String + hasCitations: Int + hasDownloads: Int + hasFunder: Boolean + hasOrganization: Boolean + hasParts: Int + hasPerson: Boolean + hasVersions: Int + hasViews: Int + ids: [String!] + + """ + Returns the last _n_ elements from the list. + """ + last: Int + memberId: String + query: String + repositoryId: String + userId: String + ): WorkConnection + + """ + Citations by year + """ + citationsOverTime: [YearTotal!] + + """ + The main researchers involved in producing the data, or the authors of the publication, in priority order + """ + creators(first: Int = 20): [Creator!] + + """ + Different dates relevant to the work + """ + dates: [Date!] + + """ + All additional information that does not fit in any of the other categories + """ + descriptions(first: Int = 5): [Description!] + + """ + Total number of downloads + """ + downloadCount: Int + + """ + Downloads by month + """ + downloadsOverTime: [YearMonthTotal!] + + """ + Technical format of the resource + """ + formats: [String!] + + """ + Metadata as formatted citation + """ + formattedCitation(locale: String = "en-US", style: String = "apa"): String + + """ + Information about financial support (funding) for the resource being registered + """ + fundingReferences: [Funding!] + + """ + The persistent identifier for the resource + """ + id: ID! + + """ + An identifier or identifiers applied to the resource being registered + """ + identifiers: [Identifier!] + + """ + The primary language of the resource + """ + language: String + + """ + The member account managing this resource + """ + member: Member + + """ + Total number of parts + """ + partCount: Int + + """ + The DOI is a part of this DOI. + """ + partOf( + affiliationId: String + + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + first: Int = 25 + funderId: String + hasCitations: Int + hasDownloads: Int + hasFunder: Boolean + hasOrganization: Boolean + hasParts: Int + hasPerson: Boolean + hasVersions: Int + hasViews: Int + ids: [String!] + + """ + Returns the last _n_ elements from the list. + """ + last: Int + memberId: String + query: String + repositoryId: String + userId: String + ): WorkConnection + + """ + Total number of DOIs the resource is a part of + """ + partOfCount: Int + + """ + Parts of this DOI. + """ + parts( + affiliationId: String + + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + first: Int = 25 + funderId: String + hasCitations: Int + hasDownloads: Int + hasFunder: Boolean + hasOrganization: Boolean + hasParts: Int + hasPerson: Boolean + hasVersions: Int + hasViews: Int + ids: [String!] + + """ + Returns the last _n_ elements from the list. + """ + last: Int + memberId: String + query: String + repositoryId: String + userId: String + ): WorkConnection + + """ + The year when the data was or will be made publicly available + """ + publicationYear: Int + + """ + The name of the entity that holds, archives, publishes prints, distributes, releases, issues, or produces the resource + """ + publisher: String + + """ + Total number of references + """ + referenceCount: Int + + """ + References for this DOI + """ + references( + affiliationId: String + + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + first: Int = 25 + funderId: String + hasCitations: Int + hasDownloads: Int + hasFunder: Boolean + hasOrganization: Boolean + hasParts: Int + hasPerson: Boolean + hasVersions: Int + hasViews: Int + ids: [String!] + + """ + Returns the last _n_ elements from the list. + """ + last: Int + memberId: String + query: String + repositoryId: String + userId: String + ): WorkConnection + + """ + The DOI registration agency for the resource + """ + registrationAgency: String + + """ + Identifiers of related resources. These must be globally unique identifiers + """ + relatedIdentifiers: [RelatedIdentifier!] + + """ + The repository account managing this resource + """ + repository: Repository + + """ + Any rights information for this resource + """ + rights: [Rights!] + + """ + Size (e.g. bytes, pages, inches, etc.) or duration (extent), e.g. hours, minutes, days, etc., of a resource + """ + sizes: [String!] + + """ + Subject, keyword, classification code, or key phrase describing the resource + """ + subjects: [Subject!] + + """ + A name or title by which a resource is known + """ + titles(first: Int = 5): [Title!] + + """ + The type of the item. + """ + type: String! + + """ + The resource type + """ + types: ResourceType! + + """ + The URL registered for the resource + """ + url: Url + + """ + The version number of the resource + """ + version: String + + """ + Total number of versions + """ + versionCount: Int + + """ + The DOI is a version of this DOI. + """ + versionOf( + affiliationId: String + + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + first: Int = 25 + funderId: String + hasCitations: Int + hasDownloads: Int + hasFunder: Boolean + hasOrganization: Boolean + hasParts: Int + hasPerson: Boolean + hasVersions: Int + hasViews: Int + ids: [String!] + + """ + Returns the last _n_ elements from the list. + """ + last: Int + memberId: String + query: String + repositoryId: String + userId: String + ): WorkConnection + + """ + Total number of DOIs the resource is a version of + """ + versionOfCount: Int + + """ + Versions of this DOI. + """ + versions( + affiliationId: String + + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + first: Int = 25 + funderId: String + hasCitations: Int + hasDownloads: Int + hasFunder: Boolean + hasOrganization: Boolean + hasParts: Int + hasPerson: Boolean + hasVersions: Int + hasViews: Int + ids: [String!] + + """ + Returns the last _n_ elements from the list. + """ + last: Int + memberId: String + query: String + repositoryId: String + userId: String + ): WorkConnection + + """ + Total number of views + """ + viewCount: Int + + """ + Views by month + """ + viewsOverTime: [YearMonthTotal!] +} + +""" +The connection type for Other. +""" +type OtherConnection { + affiliations: [Facet!] + + """ + A list of edges. + """ + edges: [OtherEdge] + + """ + A list of nodes. + """ + nodes: [Other] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + registrationAgencies: [Facet!] + repositories: [Facet!] + totalCount: Int! + years: [Facet!] +} + +""" +An edge in a connection. +""" +type OtherEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: Other +} + +""" +Information about pagination in a connection. +""" +type PageInfo { + """ + When paginating forwards, the cursor to continue. + """ + endCursor: String + + """ + When paginating forwards, are there more items? + """ + hasNextPage: Boolean! + + """ + When paginating backwards, are there more items? + """ + hasPreviousPage: Boolean! + + """ + When paginating backwards, the cursor to continue. + """ + startCursor: String +} + +type PeerReview implements DoiItem { + """ + Metadata in bibtex format + """ + bibtex: String + + """ + Total number of citations + """ + citationCount: Int + + """ + Citations for this DOI. + """ + citations( + affiliationId: String + + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + first: Int = 25 + funderId: String + hasCitations: Int + hasDownloads: Int + hasFunder: Boolean + hasOrganization: Boolean + hasParts: Int + hasPerson: Boolean + hasVersions: Int + hasViews: Int + ids: [String!] + + """ + Returns the last _n_ elements from the list. + """ + last: Int + memberId: String + query: String + repositoryId: String + userId: String + ): WorkConnection + + """ + Citations by year + """ + citationsOverTime: [YearTotal!] + + """ + The main researchers involved in producing the data, or the authors of the publication, in priority order + """ + creators(first: Int = 20): [Creator!] + + """ + Different dates relevant to the work + """ + dates: [Date!] + + """ + All additional information that does not fit in any of the other categories + """ + descriptions(first: Int = 5): [Description!] + + """ + Total number of downloads + """ + downloadCount: Int + + """ + Downloads by month + """ + downloadsOverTime: [YearMonthTotal!] + + """ + Technical format of the resource + """ + formats: [String!] + + """ + Metadata as formatted citation + """ + formattedCitation(locale: String = "en-US", style: String = "apa"): String + + """ + Information about financial support (funding) for the resource being registered + """ + fundingReferences: [Funding!] + + """ + The persistent identifier for the resource + """ + id: ID! + + """ + An identifier or identifiers applied to the resource being registered + """ + identifiers: [Identifier!] + + """ + The primary language of the resource + """ + language: String + + """ + The member account managing this resource + """ + member: Member + + """ + Total number of parts + """ + partCount: Int + + """ + The DOI is a part of this DOI. + """ + partOf( + affiliationId: String + + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + first: Int = 25 + funderId: String + hasCitations: Int + hasDownloads: Int + hasFunder: Boolean + hasOrganization: Boolean + hasParts: Int + hasPerson: Boolean + hasVersions: Int + hasViews: Int + ids: [String!] + + """ + Returns the last _n_ elements from the list. + """ + last: Int + memberId: String + query: String + repositoryId: String + userId: String + ): WorkConnection + + """ + Total number of DOIs the resource is a part of + """ + partOfCount: Int + + """ + Parts of this DOI. + """ + parts( + affiliationId: String + + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + first: Int = 25 + funderId: String + hasCitations: Int + hasDownloads: Int + hasFunder: Boolean + hasOrganization: Boolean + hasParts: Int + hasPerson: Boolean + hasVersions: Int + hasViews: Int + ids: [String!] + + """ + Returns the last _n_ elements from the list. + """ + last: Int + memberId: String + query: String + repositoryId: String + userId: String + ): WorkConnection + + """ + The year when the data was or will be made publicly available + """ + publicationYear: Int + + """ + The name of the entity that holds, archives, publishes prints, distributes, releases, issues, or produces the resource + """ + publisher: String + + """ + Total number of references + """ + referenceCount: Int + + """ + References for this DOI + """ + references( + affiliationId: String + + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + first: Int = 25 + funderId: String + hasCitations: Int + hasDownloads: Int + hasFunder: Boolean + hasOrganization: Boolean + hasParts: Int + hasPerson: Boolean + hasVersions: Int + hasViews: Int + ids: [String!] + + """ + Returns the last _n_ elements from the list. + """ + last: Int + memberId: String + query: String + repositoryId: String + userId: String + ): WorkConnection + + """ + The DOI registration agency for the resource + """ + registrationAgency: String """ Identifiers of related resources. These must be globally unique identifiers @@ -5807,23 +9162,27 @@ type Model implements DoiItem { } """ -The connection type for Model. +The connection type for PeerReview. """ -type ModelConnection { +type PeerReviewConnection { + affiliations: [Facet!] + """ A list of edges. """ - edges: [ModelEdge] + edges: [PeerReviewEdge] """ A list of nodes. """ - nodes: [Model] + nodes: [PeerReview] """ Information to aid in pagination. """ pageInfo: PageInfo! + registrationAgencies: [Facet!] + repositories: [Facet!] totalCount: Int! years: [Facet!] } @@ -5831,7 +9190,7 @@ type ModelConnection { """ An edge in a connection. """ -type ModelEdge { +type PeerReviewEdge { """ A cursor for use in pagination. """ @@ -5840,22 +9199,17 @@ type ModelEdge { """ The item at the end of the edge. """ - node: Model + node: PeerReview } """ -Information about organizations +A person. """ -type Organization { - """ - Physical address of the organization. - """ - address: Address - +type Person { """ - An alias for the organization. + Affiliations(s) of the person. """ - alternateName: [String!] + affiliation: [Affiliation!] """ The number of citations. @@ -5863,7 +9217,7 @@ type Organization { citationCount: Int """ - Datasets from this organization + Authored datasets """ datasets( """ @@ -5876,9 +9230,10 @@ type Organization { """ before: String first: Int = 25 - funderId: String hasCitations: Int hasDownloads: Int + hasFunder: Boolean + hasOrganization: Boolean hasParts: Int hasVersions: Int hasViews: Int @@ -5891,7 +9246,6 @@ type Organization { memberId: String query: String repositoryId: String - userId: String ): DatasetConnection """ @@ -5900,22 +9254,32 @@ type Organization { downloadCount: Int """ - ROR ID + Family name. In the U.S., the last name of an Person. + """ + familyName: String + + """ + Given name. In the U.S., the first name of a Person. + """ + givenName: String + + """ + The ORCID ID of the person. """ id: ID """ - The identifier(s) for the organization. + The name of the person. """ - identifiers: [Identifier!] + name: String """ - The name of the organization. + Other names. """ - name: String! + otherNames: [String!] """ - Publications from this organization + Authored publications """ publications( """ @@ -5928,9 +9292,10 @@ type Organization { """ before: String first: Int = 25 - funderId: String hasCitations: Int hasDownloads: Int + hasFunder: Boolean + hasOrganization: Boolean hasParts: Int hasVersions: Int hasViews: Int @@ -5943,11 +9308,10 @@ type Organization { memberId: String query: String repositoryId: String - userId: String ): PublicationConnection """ - Software from this organization + Authored software """ softwares( """ @@ -5960,9 +9324,10 @@ type Organization { """ before: String first: Int = 25 - funderId: String hasCitations: Int hasDownloads: Int + hasFunder: Boolean + hasOrganization: Boolean hasParts: Int hasVersions: Int hasViews: Int @@ -5975,7 +9340,6 @@ type Organization { memberId: String query: String repositoryId: String - userId: String ): SoftwareConnection """ @@ -5983,20 +9347,17 @@ type Organization { """ type: String! - """ - URL of the organization. - """ - url: [String!] - """ The number of views according to the Counter Code of Practice. """ viewCount: Int """ - Works from this organization + Authored works """ works( + affiliationId: String + """ Returns the elements in the list that come after the specified cursor. """ @@ -6007,9 +9368,10 @@ type Organization { """ before: String first: Int = 25 - funderId: String hasCitations: Int hasDownloads: Int + hasFunder: Boolean + hasOrganization: Boolean hasParts: Int hasVersions: Int hasViews: Int @@ -6022,36 +9384,39 @@ type Organization { memberId: String query: String repositoryId: String - userId: String ): WorkConnection } """ -The connection type for Organization. +The connection type for Person. """ -type OrganizationConnection { +type PersonConnection { + datasetConnectionCount: Int! + """ A list of edges. """ - edges: [OrganizationEdge] + edges: [PersonEdge] """ A list of nodes. """ - nodes: [Organization] + nodes: [Person] + organizationConnectionCount: Int! """ Information to aid in pagination. """ pageInfo: PageInfo! - personConnectionCount: Int! + publicationConnectionCount: Int! + softwareConnectionCount: Int! totalCount: Int! } """ An edge in a connection. """ -type OrganizationEdge { +type PersonEdge { """ A cursor for use in pagination. """ @@ -6060,10 +9425,10 @@ type OrganizationEdge { """ The item at the end of the edge. """ - node: Organization + node: Person } -type Other implements DoiItem { +type PhysicalObject implements DoiItem { """ Metadata in bibtex format """ @@ -6463,23 +9828,27 @@ type Other implements DoiItem { } """ -The connection type for Other. +The connection type for PhysicalObject. """ -type OtherConnection { +type PhysicalObjectConnection { + affiliations: [Facet!] + """ A list of edges. """ - edges: [OtherEdge] + edges: [PhysicalObjectEdge] """ A list of nodes. """ - nodes: [Other] + nodes: [PhysicalObject] """ Information to aid in pagination. """ pageInfo: PageInfo! + registrationAgencies: [Facet!] + repositories: [Facet!] totalCount: Int! years: [Facet!] } @@ -6487,7 +9856,7 @@ type OtherConnection { """ An edge in a connection. """ -type OtherEdge { +type PhysicalObjectEdge { """ A cursor for use in pagination. """ @@ -6496,249 +9865,51 @@ type OtherEdge { """ The item at the end of the edge. """ - node: Other -} - -""" -Information about pagination in a connection. -""" -type PageInfo { - """ - When paginating forwards, the cursor to continue. - """ - endCursor: String - - """ - When paginating forwards, are there more items? - """ - hasNextPage: Boolean! - - """ - When paginating backwards, are there more items? - """ - hasPreviousPage: Boolean! - - """ - When paginating backwards, the cursor to continue. - """ - startCursor: String + node: PhysicalObject } """ -A person. +Information about prefixes """ -type Person { - """ - Affiliations(s) of the person. - """ - affiliation: [Affiliation!] - - """ - The number of citations. - """ - citationCount: Int - - """ - Authored datasets - """ - datasets( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - first: Int = 25 - hasCitations: Int - hasDownloads: Int - hasFunder: Boolean - hasOrganization: Boolean - hasParts: Int - hasVersions: Int - hasViews: Int - ids: [String!] - - """ - Returns the last _n_ elements from the list. - """ - last: Int - memberId: String - query: String - repositoryId: String - ): DatasetConnection - - """ - The number of downloads according to the Counter Code of Practice. - """ - downloadCount: Int - - """ - Family name. In the U.S., the last name of an Person. - """ - familyName: String - - """ - Given name. In the U.S., the first name of a Person. - """ - givenName: String - - """ - The ORCID ID of the person. - """ - id: ID - - """ - The name of the person. - """ - name: String - - """ - Other names. - """ - otherNames: [String!] - - """ - Authored publications - """ - publications( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - first: Int = 25 - hasCitations: Int - hasDownloads: Int - hasFunder: Boolean - hasOrganization: Boolean - hasParts: Int - hasVersions: Int - hasViews: Int - ids: [String!] - - """ - Returns the last _n_ elements from the list. - """ - last: Int - memberId: String - query: String - repositoryId: String - ): PublicationConnection - +type Prefix { """ - Authored software + Unique identifier for each prefix """ - softwares( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - first: Int = 25 - hasCitations: Int - hasDownloads: Int - hasFunder: Boolean - hasOrganization: Boolean - hasParts: Int - hasVersions: Int - hasViews: Int - ids: [String!] - - """ - Returns the last _n_ elements from the list. - """ - last: Int - memberId: String - query: String - repositoryId: String - ): SoftwareConnection + id: ID! """ The type of the item. """ type: String! - - """ - The number of views according to the Counter Code of Practice. - """ - viewCount: Int - - """ - Authored works - """ - works( - affiliationId: String - - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - first: Int = 25 - hasCitations: Int - hasDownloads: Int - hasFunder: Boolean - hasOrganization: Boolean - hasParts: Int - hasVersions: Int - hasViews: Int - ids: [String!] - - """ - Returns the last _n_ elements from the list. - """ - last: Int - memberId: String - query: String - repositoryId: String - ): WorkConnection } """ -The connection type for Person. +The connection type for Prefix. """ -type PersonConnection { - datasetConnectionCount: Int! - +type PrefixConnection { """ A list of edges. """ - edges: [PersonEdge] + edges: [PrefixEdge] """ A list of nodes. """ - nodes: [Person] - organizationConnectionCount: Int! + nodes: [Prefix] """ Information to aid in pagination. """ pageInfo: PageInfo! - publicationConnectionCount: Int! - softwareConnectionCount: Int! + states: [Facet!]! totalCount: Int! + years: [Facet!]! } """ An edge in a connection. """ -type PersonEdge { +type PrefixEdge { """ A cursor for use in pagination. """ @@ -6747,10 +9918,10 @@ type PersonEdge { """ The item at the end of the edge. """ - node: Person + node: Prefix } -type PhysicalObject implements DoiItem { +type Preprint implements DoiItem { """ Metadata in bibtex format """ @@ -7150,84 +10321,35 @@ type PhysicalObject implements DoiItem { } """ -The connection type for PhysicalObject. -""" -type PhysicalObjectConnection { - """ - A list of edges. - """ - edges: [PhysicalObjectEdge] - - """ - A list of nodes. - """ - nodes: [PhysicalObject] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - totalCount: Int! - years: [Facet!] -} - -""" -An edge in a connection. -""" -type PhysicalObjectEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: PhysicalObject -} - -""" -Information about prefixes +The connection type for Preprint. """ -type Prefix { - """ - Unique identifier for each prefix - """ - id: ID! - - """ - The type of the item. - """ - type: String! -} +type PreprintConnection { + affiliations: [Facet!] -""" -The connection type for Prefix. -""" -type PrefixConnection { """ A list of edges. """ - edges: [PrefixEdge] + edges: [PreprintEdge] """ A list of nodes. """ - nodes: [Prefix] + nodes: [Preprint] """ Information to aid in pagination. """ pageInfo: PageInfo! - states: [Facet!]! + registrationAgencies: [Facet!] + repositories: [Facet!] totalCount: Int! - years: [Facet!]! + years: [Facet!] } """ An edge in a connection. """ -type PrefixEdge { +type PreprintEdge { """ A cursor for use in pagination. """ @@ -7236,7 +10358,7 @@ type PrefixEdge { """ The item at the end of the edge. """ - node: Prefix + node: Preprint } type Publication implements DoiItem { @@ -7642,6 +10764,7 @@ type Publication implements DoiItem { The connection type for Publication. """ type PublicationConnection { + affiliations: [Facet!] datasetConnectionCount: Int! """ @@ -7662,6 +10785,8 @@ type PublicationConnection { pageInfo: PageInfo! personConnectionCount: Int! publicationConnectionCount: Int! + registrationAgencies: [Facet!] + repositories: [Facet!] softwareConnectionCount: Int! totalCount: Int! years: [Facet!] @@ -7704,6 +10829,7 @@ type Query { hasPerson: Boolean hasVersions: Int hasViews: Int + ids: [String!] """ Returns the last _n_ elements from the list. @@ -7714,8 +10840,9 @@ type Query { repositoryId: String userId: String ): AudiovisualConnection! - collection(id: ID!): Collection! - collections( + book(id: ID!): Book! + bookChapter(id: ID!): BookChapter! + bookChapters( """ Returns the elements in the list that come after the specified cursor. """ @@ -7734,6 +10861,7 @@ type Query { hasPerson: Boolean hasVersions: Int hasViews: Int + ids: [String!] """ Returns the last _n_ elements from the list. @@ -7743,9 +10871,8 @@ type Query { query: String repositoryId: String userId: String - ): CollectionConnection! - dataCatalog(id: ID!): DataCatalog! - dataCatalogs( + ): BookChapterConnection! + books( """ Returns the elements in the list that come after the specified cursor. """ @@ -7756,15 +10883,27 @@ type Query { """ before: String first: Int = 25 + hasCitations: Int + hasDownloads: Int + hasFunder: Boolean + hasOrganization: Boolean + hasParts: Int + hasPerson: Boolean + hasVersions: Int + hasViews: Int + ids: [String!] """ Returns the last _n_ elements from the list. """ last: Int + memberId: String query: String - ): DataCatalogConnection! - dataPaper(id: ID!): DataPaper! - dataPapers( + repositoryId: String + userId: String + ): BookConnection! + collection(id: ID!): Collection! + collections( """ Returns the elements in the list that come after the specified cursor. """ @@ -7783,6 +10922,7 @@ type Query { hasPerson: Boolean hasVersions: Int hasViews: Int + ids: [String!] """ Returns the last _n_ elements from the list. @@ -7792,9 +10932,9 @@ type Query { query: String repositoryId: String userId: String - ): DataPaperConnection! - dataset(id: ID!): Dataset! - datasets( + ): CollectionConnection! + conferencePaper(id: ID!): ConferencePaper! + conferencePapers( """ Returns the elements in the list that come after the specified cursor. """ @@ -7813,6 +10953,7 @@ type Query { hasPerson: Boolean hasVersions: Int hasViews: Int + ids: [String!] """ Returns the last _n_ elements from the list. @@ -7822,9 +10963,9 @@ type Query { query: String repositoryId: String userId: String - ): DatasetConnection! - event(id: ID!): Event! - events( + ): ConferencePaperConnection! + dataCatalog(id: ID!): DataCatalog! + dataCatalogs( """ Returns the elements in the list that come after the specified cursor. """ @@ -7835,26 +10976,15 @@ type Query { """ before: String first: Int = 25 - hasCitations: Int - hasDownloads: Int - hasFunder: Boolean - hasOrganization: Boolean - hasParts: Int - hasPerson: Boolean - hasVersions: Int - hasViews: Int """ Returns the last _n_ elements from the list. """ last: Int - memberId: String query: String - repositoryId: String - userId: String - ): EventConnection! - funder(id: ID!): Funder! - funders( + ): DataCatalogConnection! + dataPaper(id: ID!): DataPaper! + dataPapers( """ Returns the elements in the list that come after the specified cursor. """ @@ -7865,15 +10995,27 @@ type Query { """ before: String first: Int = 25 + hasCitations: Int + hasDownloads: Int + hasFunder: Boolean + hasOrganization: Boolean + hasParts: Int + hasPerson: Boolean + hasVersions: Int + hasViews: Int + ids: [String!] """ Returns the last _n_ elements from the list. """ last: Int + memberId: String query: String - ): FunderConnection! - image(id: ID!): Image! - images( + repositoryId: String + userId: String + ): DataPaperConnection! + dataset(id: ID!): Dataset! + datasets( """ Returns the elements in the list that come after the specified cursor. """ @@ -7892,6 +11034,7 @@ type Query { hasPerson: Boolean hasVersions: Int hasViews: Int + ids: [String!] """ Returns the last _n_ elements from the list. @@ -7901,9 +11044,9 @@ type Query { query: String repositoryId: String userId: String - ): ImageConnection! - instrument(id: ID!): Other! - instruments( + ): DatasetConnection! + dissertation(id: ID!): Dissertation! + dissertations( """ Returns the elements in the list that come after the specified cursor. """ @@ -7922,6 +11065,7 @@ type Query { hasPerson: Boolean hasVersions: Int hasViews: Int + ids: [String!] """ Returns the last _n_ elements from the list. @@ -7931,9 +11075,9 @@ type Query { query: String repositoryId: String userId: String - ): InstrumentConnection! - interactiveResource(id: ID!): InteractiveResource! - interactiveResources( + ): DissertationConnection! + event(id: ID!): Event! + events( """ Returns the elements in the list that come after the specified cursor. """ @@ -7952,6 +11096,7 @@ type Query { hasPerson: Boolean hasVersions: Int hasViews: Int + ids: [String!] """ Returns the last _n_ elements from the list. @@ -7961,9 +11106,9 @@ type Query { query: String repositoryId: String userId: String - ): InteractiveResourceConnection! - member(id: ID!): Member! - members( + ): EventConnection! + funder(id: ID!): Funder! + funders( """ Returns the elements in the list that come after the specified cursor. """ @@ -7980,9 +11125,9 @@ type Query { """ last: Int query: String - ): MemberConnection! - model(id: ID!): Model! - models( + ): FunderConnection! + image(id: ID!): Image! + images( """ Returns the elements in the list that come after the specified cursor. """ @@ -8001,6 +11146,7 @@ type Query { hasPerson: Boolean hasVersions: Int hasViews: Int + ids: [String!] """ Returns the last _n_ elements from the list. @@ -8010,9 +11156,9 @@ type Query { query: String repositoryId: String userId: String - ): ModelConnection! - organization(id: ID!): Organization! - organizations( + ): ImageConnection! + instrument(id: ID!): Instrument! + instruments( """ Returns the elements in the list that come after the specified cursor. """ @@ -8022,20 +11168,59 @@ type Query { Returns the elements in the list that come before the specified cursor. """ before: String + first: Int = 25 + hasCitations: Int + hasDownloads: Int + hasFunder: Boolean + hasOrganization: Boolean + hasParts: Int + hasPerson: Boolean + hasVersions: Int + hasViews: Int + ids: [String!] """ - Returns the first _n_ elements from the list. + Returns the last _n_ elements from the list. """ - first: Int + last: Int + memberId: String + query: String + repositoryId: String + userId: String + ): InstrumentConnection! + interactiveResource(id: ID!): InteractiveResource! + interactiveResources( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + first: Int = 25 + hasCitations: Int + hasDownloads: Int + hasFunder: Boolean + hasOrganization: Boolean + hasParts: Int + hasPerson: Boolean + hasVersions: Int + hasViews: Int + ids: [String!] """ Returns the last _n_ elements from the list. """ last: Int + memberId: String query: String - ): OrganizationConnection! - other(id: ID!): Other! - others( + repositoryId: String + userId: String + ): InteractiveResourceConnection! + journalArticle(id: ID!): JournalArticle! + journalArticles( """ Returns the elements in the list that come after the specified cursor. """ @@ -8054,6 +11239,7 @@ type Query { hasPerson: Boolean hasVersions: Int hasViews: Int + ids: [String!] """ Returns the last _n_ elements from the list. @@ -8063,8 +11249,9 @@ type Query { query: String repositoryId: String userId: String - ): OtherConnection! - people( + ): JournalArticleConnection! + member(id: ID!): Member! + members( """ Returns the elements in the list that come after the specified cursor. """ @@ -8081,10 +11268,9 @@ type Query { """ last: Int query: String - ): PersonConnection! - person(id: ID!): Person! - physicalObject(id: ID!): PhysicalObject! - physicalObjects( + ): MemberConnection! + model(id: ID!): Model! + models( """ Returns the elements in the list that come after the specified cursor. """ @@ -8103,6 +11289,7 @@ type Query { hasPerson: Boolean hasVersions: Int hasViews: Int + ids: [String!] """ Returns the last _n_ elements from the list. @@ -8112,9 +11299,32 @@ type Query { query: String repositoryId: String userId: String - ): PhysicalObjectConnection! - prefix(id: ID!): Prefix! - prefixes( + ): ModelConnection! + organization(id: ID!): Organization! + organizations( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + query: String + ): OrganizationConnection! + other(id: ID!): Other! + others( """ Returns the elements in the list that come after the specified cursor. """ @@ -8125,15 +11335,27 @@ type Query { """ before: String first: Int = 25 + hasCitations: Int + hasDownloads: Int + hasFunder: Boolean + hasOrganization: Boolean + hasParts: Int + hasPerson: Boolean + hasVersions: Int + hasViews: Int + ids: [String!] """ Returns the last _n_ elements from the list. """ last: Int + memberId: String query: String - ): PrefixConnection! - publication(id: ID!): Publication! - publications( + repositoryId: String + userId: String + ): OtherConnection! + peerReview(id: ID!): PeerReview! + peerReviews( """ Returns the elements in the list that come after the specified cursor. """ @@ -8152,6 +11374,7 @@ type Query { hasPerson: Boolean hasVersions: Int hasViews: Int + ids: [String!] """ Returns the last _n_ elements from the list. @@ -8161,8 +11384,8 @@ type Query { query: String repositoryId: String userId: String - ): PublicationConnection! - repositories( + ): PeerReviewConnection! + people( """ Returns the elements in the list that come after the specified cursor. """ @@ -8179,12 +11402,10 @@ type Query { """ last: Int query: String - software: String - year: String - ): RepositoryConnection! - repository(id: ID!): Repository! - service(id: ID!): Service! - services( + ): PersonConnection! + person(id: ID!): Person! + physicalObject(id: ID!): PhysicalObject! + physicalObjects( """ Returns the elements in the list that come after the specified cursor. """ @@ -8203,6 +11424,7 @@ type Query { hasPerson: Boolean hasVersions: Int hasViews: Int + ids: [String!] """ Returns the last _n_ elements from the list. @@ -8212,9 +11434,9 @@ type Query { query: String repositoryId: String userId: String - ): ServiceConnection! - software(id: ID!): Software! - softwares( + ): PhysicalObjectConnection! + prefix(id: ID!): Prefix! + prefixes( """ Returns the elements in the list that come after the specified cursor. """ @@ -8225,26 +11447,15 @@ type Query { """ before: String first: Int = 25 - hasCitations: Int - hasDownloads: Int - hasFunder: Boolean - hasOrganization: Boolean - hasParts: Int - hasPerson: Boolean - hasVersions: Int - hasViews: Int """ Returns the last _n_ elements from the list. """ last: Int - memberId: String query: String - repositoryId: String - userId: String - ): SoftwareConnection! - sound(id: ID!): Sound! - sounds( + ): PrefixConnection! + preprint(id: ID!): Preprint! + preprints( """ Returns the elements in the list that come after the specified cursor. """ @@ -8263,6 +11474,7 @@ type Query { hasPerson: Boolean hasVersions: Int hasViews: Int + ids: [String!] """ Returns the last _n_ elements from the list. @@ -8272,8 +11484,9 @@ type Query { query: String repositoryId: String userId: String - ): SoundConnection! - theses( + ): PreprintConnection! + publication(id: ID!): Publication! + publications( """ Returns the elements in the list that come after the specified cursor. """ @@ -8292,6 +11505,7 @@ type Query { hasPerson: Boolean hasVersions: Int hasViews: Int + ids: [String!] """ Returns the last _n_ elements from the list. @@ -8301,10 +11515,8 @@ type Query { query: String repositoryId: String userId: String - ): ThesisConnection! - thesis(id: ID!): Publication! - usageReport(id: ID!): UsageReport! - usageReports( + ): PublicationConnection! + repositories( """ Returns the elements in the list that come after the specified cursor. """ @@ -8320,10 +11532,13 @@ type Query { Returns the last _n_ elements from the list. """ last: Int - ): UsageReportConnection! - work(id: ID!): Work! - workflow(id: ID!): Workflow! - workflows( + query: String + software: String + year: String + ): RepositoryConnection! + repository(id: ID!): Repository! + service(id: ID!): Service! + services( """ Returns the elements in the list that come after the specified cursor. """ @@ -8342,6 +11557,7 @@ type Query { hasPerson: Boolean hasVersions: Int hasViews: Int + ids: [String!] """ Returns the last _n_ elements from the list. @@ -8351,8 +11567,9 @@ type Query { query: String repositoryId: String userId: String - ): WorkflowConnection! - works( + ): ServiceConnection! + software(id: ID!): Software! + softwares( """ Returns the elements in the list that come after the specified cursor. """ @@ -8380,96 +11597,10 @@ type Query { memberId: String query: String repositoryId: String - resourceTypeId: String userId: String - ): WorkConnection! -} - -""" -Information about related identifiers -""" -type RelatedIdentifier { - """ - Related identifier - """ - relatedIdentifier: String - - """ - Related identifier type - """ - relatedIdentifierType: String - - """ - Related metadata scheme - """ - relatedMetadataScheme: String - - """ - Relation type - """ - relationType: String - - """ - Resource type general - """ - resourceTypeGeneral: String - - """ - Scheme type - """ - schemeType: String - - """ - Scheme URI - """ - schemeUri: String -} - -""" -Information about reporting periods -""" -type ReportingPeriod { - """ - Begin reporting period - """ - beginDate: String - - """ - End reporting period - """ - endDate: String -} - -""" -Information about repositories -""" -type Repository { - """ - Repository alternate name - """ - alternateName: String - - """ - The certificate(s) for the repository - """ - certificate: [String!] - - """ - The number of citations. - """ - citationCount: Int - - """ - The client type (repository or periodical) - """ - clientType: String - - """ - Datasets managed by the repository - """ - datasets( - affiliationId: String - + ): SoftwareConnection! + sound(id: ID!): Sound! + sounds( """ Returns the elements in the list that come after the specified cursor. """ @@ -8480,7 +11611,6 @@ type Repository { """ before: String first: Int = 25 - funderId: String hasCitations: Int hasDownloads: Int hasFunder: Boolean @@ -8489,7 +11619,7 @@ type Repository { hasPerson: Boolean hasVersions: Int hasViews: Int - ids: String + ids: [String!] """ Returns the last _n_ elements from the list. @@ -8497,70 +11627,11 @@ type Repository { last: Int memberId: String query: String - resourceTypeId: String + repositoryId: String userId: String - ): DatasetConnection - - """ - Description of the repository - """ - description: String - - """ - The number of downloads according to the Counter Code of Practice. - """ - downloadCount: Int - - """ - Unique identifier for each repository - """ - id: ID! - - """ - The ISSN - """ - issn: Issn - - """ - The langauge of the repository - """ - language: [String!] - - """ - Repository name - """ - name: String! - - """ - Prefixes managed by the repository - """ - prefixes( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - first: Int = 25 - - """ - Returns the last _n_ elements from the list. - """ - last: Int - query: String - state: String - year: String - ): RepositoryPrefixConnection - - """ - Publications managed by the repository - """ - publications( - affiliationId: String - + ): SoundConnection! + usageReport(id: ID!): UsageReport! + usageReports( """ Returns the elements in the list that come after the specified cursor. """ @@ -8571,48 +11642,15 @@ type Repository { """ before: String first: Int = 25 - funderId: String - hasCitations: Int - hasDownloads: Int - hasFunder: Boolean - hasOrganization: Boolean - hasParts: Int - hasPerson: Boolean - hasVersions: Int - hasViews: Int - ids: String """ Returns the last _n_ elements from the list. """ last: Int - memberId: String - query: String - resourceTypeId: String - userId: String - ): PublicationConnection - - """ - The re3data identifier for the repository - """ - re3data: ID - - """ - The repository type(s) - """ - repositoryType: [String!] - - """ - The name of the software that is used to run the repository - """ - software: String - - """ - Software managed by the repository - """ - softwares( - affiliationId: String - + ): UsageReportConnection! + work(id: ID!): Work! + workflow(id: ID!): Workflow! + workflows( """ Returns the elements in the list that come after the specified cursor. """ @@ -8623,7 +11661,6 @@ type Repository { """ before: String first: Int = 25 - funderId: String hasCitations: Int hasDownloads: Int hasFunder: Boolean @@ -8632,7 +11669,7 @@ type Repository { hasPerson: Boolean hasVersions: Int hasViews: Int - ids: String + ids: [String!] """ Returns the last _n_ elements from the list. @@ -8640,31 +11677,10 @@ type Repository { last: Int memberId: String query: String - resourceTypeId: String + repositoryId: String userId: String - ): SoftwareConnection - - """ - The type of the item. - """ - type: String! - - """ - The homepage of the repository - """ - url: Url - - """ - The number of views according to the Counter Code of Practice. - """ - viewCount: Int - - """ - Works managed by the repository - """ + ): WorkflowConnection! works( - affiliationId: String - """ Returns the elements in the list that come after the specified cursor. """ @@ -8675,7 +11691,6 @@ type Repository { """ before: String first: Int = 25 - funderId: String hasCitations: Int hasDownloads: Int hasFunder: Boolean @@ -8684,7 +11699,7 @@ type Repository { hasPerson: Boolean hasVersions: Int hasViews: Int - ids: String + ids: [String!] """ Returns the last _n_ elements from the list. @@ -8692,176 +11707,95 @@ type Repository { last: Int memberId: String query: String + repositoryId: String resourceTypeId: String userId: String - ): WorkConnection -} - -""" -The connection type for Repository. -""" -type RepositoryConnection { - """ - A list of edges. - """ - edges: [RepositoryEdge] - - """ - A list of nodes. - """ - nodes: [Repository] - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - software: [Facet!] - totalCount: Int - years: [Facet!] -} - -""" -An edge in a connection. -""" -type RepositoryEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: Repository + ): WorkConnection! } """ -Information about repository prefixes +Information about related identifiers """ -type RepositoryPrefix { - """ - Unique identifier for each repository prefix - """ - id: ID! - +type RelatedIdentifier { """ - Repository prefix name + Related identifier """ - name: String! + relatedIdentifier: String """ - The type of the item. + Related identifier type """ - type: String! -} + relatedIdentifierType: String -""" -The connection type for RepositoryPrefix. -""" -type RepositoryPrefixConnection { """ - A list of edges. + Related metadata scheme """ - edges: [RepositoryPrefixEdge] + relatedMetadataScheme: String """ - A list of nodes. + Relation type """ - nodes: [RepositoryPrefix] + relationType: String """ - Information to aid in pagination. + Resource type general """ - pageInfo: PageInfo! - totalCount: Int! - years: [Facet!]! -} + resourceTypeGeneral: String -""" -An edge in a connection. -""" -type RepositoryPrefixEdge { """ - A cursor for use in pagination. + Scheme type """ - cursor: String! + schemeType: String """ - The item at the end of the edge. + Scheme URI """ - node: RepositoryPrefix + schemeUri: String } """ -Information about types +Information about reporting periods """ -type ResourceType { - """ - BibTex - """ - bibtex: String - - """ - Citeproc - """ - citeproc: String - - """ - Resource type - """ - resourceType: String - - """ - Resource type general - """ - resourceTypeGeneral: String - +type ReportingPeriod { """ - RIS + Begin reporting period """ - ris: String + beginDate: String """ - Schema.org + End reporting period """ - schemaOrg: String + endDate: String } """ -Information about rights +Information about repositories """ -type Rights { - """ - Language - """ - lang: String - +type Repository { """ - Any rights information for this resource + Repository alternate name """ - rights: String + alternateName: String """ - The URI of the license + The certificate(s) for the repository """ - rightsUri: String -} + certificate: [String!] -type Service implements DoiItem { """ - Metadata in bibtex format + The number of citations. """ - bibtex: String + citationCount: Int """ - Total number of citations + The client type (repository or periodical) """ - citationCount: Int + clientType: String """ - Citations for this DOI. + Datasets managed by the repository """ - citations( + datasets( affiliationId: String """ @@ -8883,7 +11817,7 @@ type Service implements DoiItem { hasPerson: Boolean hasVersions: Int hasViews: Int - ids: [String!] + ids: String """ Returns the last _n_ elements from the list. @@ -8891,84 +11825,68 @@ type Service implements DoiItem { last: Int memberId: String query: String - repositoryId: String - userId: String - ): WorkConnection - - """ - Citations by year - """ - citationsOverTime: [YearTotal!] - - """ - The main researchers involved in producing the data, or the authors of the publication, in priority order - """ - creators(first: Int = 20): [Creator!] - - """ - Different dates relevant to the work - """ - dates: [Date!] - - """ - All additional information that does not fit in any of the other categories - """ - descriptions(first: Int = 5): [Description!] - - """ - Total number of downloads - """ - downloadCount: Int - - """ - Downloads by month - """ - downloadsOverTime: [YearMonthTotal!] - - """ - Technical format of the resource - """ - formats: [String!] + resourceTypeId: String + userId: String + ): DatasetConnection """ - Metadata as formatted citation + Description of the repository """ - formattedCitation(locale: String = "en-US", style: String = "apa"): String + description: String """ - Information about financial support (funding) for the resource being registered + The number of downloads according to the Counter Code of Practice. """ - fundingReferences: [Funding!] + downloadCount: Int """ - The persistent identifier for the resource + Unique identifier for each repository """ id: ID! """ - An identifier or identifiers applied to the resource being registered + The ISSN """ - identifiers: [Identifier!] + issn: Issn """ - The primary language of the resource + The langauge of the repository """ - language: String + language: [String!] """ - The member account managing this resource + Repository name """ - member: Member + name: String! """ - Total number of parts + Prefixes managed by the repository """ - partCount: Int + prefixes( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + first: Int = 25 + + """ + Returns the last _n_ elements from the list. + """ + last: Int + query: String + state: String + year: String + ): RepositoryPrefixConnection """ - The DOI is a part of this DOI. + Publications managed by the repository """ - partOf( + publications( affiliationId: String """ @@ -8990,7 +11908,7 @@ type Service implements DoiItem { hasPerson: Boolean hasVersions: Int hasViews: Int - ids: [String!] + ids: String """ Returns the last _n_ elements from the list. @@ -8998,19 +11916,29 @@ type Service implements DoiItem { last: Int memberId: String query: String - repositoryId: String + resourceTypeId: String userId: String - ): WorkConnection + ): PublicationConnection """ - Total number of DOIs the resource is a part of + The re3data identifier for the repository """ - partOfCount: Int + re3data: ID """ - Parts of this DOI. + The repository type(s) """ - parts( + repositoryType: [String!] + + """ + The name of the software that is used to run the repository + """ + software: String + + """ + Software managed by the repository + """ + softwares( affiliationId: String """ @@ -9032,7 +11960,7 @@ type Service implements DoiItem { hasPerson: Boolean hasVersions: Int hasViews: Int - ids: [String!] + ids: String """ Returns the last _n_ elements from the list. @@ -9040,29 +11968,29 @@ type Service implements DoiItem { last: Int memberId: String query: String - repositoryId: String + resourceTypeId: String userId: String - ): WorkConnection + ): SoftwareConnection """ - The year when the data was or will be made publicly available + The type of the item. """ - publicationYear: Int + type: String! """ - The name of the entity that holds, archives, publishes prints, distributes, releases, issues, or produces the resource + The homepage of the repository """ - publisher: String + url: Url """ - Total number of references + The number of views according to the Counter Code of Practice. """ - referenceCount: Int + viewCount: Int """ - References for this DOI + Works managed by the repository """ - references( + works( affiliationId: String """ @@ -9084,7 +12012,7 @@ type Service implements DoiItem { hasPerson: Boolean hasVersions: Int hasViews: Int - ids: [String!] + ids: String """ Returns the last _n_ elements from the list. @@ -9092,198 +12020,162 @@ type Service implements DoiItem { last: Int memberId: String query: String - repositoryId: String + resourceTypeId: String userId: String ): WorkConnection +} +""" +The connection type for Repository. +""" +type RepositoryConnection { """ - The DOI registration agency for the resource + A list of edges. """ - registrationAgency: String + edges: [RepositoryEdge] """ - Identifiers of related resources. These must be globally unique identifiers + A list of nodes. """ - relatedIdentifiers: [RelatedIdentifier!] + nodes: [Repository] """ - The repository account managing this resource + Information to aid in pagination. """ - repository: Repository + pageInfo: PageInfo! + software: [Facet!] + totalCount: Int + years: [Facet!] +} +""" +An edge in a connection. +""" +type RepositoryEdge { """ - Any rights information for this resource + A cursor for use in pagination. """ - rights: [Rights!] + cursor: String! """ - Size (e.g. bytes, pages, inches, etc.) or duration (extent), e.g. hours, minutes, days, etc., of a resource + The item at the end of the edge. """ - sizes: [String!] + node: Repository +} +""" +Information about repository prefixes +""" +type RepositoryPrefix { """ - Subject, keyword, classification code, or key phrase describing the resource + Unique identifier for each repository prefix """ - subjects: [Subject!] + id: ID! """ - A name or title by which a resource is known + Repository prefix name """ - titles(first: Int = 5): [Title!] + name: String! """ The type of the item. """ type: String! +} +""" +The connection type for RepositoryPrefix. +""" +type RepositoryPrefixConnection { """ - The resource type - """ - types: ResourceType! - - """ - The URL registered for the resource - """ - url: Url - - """ - The version number of the resource - """ - version: String - - """ - Total number of versions - """ - versionCount: Int - - """ - The DOI is a version of this DOI. + A list of edges. """ - versionOf( - affiliationId: String - - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - first: Int = 25 - funderId: String - hasCitations: Int - hasDownloads: Int - hasFunder: Boolean - hasOrganization: Boolean - hasParts: Int - hasPerson: Boolean - hasVersions: Int - hasViews: Int - ids: [String!] - - """ - Returns the last _n_ elements from the list. - """ - last: Int - memberId: String - query: String - repositoryId: String - userId: String - ): WorkConnection + edges: [RepositoryPrefixEdge] """ - Total number of DOIs the resource is a version of + A list of nodes. """ - versionOfCount: Int + nodes: [RepositoryPrefix] """ - Versions of this DOI. + Information to aid in pagination. """ - versions( - affiliationId: String - - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - first: Int = 25 - funderId: String - hasCitations: Int - hasDownloads: Int - hasFunder: Boolean - hasOrganization: Boolean - hasParts: Int - hasPerson: Boolean - hasVersions: Int - hasViews: Int - ids: [String!] - - """ - Returns the last _n_ elements from the list. - """ - last: Int - memberId: String - query: String - repositoryId: String - userId: String - ): WorkConnection + pageInfo: PageInfo! + totalCount: Int! + years: [Facet!]! +} +""" +An edge in a connection. +""" +type RepositoryPrefixEdge { """ - Total number of views + A cursor for use in pagination. """ - viewCount: Int + cursor: String! """ - Views by month + The item at the end of the edge. """ - viewsOverTime: [YearMonthTotal!] + node: RepositoryPrefix } """ -The connection type for Service. +Information about types """ -type ServiceConnection { +type ResourceType { """ - A list of edges. + BibTex """ - edges: [ServiceEdge] + bibtex: String """ - A list of nodes. + Citeproc """ - nodes: [Service] + citeproc: String """ - Information to aid in pagination. + Resource type """ - pageInfo: PageInfo! - totalCount: Int! - years: [Facet!] + resourceType: String + + """ + Resource type general + """ + resourceTypeGeneral: String + + """ + RIS + """ + ris: String + + """ + Schema.org + """ + schemaOrg: String } """ -An edge in a connection. +Information about rights """ -type ServiceEdge { +type Rights { """ - A cursor for use in pagination. + Language """ - cursor: String! + lang: String """ - The item at the end of the edge. + Any rights information for this resource """ - node: Service + rights: String + + """ + The URI of the license + """ + rightsUri: String } -type Software implements DoiItem { +type Service implements DoiItem { """ Metadata in bibtex format """ @@ -9683,55 +12575,27 @@ type Software implements DoiItem { } """ -A software application. -""" -type SoftwareApplication { - """ - A description of the item. - """ - description: String - - """ - The name of the item. - """ - name: String - - """ - Version of the software instance. - """ - softwareVersion: String - - """ - URL of the item. - """ - url: String -} - -""" -The connection type for Software. +The connection type for Service. """ -type SoftwareConnection { - datasetConnectionCount: Int! +type ServiceConnection { + affiliations: [Facet!] """ A list of edges. """ - edges: [SoftwareEdge] - funderConnectionCount: Int! + edges: [ServiceEdge] """ A list of nodes. """ - nodes: [Software] - organizationConnectionCount: Int! + nodes: [Service] """ Information to aid in pagination. """ pageInfo: PageInfo! - personConnectionCount: Int! - publicationConnectionCount: Int! - softwareConnectionCount: Int! + registrationAgencies: [Facet!] + repositories: [Facet!] totalCount: Int! years: [Facet!] } @@ -9739,7 +12603,7 @@ type SoftwareConnection { """ An edge in a connection. """ -type SoftwareEdge { +type ServiceEdge { """ A cursor for use in pagination. """ @@ -9748,10 +12612,10 @@ type SoftwareEdge { """ The item at the end of the edge. """ - node: Software + node: Service } -type Sound implements DoiItem { +type Software implements DoiItem { """ Metadata in bibtex format """ @@ -10151,98 +13015,78 @@ type Sound implements DoiItem { } """ -The connection type for Sound. +A software application. """ -type SoundConnection { - """ - A list of edges. - """ - edges: [SoundEdge] - +type SoftwareApplication { """ - A list of nodes. + A description of the item. """ - nodes: [Sound] + description: String """ - Information to aid in pagination. + The name of the item. """ - pageInfo: PageInfo! - totalCount: Int! - years: [Facet!] -} + name: String -""" -An edge in a connection. -""" -type SoundEdge { """ - A cursor for use in pagination. + Version of the software instance. """ - cursor: String! + softwareVersion: String """ - The item at the end of the edge. + URL of the item. """ - node: Sound + url: String } """ -Subject information +The connection type for Software. """ -type Subject { - """ - Language - """ - lang: ID - - """ - The URI of the subject identifier scheme - """ - schemeUri: String - - """ - Subject, keyword, classification code, or key phrase describing the resource - """ - subject: String +type SoftwareConnection { + affiliations: [Facet!] + datasetConnectionCount: Int! """ - The name of the subject scheme or classification code or authority if one is used + A list of edges. """ - subjectScheme: String + edges: [SoftwareEdge] + funderConnectionCount: Int! """ - The URI of the subject term + A list of nodes. """ - valueUri: String -} + nodes: [Software] + organizationConnectionCount: Int! -""" -Information -""" -type Text { """ - Information + Information to aid in pagination. """ - text: String! + pageInfo: PageInfo! + personConnectionCount: Int! + publicationConnectionCount: Int! + registrationAgencies: [Facet!] + repositories: [Facet!] + softwareConnectionCount: Int! + totalCount: Int! + years: [Facet!] } """ -Information +An edge in a connection. """ -type TextRestriction { +type SoftwareEdge { """ - Restriction + A cursor for use in pagination. """ - restriction: [Text!] + cursor: String! """ - Information + The item at the end of the edge. """ - text: String! + node: Software } -type Thesis implements DoiItem { +type Sound implements DoiItem { """ Metadata in bibtex format """ @@ -10642,23 +13486,27 @@ type Thesis implements DoiItem { } """ -The connection type for Thesis. +The connection type for Sound. """ -type ThesisConnection { +type SoundConnection { + affiliations: [Facet!] + """ A list of edges. """ - edges: [ThesisEdge] + edges: [SoundEdge] """ A list of nodes. """ - nodes: [Thesis] + nodes: [Sound] """ Information to aid in pagination. """ pageInfo: PageInfo! + registrationAgencies: [Facet!] + repositories: [Facet!] totalCount: Int! years: [Facet!] } @@ -10666,7 +13514,7 @@ type ThesisConnection { """ An edge in a connection. """ -type ThesisEdge { +type SoundEdge { """ A cursor for use in pagination. """ @@ -10675,7 +13523,62 @@ type ThesisEdge { """ The item at the end of the edge. """ - node: Thesis + node: Sound +} + +""" +Subject information +""" +type Subject { + """ + Language + """ + lang: ID + + """ + The URI of the subject identifier scheme + """ + schemeUri: String + + """ + Subject, keyword, classification code, or key phrase describing the resource + """ + subject: String + + """ + The name of the subject scheme or classification code or authority if one is used + """ + subjectScheme: String + + """ + The URI of the subject term + """ + valueUri: String +} + +""" +Information +""" +type Text { + """ + Information + """ + text: String! +} + +""" +Information +""" +type TextRestriction { + """ + Restriction + """ + restriction: [Text!] + + """ + Information + """ + text: String! } """ @@ -11209,6 +14112,8 @@ type Work implements DoiItem { The connection type for Work. """ type WorkConnection { + affiliations: [Facet!] + """ A list of edges. """ @@ -11223,6 +14128,8 @@ type WorkConnection { Information to aid in pagination. """ pageInfo: PageInfo! + registrationAgencies: [Facet!] + repositories: [Facet!] resourceTypes: [Facet!] totalCount: Int! years: [Facet!] @@ -11646,6 +14553,8 @@ type Workflow implements DoiItem { The connection type for Workflow. """ type WorkflowConnection { + affiliations: [Facet!] + """ A list of edges. """ @@ -11660,6 +14569,8 @@ type WorkflowConnection { Information to aid in pagination. """ pageInfo: PageInfo! + registrationAgencies: [Facet!] + repositories: [Facet!] totalCount: Int! years: [Facet!] } diff --git a/app/graphql/types/audiovisual_connection_type.rb b/app/graphql/types/audiovisual_connection_type.rb index 9ce8cbf16..b56ef951e 100644 --- a/app/graphql/types/audiovisual_connection_type.rb +++ b/app/graphql/types/audiovisual_connection_type.rb @@ -6,6 +6,9 @@ class AudiovisualConnectionType < BaseConnection field :total_count, Integer, null: false, cache: true field :years, [FacetType], null: true, cache: true + field :registration_agencies, [FacetType], null: true, cache: true + field :repositories, [FacetType], null: true, cache: true + field :affiliations, [FacetType], null: true, cache: true def total_count args = prepare_args(object.arguments) @@ -20,6 +23,27 @@ def years res.results.total.positive? ? facet_by_year(res.response.aggregations.years.buckets) : [] end + def registration_agencies + args = prepare_args(object.arguments) + + res = response(args) + res.results.total.positive? ? facet_by_software(res.response.aggregations.registration_agencies.buckets) : [] + end + + def repositories + args = prepare_args(object.arguments) + + res = response(args) + res.results.total.positive? ? facet_by_client(res.response.aggregations.clients.buckets) : [] + end + + def affiliations + args = prepare_args(object.arguments) + + res = response(args) + res.results.total.positive? ? facet_by_affiliation(res.response.aggregations.affiliations.buckets) : [] + end + def response(**args) Doi.query(args[:query], ids: args[:ids], diff --git a/app/graphql/types/base_connection.rb b/app/graphql/types/base_connection.rb index 51aaf8f41..3a4cf0e21 100644 --- a/app/graphql/types/base_connection.rb +++ b/app/graphql/types/base_connection.rb @@ -56,4 +56,30 @@ def facet_by_software(arr) "count" => hsh["doc_count"] } end end + + def facet_by_affiliation(arr) + # generate hash with id and name for each affiliation in facet + return [] if arr.blank? + + ids = arr.map { |hsh| "\"#{hsh["key"]}\"" }.join(" ") + affiliations = Organization.query(ids, size: 1000)[:data] || [] + + arr.map do |hsh| + { "id" => hsh["key"], + "title" => affiliations.find { |a| a["id"] == hsh["key"] }.to_h["name"] || hsh["key"], + "count" => hsh["doc_count"] } + end + end + + def facet_by_client(arr) + # generate hash with id and name for each client in facet + ids = arr.map { |hsh| hsh["key"] }.join(",") + clients = Client.find_by_id(ids).records.pluck(:symbol, :name).to_h + + arr.map do |hsh| + { "id" => hsh["key"], + "title" => clients[hsh["key"].upcase], + "count" => hsh["doc_count"] } + end + end end diff --git a/app/graphql/types/book_chapter_connection_type.rb b/app/graphql/types/book_chapter_connection_type.rb new file mode 100644 index 000000000..ea4db1d5c --- /dev/null +++ b/app/graphql/types/book_chapter_connection_type.rb @@ -0,0 +1,69 @@ +# frozen_string_literal: true + +class BookChapterConnectionType < BaseConnection + edge_type(BookChapterEdgeType) + field_class GraphQL::Cache::Field + + field :total_count, Integer, null: false, cache: true + field :years, [FacetType], null: true, cache: true + field :registration_agencies, [FacetType], null: true, cache: true + field :repositories, [FacetType], null: true, cache: true + field :affiliations, [FacetType], null: true, cache: true + + def total_count + args = prepare_args(object.arguments) + + response(args).results.total + end + + def years + args = prepare_args(object.arguments) + + res = response(args) + res.results.total.positive? ? facet_by_year(res.response.aggregations.years.buckets) : [] + end + + def registration_agencies + args = prepare_args(object.arguments) + + res = response(args) + res.results.total.positive? ? facet_by_software(res.response.aggregations.registration_agencies.buckets) : [] + end + + def repositories + args = prepare_args(object.arguments) + + res = response(args) + res.results.total.positive? ? facet_by_client(res.response.aggregations.clients.buckets) : [] + end + + def affiliations + args = prepare_args(object.arguments) + + res = response(args) + res.results.total.positive? ? facet_by_affiliation(res.response.aggregations.affiliations.buckets) : [] + end + + def response(**args) + 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: "BookChapter", + 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/book_chapter_edge_type.rb b/app/graphql/types/book_chapter_edge_type.rb new file mode 100644 index 000000000..681a6b0ad --- /dev/null +++ b/app/graphql/types/book_chapter_edge_type.rb @@ -0,0 +1,5 @@ +# frozen_string_literal: true + +class BookChapterEdgeType < GraphQL::Types::Relay::BaseEdge + node_type(BookChapterType) +end diff --git a/app/graphql/types/book_chapter_type.rb b/app/graphql/types/book_chapter_type.rb new file mode 100644 index 000000000..7bed12175 --- /dev/null +++ b/app/graphql/types/book_chapter_type.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +class BookChapterType < BaseObject + implements DoiItem + + def type + "BookChapter" + end +end diff --git a/app/graphql/types/thesis_connection_type.rb b/app/graphql/types/book_connection_type.rb similarity index 59% rename from app/graphql/types/thesis_connection_type.rb rename to app/graphql/types/book_connection_type.rb index 5b554fc80..d6ad5aea8 100644 --- a/app/graphql/types/thesis_connection_type.rb +++ b/app/graphql/types/book_connection_type.rb @@ -1,11 +1,14 @@ # frozen_string_literal: true -class ThesisConnectionType < BaseConnection - edge_type(ThesisEdgeType) +class BookConnectionType < BaseConnection + edge_type(BookEdgeType) field_class GraphQL::Cache::Field field :total_count, Integer, null: false, cache: true field :years, [FacetType], null: true, cache: true + field :registration_agencies, [FacetType], null: true, cache: true + field :repositories, [FacetType], null: true, cache: true + field :affiliations, [FacetType], null: true, cache: true def total_count args = prepare_args(object.arguments) @@ -20,6 +23,27 @@ def years res.results.total.positive? ? facet_by_year(res.response.aggregations.years.buckets) : [] end + def registration_agencies + args = prepare_args(object.arguments) + + res = response(args) + res.results.total.positive? ? facet_by_software(res.response.aggregations.registration_agencies.buckets) : [] + end + + def repositories + args = prepare_args(object.arguments) + + res = response(args) + res.results.total.positive? ? facet_by_client(res.response.aggregations.clients.buckets) : [] + end + + def affiliations + args = prepare_args(object.arguments) + + res = response(args) + res.results.total.positive? ? facet_by_affiliation(res.response.aggregations.affiliations.buckets) : [] + end + def response(**args) Doi.query(args[:query], ids: args[:ids], @@ -31,7 +55,7 @@ def response(**args) re3data_id: args[:re3data_id], year: args[:year], resource_type_id: "Text", - resource_type: "Thesis", + resource_type: "Book", has_person: args[:has_person], has_funder: args[:has_funder], has_organization: args[:has_organization], diff --git a/app/graphql/types/book_edge_type.rb b/app/graphql/types/book_edge_type.rb new file mode 100644 index 000000000..2b227673d --- /dev/null +++ b/app/graphql/types/book_edge_type.rb @@ -0,0 +1,5 @@ +# frozen_string_literal: true + +class BookEdgeType < GraphQL::Types::Relay::BaseEdge + node_type(BookType) +end diff --git a/app/graphql/types/book_type.rb b/app/graphql/types/book_type.rb new file mode 100644 index 000000000..8bf07795c --- /dev/null +++ b/app/graphql/types/book_type.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +class BookType < BaseObject + implements DoiItem + + def type + "Book" + end +end diff --git a/app/graphql/types/collection_connection_type.rb b/app/graphql/types/collection_connection_type.rb index dfe717856..f03268d45 100644 --- a/app/graphql/types/collection_connection_type.rb +++ b/app/graphql/types/collection_connection_type.rb @@ -6,6 +6,8 @@ class CollectionConnectionType < BaseConnection field :total_count, Integer, null: false, cache: true field :years, [FacetType], null: true, cache: true + field :repositories, [FacetType], null: true, cache: true + field :affiliations, [FacetType], null: true, cache: true def total_count args = prepare_args(object.arguments) @@ -20,6 +22,27 @@ def years res.results.total.positive? ? facet_by_year(res.response.aggregations.years.buckets) : [] end + def registration_agencies + args = prepare_args(object.arguments) + + res = response(args) + res.results.total.positive? ? facet_by_software(res.response.aggregations.registration_agencies.buckets) : [] + end + + def repositories + args = prepare_args(object.arguments) + + res = response(args) + res.results.total.positive? ? facet_by_client(res.response.aggregations.clients.buckets) : [] + end + + def affiliations + args = prepare_args(object.arguments) + + res = response(args) + res.results.total.positive? ? facet_by_affiliation(res.response.aggregations.affiliations.buckets) : [] + end + def response(**args) Doi.query(args[:query], ids: args[:ids], diff --git a/app/graphql/types/conference_paper_connection_type.rb b/app/graphql/types/conference_paper_connection_type.rb new file mode 100644 index 000000000..89636a895 --- /dev/null +++ b/app/graphql/types/conference_paper_connection_type.rb @@ -0,0 +1,69 @@ +# frozen_string_literal: true + +class ConferencePaperConnectionType < BaseConnection + edge_type(ConferencePaperEdgeType) + field_class GraphQL::Cache::Field + + field :total_count, Integer, null: false, cache: true + field :years, [FacetType], null: true, cache: true + field :registration_agencies, [FacetType], null: true, cache: true + field :repositories, [FacetType], null: true, cache: true + field :affiliations, [FacetType], null: true, cache: true + + def total_count + args = prepare_args(object.arguments) + + response(args).results.total + end + + def years + args = prepare_args(object.arguments) + + res = response(args) + res.results.total.positive? ? facet_by_year(res.response.aggregations.years.buckets) : [] + end + + def registration_agencies + args = prepare_args(object.arguments) + + res = response(args) + res.results.total.positive? ? facet_by_software(res.response.aggregations.registration_agencies.buckets) : [] + end + + def repositories + args = prepare_args(object.arguments) + + res = response(args) + res.results.total.positive? ? facet_by_client(res.response.aggregations.clients.buckets) : [] + end + + def affiliations + args = prepare_args(object.arguments) + + res = response(args) + res.results.total.positive? ? facet_by_affiliation(res.response.aggregations.affiliations.buckets) : [] + end + + def response(**args) + 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: "\"Conference paper\"", + 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/conference_paper_edge_type.rb b/app/graphql/types/conference_paper_edge_type.rb new file mode 100644 index 000000000..48bc64b97 --- /dev/null +++ b/app/graphql/types/conference_paper_edge_type.rb @@ -0,0 +1,5 @@ +# frozen_string_literal: true + +class ConferencePaperEdgeType < GraphQL::Types::Relay::BaseEdge + node_type(ConferencePaperType) +end diff --git a/app/graphql/types/conference_paper_type.rb b/app/graphql/types/conference_paper_type.rb new file mode 100644 index 000000000..baa3f4f14 --- /dev/null +++ b/app/graphql/types/conference_paper_type.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +class ConferencePaperType < BaseObject + implements DoiItem + + def type + "ConferencePaper" + end +end diff --git a/app/graphql/types/data_paper_connection_type.rb b/app/graphql/types/data_paper_connection_type.rb index 59a1071a5..928f2f12c 100644 --- a/app/graphql/types/data_paper_connection_type.rb +++ b/app/graphql/types/data_paper_connection_type.rb @@ -6,6 +6,9 @@ class DataPaperConnectionType < BaseConnection field :total_count, Integer, null: false, cache: true field :years, [FacetType], null: true, cache: true + field :registration_agencies, [FacetType], null: true, cache: true + field :repositories, [FacetType], null: true, cache: true + field :affiliations, [FacetType], null: true, cache: true def total_count args = prepare_args(object.arguments) @@ -20,6 +23,27 @@ def years res.results.total.positive? ? facet_by_year(res.response.aggregations.years.buckets) : [] end + def registration_agencies + args = prepare_args(object.arguments) + + res = response(args) + res.results.total.positive? ? facet_by_software(res.response.aggregations.registration_agencies.buckets) : [] + end + + def repositories + args = prepare_args(object.arguments) + + res = response(args) + res.results.total.positive? ? facet_by_client(res.response.aggregations.clients.buckets) : [] + end + + def affiliations + args = prepare_args(object.arguments) + + res = response(args) + res.results.total.positive? ? facet_by_affiliation(res.response.aggregations.affiliations.buckets) : [] + end + def response(**args) Doi.query(args[:query], ids: args[:ids], diff --git a/app/graphql/types/dataset_connection_type.rb b/app/graphql/types/dataset_connection_type.rb index c2ec65f9a..e9cdebcfe 100644 --- a/app/graphql/types/dataset_connection_type.rb +++ b/app/graphql/types/dataset_connection_type.rb @@ -6,6 +6,10 @@ class DatasetConnectionType < BaseConnection field :total_count, Integer, null: false, cache: true field :years, [FacetType], null: true, cache: true + field :registration_agencies, [FacetType], null: true, cache: true + field :repositories, [FacetType], null: true, cache: true + field :affiliations, [FacetType], null: true, cache: true + field :dataset_connection_count, Integer, null: false, cache: true field :publication_connection_count, Integer, null: false, cache: true field :software_connection_count, Integer, null: false, cache: true @@ -26,6 +30,27 @@ def years res.results.total.positive? ? facet_by_year(res.response.aggregations.years.buckets) : [] end + def registration_agencies + args = prepare_args(object.arguments) + + res = response(args) + res.results.total.positive? ? facet_by_software(res.response.aggregations.registration_agencies.buckets) : [] + end + + def repositories + args = prepare_args(object.arguments) + + res = response(args) + res.results.total.positive? ? facet_by_client(res.response.aggregations.clients.buckets) : [] + end + + def affiliations + args = prepare_args(object.arguments) + + res = response(args) + res.results.total.positive? ? facet_by_affiliation(res.response.aggregations.affiliations.buckets) : [] + end + def response(**args) Doi.query(args[:query], ids: args[:ids], diff --git a/app/graphql/types/dissertation_connection_type.rb b/app/graphql/types/dissertation_connection_type.rb new file mode 100644 index 000000000..0e587c2af --- /dev/null +++ b/app/graphql/types/dissertation_connection_type.rb @@ -0,0 +1,69 @@ +# frozen_string_literal: true + +class DissertationConnectionType < BaseConnection + edge_type(DissertationEdgeType) + field_class GraphQL::Cache::Field + + field :total_count, Integer, null: false, cache: true + field :years, [FacetType], null: true, cache: true + field :registration_agencies, [FacetType], null: true, cache: true + field :repositories, [FacetType], null: true, cache: true + field :affiliations, [FacetType], null: true, cache: true + + def total_count + args = prepare_args(object.arguments) + + response(args).results.total + end + + def years + args = prepare_args(object.arguments) + + res = response(args) + res.results.total.positive? ? facet_by_year(res.response.aggregations.years.buckets) : [] + end + + def registration_agencies + args = prepare_args(object.arguments) + + res = response(args) + res.results.total.positive? ? facet_by_software(res.response.aggregations.registration_agencies.buckets) : [] + end + + def repositories + args = prepare_args(object.arguments) + + res = response(args) + res.results.total.positive? ? facet_by_client(res.response.aggregations.clients.buckets) : [] + end + + def affiliations + args = prepare_args(object.arguments) + + res = response(args) + res.results.total.positive? ? facet_by_affiliation(res.response.aggregations.affiliations.buckets) : [] + end + + def response(**args) + 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: "Dissertation,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/dissertation_edge_type.rb b/app/graphql/types/dissertation_edge_type.rb new file mode 100644 index 000000000..8cec5d0bd --- /dev/null +++ b/app/graphql/types/dissertation_edge_type.rb @@ -0,0 +1,5 @@ +# frozen_string_literal: true + +class DissertationEdgeType < GraphQL::Types::Relay::BaseEdge + node_type(DissertationType) +end diff --git a/app/graphql/types/dissertation_type.rb b/app/graphql/types/dissertation_type.rb new file mode 100644 index 000000000..03961dd19 --- /dev/null +++ b/app/graphql/types/dissertation_type.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +class DissertationType < BaseObject + implements DoiItem + + def type + "Dissertation" + end +end diff --git a/app/graphql/types/event_connection_type.rb b/app/graphql/types/event_connection_type.rb index 0bd643abb..a3db6c874 100644 --- a/app/graphql/types/event_connection_type.rb +++ b/app/graphql/types/event_connection_type.rb @@ -6,6 +6,9 @@ class EventConnectionType < BaseConnection field :total_count, Integer, null: false, cache: true field :years, [FacetType], null: true, cache: true + field :registration_agencies, [FacetType], null: true, cache: true + field :repositories, [FacetType], null: true, cache: true + field :affiliations, [FacetType], null: true, cache: true def total_count args = prepare_args(object.arguments) @@ -20,6 +23,27 @@ def years res.results.total.positive? ? facet_by_year(res.response.aggregations.years.buckets) : [] end + def registration_agencies + args = prepare_args(object.arguments) + + res = response(args) + res.results.total.positive? ? facet_by_software(res.response.aggregations.registration_agencies.buckets) : [] + end + + def repositories + args = prepare_args(object.arguments) + + res = response(args) + res.results.total.positive? ? facet_by_client(res.response.aggregations.clients.buckets) : [] + end + + def affiliations + args = prepare_args(object.arguments) + + res = response(args) + res.results.total.positive? ? facet_by_affiliation(res.response.aggregations.affiliations.buckets) : [] + end + def response(**args) Doi.query(args[:query], ids: args[:ids], diff --git a/app/graphql/types/image_connection_type.rb b/app/graphql/types/image_connection_type.rb index fe056f76d..e1d44c764 100644 --- a/app/graphql/types/image_connection_type.rb +++ b/app/graphql/types/image_connection_type.rb @@ -6,6 +6,9 @@ class ImageConnectionType < BaseConnection field :total_count, Integer, null: false, cache: true field :years, [FacetType], null: true, cache: true + field :registration_agencies, [FacetType], null: true, cache: true + field :repositories, [FacetType], null: true, cache: true + field :affiliations, [FacetType], null: true, cache: true def total_count args = prepare_args(object.arguments) @@ -20,6 +23,27 @@ def years res.results.total.positive? ? facet_by_year(res.response.aggregations.years.buckets) : [] end + def registration_agencies + args = prepare_args(object.arguments) + + res = response(args) + res.results.total.positive? ? facet_by_software(res.response.aggregations.registration_agencies.buckets) : [] + end + + def repositories + args = prepare_args(object.arguments) + + res = response(args) + res.results.total.positive? ? facet_by_client(res.response.aggregations.clients.buckets) : [] + end + + def affiliations + args = prepare_args(object.arguments) + + res = response(args) + res.results.total.positive? ? facet_by_affiliation(res.response.aggregations.affiliations.buckets) : [] + end + def response(**args) Doi.query(args[:query], ids: args[:ids], diff --git a/app/graphql/types/instrument_connection_type.rb b/app/graphql/types/instrument_connection_type.rb index 39dcecc04..7c7016257 100644 --- a/app/graphql/types/instrument_connection_type.rb +++ b/app/graphql/types/instrument_connection_type.rb @@ -6,6 +6,9 @@ class InstrumentConnectionType < BaseConnection field :total_count, Integer, null: false, cache: true field :years, [FacetType], null: true, cache: true + field :registration_agencies, [FacetType], null: true, cache: true + field :repositories, [FacetType], null: true, cache: true + field :affiliations, [FacetType], null: true, cache: true def total_count args = prepare_args(object.arguments) @@ -20,6 +23,27 @@ def years res.results.total.positive? ? facet_by_year(res.response.aggregations.years.buckets) : [] end + def registration_agencies + args = prepare_args(object.arguments) + + res = response(args) + res.results.total.positive? ? facet_by_software(res.response.aggregations.registration_agencies.buckets) : [] + end + + def repositories + args = prepare_args(object.arguments) + + res = response(args) + res.results.total.positive? ? facet_by_client(res.response.aggregations.clients.buckets) : [] + end + + def affiliations + args = prepare_args(object.arguments) + + res = response(args) + res.results.total.positive? ? facet_by_affiliation(res.response.aggregations.affiliations.buckets) : [] + end + def response(**args) Doi.query(args[:query], ids: args[:ids], diff --git a/app/graphql/types/interactive_resource_connection_type.rb b/app/graphql/types/interactive_resource_connection_type.rb index b29d7ebdf..bbefe33b9 100644 --- a/app/graphql/types/interactive_resource_connection_type.rb +++ b/app/graphql/types/interactive_resource_connection_type.rb @@ -6,6 +6,9 @@ class InteractiveResourceConnectionType < BaseConnection field :total_count, Integer, null: false, cache: true field :years, [FacetType], null: true, cache: true + field :registration_agencies, [FacetType], null: true, cache: true + field :repositories, [FacetType], null: true, cache: true + field :affiliations, [FacetType], null: true, cache: true def total_count args = prepare_args(object.arguments) @@ -20,6 +23,27 @@ def years res.results.total.positive? ? facet_by_year(res.response.aggregations.years.buckets) : [] end + def registration_agencies + args = prepare_args(object.arguments) + + res = response(args) + res.results.total.positive? ? facet_by_software(res.response.aggregations.registration_agencies.buckets) : [] + end + + def repositories + args = prepare_args(object.arguments) + + res = response(args) + res.results.total.positive? ? facet_by_client(res.response.aggregations.clients.buckets) : [] + end + + def affiliations + args = prepare_args(object.arguments) + + res = response(args) + res.results.total.positive? ? facet_by_affiliation(res.response.aggregations.affiliations.buckets) : [] + end + def response(**args) Doi.query(args[:query], ids: args[:ids], diff --git a/app/graphql/types/journal_article_connection_type.rb b/app/graphql/types/journal_article_connection_type.rb new file mode 100644 index 000000000..95c455e99 --- /dev/null +++ b/app/graphql/types/journal_article_connection_type.rb @@ -0,0 +1,69 @@ +# frozen_string_literal: true + +class JournalArticleConnectionType < BaseConnection + edge_type(JournalArticleEdgeType) + field_class GraphQL::Cache::Field + + field :total_count, Integer, null: false, cache: true + field :years, [FacetType], null: true, cache: true + field :registration_agencies, [FacetType], null: true, cache: true + field :repositories, [FacetType], null: true, cache: true + field :affiliations, [FacetType], null: true, cache: true + + def total_count + args = prepare_args(object.arguments) + + response(args).results.total + end + + def years + args = prepare_args(object.arguments) + + res = response(args) + res.results.total.positive? ? facet_by_year(res.response.aggregations.years.buckets) : [] + end + + def registration_agencies + args = prepare_args(object.arguments) + + res = response(args) + res.results.total.positive? ? facet_by_software(res.response.aggregations.registration_agencies.buckets) : [] + end + + def repositories + args = prepare_args(object.arguments) + + res = response(args) + res.results.total.positive? ? facet_by_client(res.response.aggregations.clients.buckets) : [] + end + + def affiliations + args = prepare_args(object.arguments) + + res = response(args) + res.results.total.positive? ? facet_by_affiliation(res.response.aggregations.affiliations.buckets) : [] + end + + def response(**args) + 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: "JournalArticle", + 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/journal_article_edge_type.rb b/app/graphql/types/journal_article_edge_type.rb new file mode 100644 index 000000000..58a49d6cf --- /dev/null +++ b/app/graphql/types/journal_article_edge_type.rb @@ -0,0 +1,5 @@ +# frozen_string_literal: true + +class JournalArticleEdgeType < GraphQL::Types::Relay::BaseEdge + node_type(JournalArticleType) +end diff --git a/app/graphql/types/journal_article_type.rb b/app/graphql/types/journal_article_type.rb new file mode 100644 index 000000000..a51e04000 --- /dev/null +++ b/app/graphql/types/journal_article_type.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +class JournalArticleType < BaseObject + implements DoiItem + + def type + "JournalArticle" + end +end diff --git a/app/graphql/types/model_connection_type.rb b/app/graphql/types/model_connection_type.rb index 4363da78d..8ee21cdb5 100644 --- a/app/graphql/types/model_connection_type.rb +++ b/app/graphql/types/model_connection_type.rb @@ -6,6 +6,9 @@ class ModelConnectionType < BaseConnection field :total_count, Integer, null: false, cache: true field :years, [FacetType], null: true, cache: true + field :registration_agencies, [FacetType], null: true, cache: true + field :repositories, [FacetType], null: true, cache: true + field :affiliations, [FacetType], null: true, cache: true def total_count args = prepare_args(object.arguments) @@ -20,6 +23,27 @@ def years res.results.total.positive? ? facet_by_year(res.response.aggregations.years.buckets) : [] end + def registration_agencies + args = prepare_args(object.arguments) + + res = response(args) + res.results.total.positive? ? facet_by_software(res.response.aggregations.registration_agencies.buckets) : [] + end + + def repositories + args = prepare_args(object.arguments) + + res = response(args) + res.results.total.positive? ? facet_by_client(res.response.aggregations.clients.buckets) : [] + end + + def affiliations + args = prepare_args(object.arguments) + + res = response(args) + res.results.total.positive? ? facet_by_affiliation(res.response.aggregations.affiliations.buckets) : [] + end + def response(**args) Doi.query(args[:query], ids: args[:ids], diff --git a/app/graphql/types/other_connection_type.rb b/app/graphql/types/other_connection_type.rb index eac242ba2..d3b77b295 100644 --- a/app/graphql/types/other_connection_type.rb +++ b/app/graphql/types/other_connection_type.rb @@ -6,6 +6,9 @@ class OtherConnectionType < BaseConnection field :total_count, Integer, null: false, cache: true field :years, [FacetType], null: true, cache: true + field :registration_agencies, [FacetType], null: true, cache: true + field :repositories, [FacetType], null: true, cache: true + field :affiliations, [FacetType], null: true, cache: true def total_count args = prepare_args(object.arguments) @@ -20,6 +23,27 @@ def years res.results.total.positive? ? facet_by_year(res.response.aggregations.years.buckets) : [] end + def registration_agencies + args = prepare_args(object.arguments) + + res = response(args) + res.results.total.positive? ? facet_by_software(res.response.aggregations.registration_agencies.buckets) : [] + end + + def repositories + args = prepare_args(object.arguments) + + res = response(args) + res.results.total.positive? ? facet_by_client(res.response.aggregations.clients.buckets) : [] + end + + def affiliations + args = prepare_args(object.arguments) + + res = response(args) + res.results.total.positive? ? facet_by_affiliation(res.response.aggregations.affiliations.buckets) : [] + end + def response(**args) Doi.query(args[:query], ids: args[:ids], diff --git a/app/graphql/types/peer_review_connection_type.rb b/app/graphql/types/peer_review_connection_type.rb new file mode 100644 index 000000000..97de748c8 --- /dev/null +++ b/app/graphql/types/peer_review_connection_type.rb @@ -0,0 +1,69 @@ +# frozen_string_literal: true + +class PeerReviewConnectionType < BaseConnection + edge_type(PeerReviewEdgeType) + field_class GraphQL::Cache::Field + + field :total_count, Integer, null: false, cache: true + field :years, [FacetType], null: true, cache: true + field :registration_agencies, [FacetType], null: true, cache: true + field :repositories, [FacetType], null: true, cache: true + field :affiliations, [FacetType], null: true, cache: true + + def total_count + args = prepare_args(object.arguments) + + response(args).results.total + end + + def years + args = prepare_args(object.arguments) + + res = response(args) + res.results.total.positive? ? facet_by_year(res.response.aggregations.years.buckets) : [] + end + + def registration_agencies + args = prepare_args(object.arguments) + + res = response(args) + res.results.total.positive? ? facet_by_software(res.response.aggregations.registration_agencies.buckets) : [] + end + + def repositories + args = prepare_args(object.arguments) + + res = response(args) + res.results.total.positive? ? facet_by_client(res.response.aggregations.clients.buckets) : [] + end + + def affiliations + args = prepare_args(object.arguments) + + res = response(args) + res.results.total.positive? ? facet_by_affiliation(res.response.aggregations.affiliations.buckets) : [] + end + + def response(**args) + 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: "\"Peer review\"", + 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/peer_review_edge_type.rb b/app/graphql/types/peer_review_edge_type.rb new file mode 100644 index 000000000..14280b1f4 --- /dev/null +++ b/app/graphql/types/peer_review_edge_type.rb @@ -0,0 +1,5 @@ +# frozen_string_literal: true + +class PeerReviewEdgeType < GraphQL::Types::Relay::BaseEdge + node_type(PeerReviewType) +end diff --git a/app/graphql/types/peer_review_type.rb b/app/graphql/types/peer_review_type.rb new file mode 100644 index 000000000..3db7ee641 --- /dev/null +++ b/app/graphql/types/peer_review_type.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +class PeerReviewType < BaseObject + implements DoiItem + + def type + "PeerReview" + end +end diff --git a/app/graphql/types/physical_object_connection_type.rb b/app/graphql/types/physical_object_connection_type.rb index b58eaed4e..545611197 100644 --- a/app/graphql/types/physical_object_connection_type.rb +++ b/app/graphql/types/physical_object_connection_type.rb @@ -6,6 +6,9 @@ class PhysicalObjectConnectionType < BaseConnection field :total_count, Integer, null: false, cache: true field :years, [FacetType], null: true, cache: true + field :registration_agencies, [FacetType], null: true, cache: true + field :repositories, [FacetType], null: true, cache: true + field :affiliations, [FacetType], null: true, cache: true def total_count args = prepare_args(object.arguments) @@ -20,6 +23,27 @@ def years res.results.total.positive? ? facet_by_year(res.response.aggregations.years.buckets) : [] end + def registration_agencies + args = prepare_args(object.arguments) + + res = response(args) + res.results.total.positive? ? facet_by_software(res.response.aggregations.registration_agencies.buckets) : [] + end + + def repositories + args = prepare_args(object.arguments) + + res = response(args) + res.results.total.positive? ? facet_by_client(res.response.aggregations.clients.buckets) : [] + end + + def affiliations + args = prepare_args(object.arguments) + + res = response(args) + res.results.total.positive? ? facet_by_affiliation(res.response.aggregations.affiliations.buckets) : [] + end + def response(**args) Doi.query(args[:query], ids: args[:ids], diff --git a/app/graphql/types/preprint_connection_type.rb b/app/graphql/types/preprint_connection_type.rb new file mode 100644 index 000000000..57a13919a --- /dev/null +++ b/app/graphql/types/preprint_connection_type.rb @@ -0,0 +1,69 @@ +# frozen_string_literal: true + +class PreprintConnectionType < BaseConnection + edge_type(PreprintEdgeType) + field_class GraphQL::Cache::Field + + field :total_count, Integer, null: false, cache: true + field :years, [FacetType], null: true, cache: true + field :registration_agencies, [FacetType], null: true, cache: true + field :repositories, [FacetType], null: true, cache: true + field :affiliations, [FacetType], null: true, cache: true + + def total_count + args = prepare_args(object.arguments) + + response(args).results.total + end + + def years + args = prepare_args(object.arguments) + + res = response(args) + res.results.total.positive? ? facet_by_year(res.response.aggregations.years.buckets) : [] + end + + def registration_agencies + args = prepare_args(object.arguments) + + res = response(args) + res.results.total.positive? ? facet_by_software(res.response.aggregations.registration_agencies.buckets) : [] + end + + def repositories + args = prepare_args(object.arguments) + + res = response(args) + res.results.total.positive? ? facet_by_client(res.response.aggregations.clients.buckets) : [] + end + + def affiliations + args = prepare_args(object.arguments) + + res = response(args) + res.results.total.positive? ? facet_by_affiliation(res.response.aggregations.affiliations.buckets) : [] + end + + def response(**args) + 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: "PostedContent,Preprint", + 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/preprint_edge_type.rb b/app/graphql/types/preprint_edge_type.rb new file mode 100644 index 000000000..749e3b1dc --- /dev/null +++ b/app/graphql/types/preprint_edge_type.rb @@ -0,0 +1,5 @@ +# frozen_string_literal: true + +class PreprintEdgeType < GraphQL::Types::Relay::BaseEdge + node_type(PreprintType) +end diff --git a/app/graphql/types/preprint_type.rb b/app/graphql/types/preprint_type.rb new file mode 100644 index 000000000..8e862e88a --- /dev/null +++ b/app/graphql/types/preprint_type.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +class PreprintType < BaseObject + implements DoiItem + + def type + "Preprint" + end +end diff --git a/app/graphql/types/publication_connection_type.rb b/app/graphql/types/publication_connection_type.rb index 38f9c1925..bf6ad4a67 100644 --- a/app/graphql/types/publication_connection_type.rb +++ b/app/graphql/types/publication_connection_type.rb @@ -6,6 +6,9 @@ class PublicationConnectionType < BaseConnection field :total_count, Integer, null: false, cache: true field :years, [FacetType], null: true, cache: true + field :registration_agencies, [FacetType], null: true, cache: true + field :repositories, [FacetType], null: true, cache: true + field :affiliations, [FacetType], null: true, 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 @@ -26,6 +29,27 @@ def years res.results.total.positive? ? facet_by_year(res.response.aggregations.years.buckets) : [] end + def registration_agencies + args = prepare_args(object.arguments) + + res = response(args) + res.results.total.positive? ? facet_by_software(res.response.aggregations.registration_agencies.buckets) : [] + end + + def repositories + args = prepare_args(object.arguments) + + res = response(args) + res.results.total.positive? ? facet_by_client(res.response.aggregations.clients.buckets) : [] + end + + def affiliations + args = prepare_args(object.arguments) + + res = response(args) + res.results.total.positive? ? facet_by_affiliation(res.response.aggregations.affiliations.buckets) : [] + end + def response(**args) Doi.query(args[:query], ids: args[:ids], diff --git a/app/graphql/types/query_type.rb b/app/graphql/types/query_type.rb index 0b47d8a40..be5d81893 100644 --- a/app/graphql/types/query_type.rb +++ b/app/graphql/types/query_type.rb @@ -167,6 +167,7 @@ def work(id:) field :datasets, DatasetConnectionType, null: false, connection: true, max_page_size: 1000 do argument :query, String, required: false + argument :ids, [String], required: false argument :user_id, String, required: false argument :repository_id, String, required: false argument :member_id, String, required: false @@ -196,6 +197,7 @@ def dataset(id:) field :publications, PublicationConnectionType, null: false, connection: true, max_page_size: 1000 do argument :query, String, required: false + argument :ids, [String], required: false argument :user_id, String, required: false argument :repository_id, String, required: false argument :member_id, String, required: false @@ -225,6 +227,7 @@ def publication(id:) field :audiovisuals, AudiovisualConnectionType, null: false, connection: true, max_page_size: 1000 do argument :query, String, required: false + argument :ids, [String], required: false argument :user_id, String, required: false argument :repository_id, String, required: false argument :member_id, String, required: false @@ -254,6 +257,7 @@ def audiovisual(id:) field :collections, CollectionConnectionType, null: false, connection: true, max_page_size: 1000 do argument :query, String, required: false + argument :ids, [String], required: false argument :user_id, String, required: false argument :repository_id, String, required: false argument :member_id, String, required: false @@ -283,6 +287,7 @@ def collection(id:) field :data_papers, DataPaperConnectionType, null: false, connection: true, max_page_size: 1000 do argument :query, String, required: false + argument :ids, [String], required: false argument :user_id, String, required: false argument :repository_id, String, required: false argument :member_id, String, required: false @@ -312,6 +317,7 @@ def data_paper(id:) field :events, EventConnectionType, null: false, connection: true, max_page_size: 1000 do argument :query, String, required: false + argument :ids, [String], required: false argument :user_id, String, required: false argument :repository_id, String, required: false argument :member_id, String, required: false @@ -341,6 +347,7 @@ def event(id:) field :images, ImageConnectionType, null: false, connection: true, max_page_size: 1000 do argument :query, String, required: false + argument :ids, [String], required: false argument :user_id, String, required: false argument :repository_id, String, required: false argument :member_id, String, required: false @@ -370,6 +377,7 @@ def image(id:) field :interactive_resources, InteractiveResourceConnectionType, null: false, connection: true, max_page_size: 1000 do argument :query, String, required: false + argument :ids, [String], required: false argument :user_id, String, required: false argument :repository_id, String, required: false argument :member_id, String, required: false @@ -399,6 +407,7 @@ def interactive_resource(id:) field :models, ModelConnectionType, null: false, connection: true, max_page_size: 1000 do argument :query, String, required: false + argument :ids, [String], required: false argument :user_id, String, required: false argument :repository_id, String, required: false argument :member_id, String, required: false @@ -428,6 +437,7 @@ def model(id:) field :physical_objects, PhysicalObjectConnectionType, null: false do argument :query, String, required: false + argument :ids, [String], required: false argument :user_id, String, required: false argument :repository_id, String, required: false argument :member_id, String, required: false @@ -457,6 +467,7 @@ def physical_object(id:) field :services, ServiceConnectionType, null: false, connection: true, max_page_size: 1000 do argument :query, String, required: false + argument :ids, [String], required: false argument :user_id, String, required: false argument :repository_id, String, required: false argument :member_id, String, required: false @@ -486,6 +497,7 @@ def service(id:) field :softwares, SoftwareConnectionType, null: false, connection: true, max_page_size: 1000 do argument :query, String, required: false + argument :ids, [String], required: false argument :user_id, String, required: false argument :repository_id, String, required: false argument :member_id, String, required: false @@ -515,6 +527,7 @@ def software(id:) field :sounds, SoundConnectionType, null: false, connection: true, max_page_size: 1000 do argument :query, String, required: false + argument :ids, [String], required: false argument :user_id, String, required: false argument :repository_id, String, required: false argument :member_id, String, required: false @@ -544,6 +557,7 @@ def sound(id:) field :workflows, WorkflowConnectionType, null: false, connection: true, max_page_size: 1000 do argument :query, String, required: false + argument :ids, [String], required: false argument :user_id, String, required: false argument :repository_id, String, required: false argument :member_id, String, required: false @@ -571,8 +585,40 @@ def workflow(id:) set_doi(id) end - field :theses, ThesisConnectionType, null: false, connection: true, max_page_size: 1000 do + field :dissertations, DissertationConnectionType, null: false, connection: true, max_page_size: 1000 do + argument :query, String, required: false + argument :ids, [String], required: false + argument :user_id, String, required: false + argument :repository_id, String, required: false + argument :member_id, String, required: false + argument :has_person, Boolean, required: false + argument :has_funder, Boolean, required: false + argument :has_organization, Boolean, required: false + argument :has_citations, Int, required: false + argument :has_parts, Int, required: false + argument :has_versions, Int, required: false + argument :has_views, Int, required: false + argument :has_downloads, Int, required: false + argument :first, Int, required: false, default_value: 25 + end + + def dissertations(**args) + args[:resource_type_id] = "Text" + args[:resource_type] = "Dissertation,Thesis" + response(args) + end + + field :dissertation, DissertationType, null: false do + argument :id, ID, required: true + end + + def dissertation(id:) + set_doi(id) + end + + field :preprints, PreprintConnectionType, null: false, connection: true, max_page_size: 1000 do argument :query, String, required: false + argument :ids, [String], required: false argument :user_id, String, required: false argument :repository_id, String, required: false argument :member_id, String, required: false @@ -587,22 +633,178 @@ def workflow(id:) argument :first, Int, required: false, default_value: 25 end - def theses(**args) + def preprints(**args) args[:resource_type_id] = "Text" - args[:resource_type] = "thesis" + args[:resource_type] = "PostedContent,Preprint" response(args) end - field :thesis, PublicationType, null: false do + field :preprint, PreprintType, null: false do argument :id, ID, required: true end - def thesis(id:) + def preprint(id:) + set_doi(id) + end + + field :peer_reviews, PeerReviewConnectionType, null: false, connection: true, max_page_size: 1000 do + argument :query, String, required: false + argument :ids, [String], required: false + argument :user_id, String, required: false + argument :repository_id, String, required: false + argument :member_id, String, required: false + argument :has_person, Boolean, required: false + argument :has_funder, Boolean, required: false + argument :has_organization, Boolean, required: false + argument :has_citations, Int, required: false + argument :has_parts, Int, required: false + argument :has_versions, Int, required: false + argument :has_views, Int, required: false + argument :has_downloads, Int, required: false + argument :first, Int, required: false, default_value: 25 + end + + def peer_reviews(**args) + args[:resource_type_id] = "Text" + args[:resource_type] = "\"Peer review\"" + response(args) + end + + field :peer_review, PeerReviewType, null: false do + argument :id, ID, required: true + end + + def peer_review(id:) + set_doi(id) + end + + field :conference_papers, ConferencePaperConnectionType, null: false, connection: true, max_page_size: 1000 do + argument :query, String, required: false + argument :ids, [String], required: false + argument :user_id, String, required: false + argument :repository_id, String, required: false + argument :member_id, String, required: false + argument :has_person, Boolean, required: false + argument :has_funder, Boolean, required: false + argument :has_organization, Boolean, required: false + argument :has_citations, Int, required: false + argument :has_parts, Int, required: false + argument :has_versions, Int, required: false + argument :has_views, Int, required: false + argument :has_downloads, Int, required: false + argument :first, Int, required: false, default_value: 25 + end + + def conference_papers(**args) + args[:resource_type_id] = "Text" + args[:resource_type] = "\"Conference paper\"" + response(args) + end + + field :conference_paper, ConferencePaperType, null: false do + argument :id, ID, required: true + end + + def conference_paper(id:) + set_doi(id) + end + + field :book_chapters, BookChapterConnectionType, null: false, connection: true, max_page_size: 1000 do + argument :query, String, required: false + argument :ids, [String], required: false + argument :user_id, String, required: false + argument :repository_id, String, required: false + argument :member_id, String, required: false + argument :has_person, Boolean, required: false + argument :has_funder, Boolean, required: false + argument :has_organization, Boolean, required: false + argument :has_citations, Int, required: false + argument :has_parts, Int, required: false + argument :has_versions, Int, required: false + argument :has_views, Int, required: false + argument :has_downloads, Int, required: false + argument :first, Int, required: false, default_value: 25 + end + + def book_chapters(**args) + args[:resource_type_id] = "Text" + args[:resource_type] = "BookChapter" + response(args) + end + + field :book_chapter, BookChapterType, null: false do + argument :id, ID, required: true + end + + def book_chapter(id:) + set_doi(id) + end + + field :books, BookConnectionType, null: false, connection: true, max_page_size: 1000 do + argument :query, String, required: false + argument :ids, [String], required: false + argument :user_id, String, required: false + argument :repository_id, String, required: false + argument :member_id, String, required: false + argument :has_person, Boolean, required: false + argument :has_funder, Boolean, required: false + argument :has_organization, Boolean, required: false + argument :has_citations, Int, required: false + argument :has_parts, Int, required: false + argument :has_versions, Int, required: false + argument :has_views, Int, required: false + argument :has_downloads, Int, required: false + argument :first, Int, required: false, default_value: 25 + end + + def books(**args) + args[:resource_type_id] = "Text" + args[:resource_type] = "Book" + response(args) + end + + field :book, BookType, null: false do + argument :id, ID, required: true + end + + def book(id:) + set_doi(id) + end + + field :journal_articles, JournalArticleConnectionType, null: false, connection: true, max_page_size: 1000 do + argument :query, String, required: false + argument :ids, [String], required: false + argument :user_id, String, required: false + argument :repository_id, String, required: false + argument :member_id, String, required: false + argument :has_person, Boolean, required: false + argument :has_funder, Boolean, required: false + argument :has_organization, Boolean, required: false + argument :has_citations, Int, required: false + argument :has_parts, Int, required: false + argument :has_versions, Int, required: false + argument :has_views, Int, required: false + argument :has_downloads, Int, required: false + argument :first, Int, required: false, default_value: 25 + end + + def journal_articles(**args) + args[:resource_type_id] = "Text" + args[:resource_type] = "JournalArticle" + response(args) + end + + field :journal_article, JournalArticleType, null: false do + argument :id, ID, required: true + end + + def journal_article(id:) set_doi(id) end field :instruments, InstrumentConnectionType, null: false, connection: true, max_page_size: 1000 do argument :query, String, required: false + argument :ids, [String], required: false argument :user_id, String, required: false argument :repository_id, String, required: false argument :member_id, String, required: false @@ -624,7 +826,7 @@ def instruments(**args) response(args) end - field :instrument, OtherType, null: false do + field :instrument, InstrumentType, null: false do argument :id, ID, required: true end @@ -634,6 +836,7 @@ def instrument(id:) field :others, OtherConnectionType, null: false, connection: true, max_page_size: 1000 do argument :query, String, required: false + argument :ids, [String], required: false argument :user_id, String, required: false argument :repository_id, String, required: false argument :member_id, String, required: false diff --git a/app/graphql/types/service_connection_type.rb b/app/graphql/types/service_connection_type.rb index bbf6fbc64..cd98bddf9 100644 --- a/app/graphql/types/service_connection_type.rb +++ b/app/graphql/types/service_connection_type.rb @@ -6,7 +6,10 @@ class ServiceConnectionType < BaseConnection field :total_count, Integer, null: false, cache: true field :years, [FacetType], null: true, cache: true - + field :registration_agencies, [FacetType], null: true, cache: true + field :repositories, [FacetType], null: true, cache: true + field :affiliations, [FacetType], null: true, cache: true + def total_count args = prepare_args(object.arguments) @@ -20,6 +23,27 @@ def years res.results.total.positive? ? facet_by_year(res.response.aggregations.years.buckets) : [] end + def registration_agencies + args = prepare_args(object.arguments) + + res = response(args) + res.results.total.positive? ? facet_by_software(res.response.aggregations.registration_agencies.buckets) : [] + end + + def repositories + args = prepare_args(object.arguments) + + res = response(args) + res.results.total.positive? ? facet_by_client(res.response.aggregations.clients.buckets) : [] + end + + def affiliations + args = prepare_args(object.arguments) + + res = response(args) + res.results.total.positive? ? facet_by_affiliation(res.response.aggregations.affiliations.buckets) : [] + end + def response(**args) Doi.query(args[:query], ids: args[:ids], diff --git a/app/graphql/types/software_connection_type.rb b/app/graphql/types/software_connection_type.rb index c4ec12870..14094843b 100644 --- a/app/graphql/types/software_connection_type.rb +++ b/app/graphql/types/software_connection_type.rb @@ -6,6 +6,10 @@ class SoftwareConnectionType < BaseConnection field :total_count, Integer, null: false, cache: true field :years, [FacetType], null: true, cache: true + field :registration_agencies, [FacetType], null: true, cache: true + field :repositories, [FacetType], null: true, cache: true + field :affiliations, [FacetType], null: true, cache: true + field :software_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 @@ -27,6 +31,27 @@ def years res.results.total.positive? ? facet_by_year(res.response.aggregations.years.buckets) : [] end + def registration_agencies + args = prepare_args(object.arguments) + + res = response(args) + res.results.total.positive? ? facet_by_software(res.response.aggregations.registration_agencies.buckets) : [] + end + + def repositories + args = prepare_args(object.arguments) + + res = response(args) + res.results.total.positive? ? facet_by_client(res.response.aggregations.clients.buckets) : [] + end + + def affiliations + args = prepare_args(object.arguments) + + res = response(args) + res.results.total.positive? ? facet_by_affiliation(res.response.aggregations.affiliations.buckets) : [] + end + def response(**args) Doi.query(args[:query], ids: args[:ids], diff --git a/app/graphql/types/sound_connection_type.rb b/app/graphql/types/sound_connection_type.rb index 2e0ddb784..209dc44ed 100644 --- a/app/graphql/types/sound_connection_type.rb +++ b/app/graphql/types/sound_connection_type.rb @@ -6,6 +6,9 @@ class SoundConnectionType < BaseConnection field :total_count, Integer, null: false, cache: true field :years, [FacetType], null: true, cache: true + field :registration_agencies, [FacetType], null: true, cache: true + field :repositories, [FacetType], null: true, cache: true + field :affiliations, [FacetType], null: true, cache: true def total_count args = prepare_args(object.arguments) @@ -20,6 +23,27 @@ def years res.results.total.positive? ? facet_by_year(res.response.aggregations.years.buckets) : [] end + def registration_agencies + args = prepare_args(object.arguments) + + res = response(args) + res.results.total.positive? ? facet_by_software(res.response.aggregations.registration_agencies.buckets) : [] + end + + def repositories + args = prepare_args(object.arguments) + + res = response(args) + res.results.total.positive? ? facet_by_client(res.response.aggregations.clients.buckets) : [] + end + + def affiliations + args = prepare_args(object.arguments) + + res = response(args) + res.results.total.positive? ? facet_by_affiliation(res.response.aggregations.affiliations.buckets) : [] + end + def response(**args) Doi.query(args[:query], ids: args[:ids], diff --git a/app/graphql/types/thesis_edge_type.rb b/app/graphql/types/thesis_edge_type.rb deleted file mode 100644 index 5be6c8014..000000000 --- a/app/graphql/types/thesis_edge_type.rb +++ /dev/null @@ -1,5 +0,0 @@ -# frozen_string_literal: true - -class ThesisEdgeType < GraphQL::Types::Relay::BaseEdge - node_type(ThesisType) -end diff --git a/app/graphql/types/thesis_type.rb b/app/graphql/types/thesis_type.rb deleted file mode 100644 index 5439cb72b..000000000 --- a/app/graphql/types/thesis_type.rb +++ /dev/null @@ -1,5 +0,0 @@ -# frozen_string_literal: true - -class ThesisType < BaseObject - implements DoiItem -end diff --git a/app/graphql/types/work_connection_type.rb b/app/graphql/types/work_connection_type.rb index bdd2627ba..ebe6b53b7 100644 --- a/app/graphql/types/work_connection_type.rb +++ b/app/graphql/types/work_connection_type.rb @@ -7,7 +7,10 @@ class WorkConnectionType < BaseConnection field :total_count, Integer, null: false, cache: true field :years, [FacetType], null: true, cache: true field :resource_types, [FacetType], null: true, cache: true - + field :registration_agencies, [FacetType], null: true, cache: true + field :repositories, [FacetType], null: true, cache: true + field :affiliations, [FacetType], null: true, cache: true + def total_count args = prepare_args(object.arguments) @@ -28,6 +31,27 @@ def resource_types res.results.total.positive? ? facet_by_resource_type(res.response.aggregations.resource_types.buckets) : [] end + def registration_agencies + args = prepare_args(object.arguments) + + res = response(args) + res.results.total.positive? ? facet_by_software(res.response.aggregations.registration_agencies.buckets) : [] + end + + def repositories + args = prepare_args(object.arguments) + + res = response(args) + res.results.total.positive? ? facet_by_client(res.response.aggregations.clients.buckets) : [] + end + + def affiliations + args = prepare_args(object.arguments) + + res = response(args) + res.results.total.positive? ? facet_by_affiliation(res.response.aggregations.affiliations.buckets) : [] + end + def response(**args) Doi.query(args[:query], ids: args[:ids], diff --git a/app/graphql/types/workflow_connection_type.rb b/app/graphql/types/workflow_connection_type.rb index b6c9c6165..1526a09d4 100644 --- a/app/graphql/types/workflow_connection_type.rb +++ b/app/graphql/types/workflow_connection_type.rb @@ -6,6 +6,9 @@ class WorkflowConnectionType < BaseConnection field :total_count, Integer, null: false, cache: true field :years, [FacetType], null: true, cache: true + field :registration_agencies, [FacetType], null: true, cache: true + field :repositories, [FacetType], null: true, cache: true + field :affiliations, [FacetType], null: true, cache: true def total_count args = prepare_args(object.arguments) @@ -20,6 +23,27 @@ def years res.results.total.positive? ? facet_by_year(res.response.aggregations.years.buckets) : [] end + def registration_agencies + args = prepare_args(object.arguments) + + res = response(args) + res.results.total.positive? ? facet_by_software(res.response.aggregations.registration_agencies.buckets) : [] + end + + def repositories + args = prepare_args(object.arguments) + + res = response(args) + res.results.total.positive? ? facet_by_client(res.response.aggregations.clients.buckets) : [] + end + + def affiliations + args = prepare_args(object.arguments) + + res = response(args) + res.results.total.positive? ? facet_by_affiliation(res.response.aggregations.affiliations.buckets) : [] + end + def response(**args) Doi.query(args[:query], ids: args[:ids], diff --git a/app/models/doi.rb b/app/models/doi.rb index a2f105e55..b06dc734c 100644 --- a/app/models/doi.rb +++ b/app/models/doi.rb @@ -518,6 +518,7 @@ def self.query_aggregations resource_types: { terms: { field: 'types.resourceTypeGeneral', size: 16, min_doc_count: 1 } }, states: { terms: { field: 'aasm_state', size: 3, min_doc_count: 1 } }, years: { date_histogram: { field: 'publication_year', interval: 'year', min_doc_count: 1 } }, + registration_agencies: { terms: { field: 'agency', size: 10, min_doc_count: 1 } }, created: { date_histogram: { field: 'created', interval: 'year', min_doc_count: 1 } }, registered: { date_histogram: { field: 'registered', interval: 'year', min_doc_count: 1 } }, providers: { terms: { field: 'provider_id', size: 15, min_doc_count: 1} }, @@ -706,7 +707,7 @@ def self.query(query, options={}) must << { query_string: { query: query, fields: query_fields } } if query.present? must << { terms: { doi: options[:ids].map(&:upcase) }} if options[:ids].present? must << { term: { "types.resourceTypeGeneral": options[:resource_type_id].underscore.camelize }} if options[:resource_type_id].present? - must << { term: { "types.resourceType": options[:resource_type].humanize }} if options[:resource_type].present? + must << { terms: { "types.resourceType": options[:resource_type].split(",") }} if options[:resource_type].present? must << { terms: { provider_id: options[:provider_id].split(",") } } if options[:provider_id].present? must << { terms: { client_id: options[:client_id].to_s.split(",") } } if options[:client_id].present? must << { terms: { prefix: options[:prefix].to_s.split(",") } } if options[:prefix].present? @@ -1041,7 +1042,7 @@ def downloads_over_time end def reference_ids - reference_events.pluck(:target_doi).uniq.map { |d| d.present? ? d.downcase : nil }.compact + reference_events.pluck(:target_doi).compact.uniq.map(&:downcase) end def reference_count @@ -1053,7 +1054,7 @@ def indexed_references end def citation_ids - citation_events.pluck(:source_doi).uniq.map { |d| d.present? ? d.downcase : nil }.compact + citation_events.pluck(:source_doi).compact.uniq.map(&:downcase) end # remove duplicate citing source dois @@ -1075,7 +1076,7 @@ def indexed_citations end def part_ids - part_events.pluck(:target_doi).uniq.map { |d| d.present? ? d.downcase : nil }.compact + part_events.pluck(:target_doi).compact.uniq.map(&:downcase) end def part_count @@ -1087,7 +1088,7 @@ def indexed_parts end def part_of_ids - part_of_events.pluck(:source_doi).uniq.map { |d| d.present? ? d.downcase : nil }.compact + part_of_events.pluck(:source_doi).compact.uniq.map(&:downcase) end def part_of_count @@ -1099,7 +1100,7 @@ def indexed_part_of end def version_ids - version_events.pluck(:target_doi).uniq.map { |d| d.present? ? d.downcase : nil }.compact + version_events.pluck(:target_doi).compact.uniq.map(&:downcase) end def version_count @@ -1111,7 +1112,7 @@ def indexed_versions end def version_of_ids - version_of_events.pluck(:source_doi).uniq.map { |d| d.present? ? d.downcase : nil }.compact + version_of_events.pluck(:source_doi).compact.uniq.map(&:downcase) end def version_of_count diff --git a/spec/fixtures/vcr_cassettes/dois/GET_/dois_for_dissertations/filter_for_dissertations.yml b/spec/fixtures/vcr_cassettes/dois/GET_/dois_for_dissertations/filter_for_dissertations.yml new file mode 100644 index 000000000..ed5cc240c --- /dev/null +++ b/spec/fixtures/vcr_cassettes/dois/GET_/dois_for_dissertations/filter_for_dissertations.yml @@ -0,0 +1,55 @@ +--- +http_interactions: +- request: + method: get + uri: https://api.ror.org/organizations?query=%22https://ror.org/04wxnsj81%22 + body: + encoding: US-ASCII + string: '' + headers: + User-Agent: + - Mozilla/5.0 (compatible; Maremma/4.6.1; mailto:info@datacite.org) + Accept: + - text/html,application/json,application/xml;q=0.9, text/plain;q=0.8,image/png,*/*;q=0.5 + Accept-Encoding: + - gzip,deflate + response: + status: + code: 200 + message: OK + headers: + Content-Type: + - application/json + Content-Length: + - '603' + Connection: + - keep-alive + Date: + - Sun, 12 Apr 2020 13:53:06 GMT + Status: + - 200 OK + X-Frame-Options: + - SAMEORIGIN + Allow: + - GET, HEAD, OPTIONS + X-Powered-By: + - Phusion Passenger 6.0.4 + Server: + - nginx/1.17.3 + Phusion Passenger 6.0.4 + Vary: + - Cookie,Origin + X-Cache: + - Miss from cloudfront + Via: + - 1.1 88bc7a9e54e3765a2fd64d3e80cc8217.cloudfront.net (CloudFront) + X-Amz-Cf-Pop: + - DUS51-C1 + X-Amz-Cf-Id: + - IiRAi8PYYvuC8VOC9eSZV0ItVULyw-V_nfoB2TCN589cdgI-E8NSaw== + body: + encoding: ASCII-8BIT + string: '{"number_of_results":1,"time_taken":15,"items":[{"id":"https://ror.org/04wxnsj81","name":"DataCite","types":["Nonprofit"],"links":["https://www.datacite.org"],"aliases":[],"acronyms":[],"status":"active","wikipedia_url":"https://en.wikipedia.org/wiki/DataCite","labels":[],"country":{"country_name":"Germany","country_code":"DE"},"external_ids":{"Wikidata":{"preferred":"Q821542","all":["Q821542"]},"GRID":{"preferred":"grid.475826.a","all":"grid.475826.a"}}}],"meta":{"types":[{"id":"nonprofit","title":"Nonprofit","count":1}],"countries":[{"id":"de","title":"Federal + Republic of Germany","count":1}]}}' + http_version: null + recorded_at: Sun, 12 Apr 2020 13:53:06 GMT +recorded_with: VCR 5.1.0 diff --git a/spec/graphql/types/book_chapter_type_spec.rb b/spec/graphql/types/book_chapter_type_spec.rb new file mode 100644 index 000000000..ecc32f1a1 --- /dev/null +++ b/spec/graphql/types/book_chapter_type_spec.rb @@ -0,0 +1,79 @@ +require "rails_helper" + +describe BookChapterType do + describe "fields" do + subject { described_class } + + it { is_expected.to have_field(:id).of_type(!types.ID) } + it { is_expected.to have_field(:type).of_type("String!") } + end + + describe "query book chapters", elasticsearch: true do + let!(:book_chapters) { create_list(:doi, 3, types: { "resourceTypeGeneral" => "Text", "resourceType" => "BookChapter" }, aasm_state: "findable") } + + before do + Doi.import + sleep 2 + end + + let(:query) do + %(query { + bookChapters { + totalCount + nodes { + id + } + } + }) + end + + it "returns all book chapters" do + response = LupoSchema.execute(query).as_json + + expect(response.dig("data", "bookChapters", "totalCount")).to eq(3) + expect(response.dig("data", "bookChapters", "nodes").length).to eq(3) + expect(response.dig("data", "bookChapters", "nodes", 0, "id")).to eq(book_chapters.first.identifier) + end + end + + describe "query book chapters by person", elasticsearch: true do + let!(:book_chapters) { create_list(:doi, 3, types: { "resourceTypeGeneral" => "Text", "resourceType" => "BookChapter" }, aasm_state: "findable") } + let!(:book_chapter) { create(:doi, types: { "resourceTypeGeneral" => "Text", "resourceType" => "BookChapter" }, aasm_state: "findable", creators: + [{ + "familyName" => "Garza", + "givenName" => "Kristian", + "name" => "Garza, Kristian", + "nameIdentifiers" => [{"nameIdentifier"=>"https://orcid.org/0000-0003-3484-6875", "nameIdentifierScheme"=>"ORCID", "schemeUri"=>"https://orcid.org"}], + "nameType" => "Personal", + }]) + } + before do + Doi.import + sleep 2 + end + + let(:query) do + %(query { + bookChapters(userId: "https://orcid.org/0000-0003-1419-2405") { + totalCount + years { + id + count + } + nodes { + id + } + } + }) + end + + it "returns book chapters" do + response = LupoSchema.execute(query).as_json + + expect(response.dig("data", "bookChapters", "totalCount")).to eq(3) + expect(response.dig("data", "bookChapters", "years")).to eq([{"count"=>3, "id"=>"2011"}]) + expect(response.dig("data", "bookChapters", "nodes").length).to eq(3) + expect(response.dig("data", "bookChapters", "nodes", 0, "id")).to eq(book_chapters.first.identifier) + end + end +end diff --git a/spec/graphql/types/book_type_spec.rb b/spec/graphql/types/book_type_spec.rb new file mode 100644 index 000000000..83b38f6e6 --- /dev/null +++ b/spec/graphql/types/book_type_spec.rb @@ -0,0 +1,79 @@ +require "rails_helper" + +describe BookType do + describe "fields" do + subject { described_class } + + it { is_expected.to have_field(:id).of_type(!types.ID) } + it { is_expected.to have_field(:type).of_type("String!") } + end + + describe "query books", elasticsearch: true do + let!(:books) { create_list(:doi, 3, types: { "resourceTypeGeneral" => "Text", "resourceType" => "Book" }, aasm_state: "findable") } + + before do + Doi.import + sleep 2 + end + + let(:query) do + %(query { + books { + totalCount + nodes { + id + } + } + }) + end + + it "returns all books" do + response = LupoSchema.execute(query).as_json + + expect(response.dig("data", "books", "totalCount")).to eq(3) + expect(response.dig("data", "books", "nodes").length).to eq(3) + expect(response.dig("data", "books", "nodes", 0, "id")).to eq(books.first.identifier) + end + end + + describe "query books by person", elasticsearch: true do + let!(:books) { create_list(:doi, 3, types: { "resourceTypeGeneral" => "Text", "resourceType" => "Book" }, aasm_state: "findable") } + let!(:book) { create(:doi, types: { "resourceTypeGeneral" => "Text", "resourceType" => "Book" }, aasm_state: "findable", creators: + [{ + "familyName" => "Garza", + "givenName" => "Kristian", + "name" => "Garza, Kristian", + "nameIdentifiers" => [{"nameIdentifier"=>"https://orcid.org/0000-0003-3484-6875", "nameIdentifierScheme"=>"ORCID", "schemeUri"=>"https://orcid.org"}], + "nameType" => "Personal", + }]) + } + before do + Doi.import + sleep 2 + end + + let(:query) do + %(query { + books(userId: "https://orcid.org/0000-0003-1419-2405") { + totalCount + years { + id + count + } + nodes { + id + } + } + }) + end + + it "returns books" do + response = LupoSchema.execute(query).as_json + + expect(response.dig("data", "books", "totalCount")).to eq(3) + expect(response.dig("data", "books", "years")).to eq([{"count"=>3, "id"=>"2011"}]) + expect(response.dig("data", "books", "nodes").length).to eq(3) + expect(response.dig("data", "books", "nodes", 0, "id")).to eq(books.first.identifier) + end + end +end diff --git a/spec/graphql/types/conference_paper_type.spec b/spec/graphql/types/conference_paper_type.spec new file mode 100644 index 000000000..b84bf6c91 --- /dev/null +++ b/spec/graphql/types/conference_paper_type.spec @@ -0,0 +1,79 @@ +require "rails_helper" + +describe ConferencePaperType do + describe "fields" do + subject { described_class } + + it { is_expected.to have_field(:id).of_type(!types.ID) } + it { is_expected.to have_field(:type).of_type("String!") } + end + + describe "query conference papers", elasticsearch: true do + let!(:conference_papers) { create_list(:doi, 3, types: { "resourceTypeGeneral" => "Text", "resourceType" => "Conference paper" }, aasm_state: "findable") } + + before do + Doi.import + sleep 2 + end + + let(:query) do + %(query { + conferencePapers { + totalCount + nodes { + id + } + } + }) + end + + it "returns all conference papers" do + response = LupoSchema.execute(query).as_json + + expect(response.dig("data", "conferencePapers", "totalCount")).to eq(3) + expect(response.dig("data", "conferencePapers", "nodes").length).to eq(3) + expect(response.dig("data", "conferencePapers", "nodes", 0, "id")).to eq(conference_papers.first.identifier) + end + end + + describe "query conference papers by person", elasticsearch: true do + let!(:conference_papers) { create_list(:doi, 3, types: { "resourceTypeGeneral" => "Text", "resourceType" => "Conference paper" }, aasm_state: "findable") } + let!(:conference_paper) { create(:doi, types: { "resourceTypeGeneral" => "Text", "resourceType" => "Conference paper" }, aasm_state: "findable", creators: + [{ + "familyName" => "Garza", + "givenName" => "Kristian", + "name" => "Garza, Kristian", + "nameIdentifiers" => [{"nameIdentifier"=>"https://orcid.org/0000-0003-3484-6875", "nameIdentifierScheme"=>"ORCID", "schemeUri"=>"https://orcid.org"}], + "nameType" => "Personal", + }]) + } + before do + Doi.import + sleep 2 + end + + let(:query) do + %(query { + conferencePapers(userId: "https://orcid.org/0000-0003-1419-2405") { + totalCount + years { + id + count + } + nodes { + id + } + } + }) + end + + it "returns conference papers" do + response = LupoSchema.execute(query).as_json + + expect(response.dig("data", "conferencePapers", "totalCount")).to eq(3) + expect(response.dig("data", "conferencePapers", "years")).to eq([{"count"=>3, "id"=>"2011"}]) + expect(response.dig("data", "conferencePapers", "nodes").length).to eq(3) + expect(response.dig("data", "conferencePapers", "nodes", 0, "id")).to eq(conference_papers.first.identifier) + end + end +end diff --git a/spec/graphql/types/dissertation_type_spec.rb b/spec/graphql/types/dissertation_type_spec.rb new file mode 100644 index 000000000..e82600e53 --- /dev/null +++ b/spec/graphql/types/dissertation_type_spec.rb @@ -0,0 +1,87 @@ +require "rails_helper" + +describe DissertationType do + describe "fields" do + subject { described_class } + + it { is_expected.to have_field(:id).of_type(!types.ID) } + it { is_expected.to have_field(:type).of_type("String!") } + end + + describe "query dissertations", elasticsearch: true do + let!(:datacite_dissertations) { create_list(:doi, 2, types: { "resourceTypeGeneral" => "Text", "resourceType" => "Thesis" }, aasm_state: "findable") } + let!(:crossref_dissertations) { create_list(:doi, 2, types: { "resourceTypeGeneral" => "Text", "resourceType" => "Dissertation" }, agency: "Crossref", aasm_state: "findable") } + + before do + Doi.import + sleep 2 + end + + let(:query) do + %(query { + dissertations { + totalCount + registrationAgencies { + title + count + } + nodes { + id + registrationAgency + } + } + }) + end + + it "returns all dissertations" do + response = LupoSchema.execute(query).as_json + + expect(response.dig("data", "dissertations", "totalCount")).to eq(4) + expect(response.dig("data", "dissertations", "registrationAgencies")).to eq([{"count"=>2, "title"=>"Crossref"}, {"count"=>2, "title"=>"DataCite"}]) + expect(response.dig("data", "dissertations", "nodes").length).to eq(4) + expect(response.dig("data", "dissertations", "nodes", 0, "id")).to eq(datacite_dissertations.first.identifier) + expect(response.dig("data", "dissertations", "nodes", 0, "registrationAgency")).to eq("DataCite") + end + end + + describe "query dissertations by person", elasticsearch: true do + let!(:dissertations) { create_list(:doi, 3, types: { "resourceTypeGeneral" => "Text", "resourceType" => "Dissertation" }, aasm_state: "findable") } + let!(:dissertation) { create(:doi, types: { "resourceTypeGeneral" => "Text", "resourceType" => "Dissertation" }, aasm_state: "findable", creators: + [{ + "familyName" => "Garza", + "givenName" => "Kristian", + "name" => "Garza, Kristian", + "nameIdentifiers" => [{"nameIdentifier"=>"https://orcid.org/0000-0003-3484-6875", "nameIdentifierScheme"=>"ORCID", "schemeUri"=>"https://orcid.org"}], + "nameType" => "Personal", + }]) + } + before do + Doi.import + sleep 2 + end + + let(:query) do + %(query { + dissertations(userId: "https://orcid.org/0000-0003-1419-2405") { + totalCount + years { + id + count + } + nodes { + id + } + } + }) + end + + it "returns dissertations" do + response = LupoSchema.execute(query).as_json + + expect(response.dig("data", "dissertations", "totalCount")).to eq(3) + expect(response.dig("data", "dissertations", "years")).to eq([{"count"=>3, "id"=>"2011"}]) + expect(response.dig("data", "dissertations", "nodes").length).to eq(3) + expect(response.dig("data", "dissertations", "nodes", 0, "id")).to eq(dissertations.first.identifier) + end + end +end diff --git a/spec/graphql/types/instrument_type_spec.rb b/spec/graphql/types/instrument_type_spec.rb index 20347326a..46882f7d5 100644 --- a/spec/graphql/types/instrument_type_spec.rb +++ b/spec/graphql/types/instrument_type_spec.rb @@ -35,45 +35,4 @@ expect(response.dig("data", "instruments", "nodes", 0, "id")).to eq(instruments.first.identifier) end end - - # describe "query datasets by person", elasticsearch: true do - # let!(:instruments) { create_list(:doi, 3, types: { "resourceTypeGeneral" => "Other", "resourceType" => "Instrument" }, aasm_state: "findable") } - # let!(:instruments) { create(:doi, types: { "resourceTypeGeneral" => "Other", "resourceType" => "Instrument" }, aasm_state: "findable", creators: - # [{ - # "familyName" => "Garza", - # "givenName" => "Kristian", - # "name" => "Garza, Kristian", - # "nameIdentifiers" => [{"nameIdentifier"=>"https://orcid.org/0000-0003-3484-6875", "nameIdentifierScheme"=>"ORCID", "schemeUri"=>"https://orcid.org"}], - # "nameType" => "Personal", - # }]) - # } - # before do - # Doi.import - # sleep 2 - # end - - # let(:query) do - # %(query { - # instruments(userId: "https://orcid.org/0000-0003-1419-2405") { - # totalCount - # years { - # id - # count - # } - # nodes { - # id - # } - # } - # }) - # end - - # it "returns instruments" do - # response = LupoSchema.execute(query).as_json - - # expect(response.dig("data", "instruments", "totalCount")).to eq(3) - # expect(response.dig("data", "instruments", "years")).to eq([{"count"=>3, "id"=>"2011"}]) - # expect(response.dig("data", "instruments", "nodes").length).to eq(3) - # expect(response.dig("data", "instruments", "nodes", 0, "id")).to eq(instruments.first.identifier) - # end - # end end diff --git a/spec/graphql/types/journal_article_type_spec.rb b/spec/graphql/types/journal_article_type_spec.rb new file mode 100644 index 000000000..a2c5a3ca7 --- /dev/null +++ b/spec/graphql/types/journal_article_type_spec.rb @@ -0,0 +1,79 @@ +require "rails_helper" + +describe JournalArticleType do + describe "fields" do + subject { described_class } + + it { is_expected.to have_field(:id).of_type(!types.ID) } + it { is_expected.to have_field(:type).of_type("String!") } + end + + describe "query journal articles", elasticsearch: true do + let!(:journal_articles) { create_list(:doi, 3, types: { "resourceTypeGeneral" => "Text", "resourceType" => "JournalArticle" }, aasm_state: "findable") } + + before do + Doi.import + sleep 2 + end + + let(:query) do + %(query { + journalArticles { + totalCount + nodes { + id + } + } + }) + end + + it "returns all journal articles" do + response = LupoSchema.execute(query).as_json + + expect(response.dig("data", "journalArticles", "totalCount")).to eq(3) + expect(response.dig("data", "journalArticles", "nodes").length).to eq(3) + expect(response.dig("data", "journalArticles", "nodes", 0, "id")).to eq(journal_articles.first.identifier) + end + end + + describe "query journal articles by person", elasticsearch: true do + let!(:journal_articles) { create_list(:doi, 3, types: { "resourceTypeGeneral" => "Text", "resourceType" => "JournalArticle" }, aasm_state: "findable") } + let!(:journal_article) { create(:doi, types: { "resourceTypeGeneral" => "Text", "resourceType" => "JournalArticle" }, aasm_state: "findable", creators: + [{ + "familyName" => "Garza", + "givenName" => "Kristian", + "name" => "Garza, Kristian", + "nameIdentifiers" => [{"nameIdentifier"=>"https://orcid.org/0000-0003-3484-6875", "nameIdentifierScheme"=>"ORCID", "schemeUri"=>"https://orcid.org"}], + "nameType" => "Personal", + }]) + } + before do + Doi.import + sleep 2 + end + + let(:query) do + %(query { + journalArticles(userId: "https://orcid.org/0000-0003-1419-2405") { + totalCount + years { + id + count + } + nodes { + id + } + } + }) + end + + it "returns journal articles" do + response = LupoSchema.execute(query).as_json + + expect(response.dig("data", "journalArticles", "totalCount")).to eq(3) + expect(response.dig("data", "journalArticles", "years")).to eq([{"count"=>3, "id"=>"2011"}]) + expect(response.dig("data", "journalArticles", "nodes").length).to eq(3) + expect(response.dig("data", "journalArticles", "nodes", 0, "id")).to eq(journal_articles.first.identifier) + end + end +end diff --git a/spec/graphql/types/peer_review_type_spec.rb b/spec/graphql/types/peer_review_type_spec.rb new file mode 100644 index 000000000..ec7dfa1d7 --- /dev/null +++ b/spec/graphql/types/peer_review_type_spec.rb @@ -0,0 +1,79 @@ +require "rails_helper" + +describe PeerReviewType do + describe "fields" do + subject { described_class } + + it { is_expected.to have_field(:id).of_type(!types.ID) } + it { is_expected.to have_field(:type).of_type("String!") } + end + + describe "query peer reviews", elasticsearch: true do + let!(:peer_reviews) { create_list(:doi, 3, types: { "resourceTypeGeneral" => "Text", "resourceType" => "\"Peer review\"" }, aasm_state: "findable") } + + before do + Doi.import + sleep 2 + end + + let(:query) do + %(query { + peerReviews { + totalCount + nodes { + id + } + } + }) + end + + it "returns all peer reviews" do + response = LupoSchema.execute(query).as_json + + expect(response.dig("data", "peerReviews", "totalCount")).to eq(3) + expect(response.dig("data", "peerReviews", "nodes").length).to eq(3) + expect(response.dig("data", "peerReviews", "nodes", 0, "id")).to eq(peer_reviews.first.identifier) + end + end + + describe "query peer reviews by person", elasticsearch: true do + let!(:peer_reviews) { create_list(:doi, 3, types: { "resourceTypeGeneral" => "Text", "resourceType" => "\"Peer review\"" }, aasm_state: "findable") } + let!(:peer_review) { create(:doi, types: { "resourceTypeGeneral" => "Text", "resourceType" => "\"Peer review\"" }, aasm_state: "findable", creators: + [{ + "familyName" => "Garza", + "givenName" => "Kristian", + "name" => "Garza, Kristian", + "nameIdentifiers" => [{"nameIdentifier"=>"https://orcid.org/0000-0003-3484-6875", "nameIdentifierScheme"=>"ORCID", "schemeUri"=>"https://orcid.org"}], + "nameType" => "Personal", + }]) + } + before do + Doi.import + sleep 2 + end + + let(:query) do + %(query { + peerReviews(userId: "https://orcid.org/0000-0003-1419-2405") { + totalCount + years { + id + count + } + nodes { + id + } + } + }) + end + + it "returns peer reviews" do + response = LupoSchema.execute(query).as_json + + expect(response.dig("data", "peerReviews", "totalCount")).to eq(3) + expect(response.dig("data", "peerReviews", "years")).to eq([{"count"=>3, "id"=>"2011"}]) + expect(response.dig("data", "peerReviews", "nodes").length).to eq(3) + expect(response.dig("data", "peerReviews", "nodes", 0, "id")).to eq(peer_reviews.first.identifier) + end + end +end diff --git a/spec/graphql/types/preprint_type_spec.rb b/spec/graphql/types/preprint_type_spec.rb new file mode 100644 index 000000000..c26ef3e11 --- /dev/null +++ b/spec/graphql/types/preprint_type_spec.rb @@ -0,0 +1,87 @@ +require "rails_helper" + +describe PreprintType do + describe "fields" do + subject { described_class } + + it { is_expected.to have_field(:id).of_type(!types.ID) } + it { is_expected.to have_field(:type).of_type("String!") } + end + + describe "query preprints", elasticsearch: true do + let!(:preprints) { create_list(:doi, 2, types: { "resourceTypeGeneral" => "Text", "resourceType" => "Preprint" }, aasm_state: "findable") } + let!(:posted_contents) { create_list(:doi, 2, types: { "resourceTypeGeneral" => "Text", "resourceType" => "PostedContent" }, agency: "Crossref", aasm_state: "findable") } + + before do + Doi.import + sleep 2 + end + + let(:query) do + %(query { + preprints { + totalCount + registrationAgencies { + title + count + } + nodes { + id + type + } + } + }) + end + + it "returns all preprints" do + response = LupoSchema.execute(query).as_json + + expect(response.dig("data", "preprints", "totalCount")).to eq(4) + expect(response.dig("data", "preprints", "registrationAgencies")).to eq([{"count"=>2, "title"=>"Crossref"}, {"count"=>2, "title"=>"DataCite"}]) + expect(response.dig("data", "preprints", "nodes").length).to eq(4) + expect(response.dig("data", "preprints", "nodes", 0, "id")).to eq(preprints.first.identifier) + expect(response.dig("data", "preprints", "nodes", 0, "type")).to eq("Preprint") + end + end + + describe "query preprints by person", elasticsearch: true do + let!(:preprints) { create_list(:doi, 3, types: { "resourceTypeGeneral" => "Text", "resourceType" => "PostedContent" }, aasm_state: "findable") } + let!(:preprint) { create(:doi, types: { "resourceTypeGeneral" => "Text", "resourceType" => "PostedContent" }, aasm_state: "findable", creators: + [{ + "familyName" => "Garza", + "givenName" => "Kristian", + "name" => "Garza, Kristian", + "nameIdentifiers" => [{"nameIdentifier"=>"https://orcid.org/0000-0003-3484-6875", "nameIdentifierScheme"=>"ORCID", "schemeUri"=>"https://orcid.org"}], + "nameType" => "Personal", + }]) + } + before do + Doi.import + sleep 2 + end + + let(:query) do + %(query { + preprints(userId: "https://orcid.org/0000-0003-1419-2405") { + totalCount + years { + id + count + } + nodes { + id + } + } + }) + end + + it "returns preprints" do + response = LupoSchema.execute(query).as_json + + expect(response.dig("data", "preprints", "totalCount")).to eq(3) + expect(response.dig("data", "preprints", "years")).to eq([{"count"=>3, "id"=>"2011"}]) + expect(response.dig("data", "preprints", "nodes").length).to eq(3) + expect(response.dig("data", "preprints", "nodes", 0, "id")).to eq(preprints.first.identifier) + end + end +end diff --git a/spec/graphql/types/thesis_type_spec.rb b/spec/graphql/types/thesis_type_spec.rb deleted file mode 100644 index 12d10805e..000000000 --- a/spec/graphql/types/thesis_type_spec.rb +++ /dev/null @@ -1,79 +0,0 @@ -require "rails_helper" - -describe ThesisType do - describe "fields" do - subject { described_class } - - it { is_expected.to have_field(:id).of_type(!types.ID) } - it { is_expected.to have_field(:type).of_type("String!") } - end - - describe "query theses", elasticsearch: true do - let!(:theses) { create_list(:doi, 3, types: { "resourceTypeGeneral" => "Text", "resourceType" => "Thesis" }, aasm_state: "findable") } - - before do - Doi.import - sleep 2 - end - - let(:query) do - %(query { - theses { - totalCount - nodes { - id - } - } - }) - end - - it "returns all theses" do - response = LupoSchema.execute(query).as_json - - expect(response.dig("data", "theses", "totalCount")).to eq(3) - expect(response.dig("data", "theses", "nodes").length).to eq(3) - expect(response.dig("data", "theses", "nodes", 0, "id")).to eq(theses.first.identifier) - end - end - - describe "query theses by person", elasticsearch: true do - let!(:theses) { create_list(:doi, 3, types: { "resourceTypeGeneral" => "Text", "resourceType" => "Thesis" }, aasm_state: "findable") } - let!(:thesis) { create(:doi, types: { "resourceTypeGeneral" => "Text", "resourceType" => "Thesis" }, aasm_state: "findable", creators: - [{ - "familyName" => "Garza", - "givenName" => "Kristian", - "name" => "Garza, Kristian", - "nameIdentifiers" => [{"nameIdentifier"=>"https://orcid.org/0000-0003-3484-6875", "nameIdentifierScheme"=>"ORCID", "schemeUri"=>"https://orcid.org"}], - "nameType" => "Personal", - }]) - } - before do - Doi.import - sleep 2 - end - - let(:query) do - %(query { - theses(userId: "https://orcid.org/0000-0003-1419-2405") { - totalCount - years { - id - count - } - nodes { - id - } - } - }) - end - - it "returns theses" do - response = LupoSchema.execute(query).as_json - - expect(response.dig("data", "theses", "totalCount")).to eq(3) - expect(response.dig("data", "theses", "years")).to eq([{"count"=>3, "id"=>"2011"}]) - expect(response.dig("data", "theses", "nodes").length).to eq(3) - expect(response.dig("data", "theses", "nodes", 0, "id")).to eq(theses.first.identifier) - end - end -end diff --git a/spec/requests/dois_spec.rb b/spec/requests/dois_spec.rb index f536e11ef..ce855e441 100644 --- a/spec/requests/dois_spec.rb +++ b/spec/requests/dois_spec.rb @@ -231,22 +231,22 @@ end end - describe 'GET /dois for theses', elasticsearch: true, vcr: true do - let!(:dois) { create_list(:doi, 3, types: { "resourceTypeGeneral" => "Text", "resourceType" => "Thesis" }, client: client, aasm_state: "findable") } + describe 'GET /dois for dissertations', elasticsearch: true, vcr: true do + let!(:dois) { create_list(:doi, 3, types: { "resourceTypeGeneral" => "Text", "resourceType" => "Dissertation" }, client: client, aasm_state: "findable") } before do Doi.import sleep 3 end - it 'filter for theses' do - get "/dois?resource-type=thesis", nil, headers + it 'filter for dissertations' do + get "/dois?resource-type=Dissertation", nil, headers expect(last_response.status).to eq(200) expect(json['data'].size).to eq(3) expect(json.dig('meta', 'total')).to eq(3) expect(json.dig('data', 0, 'attributes', 'publicationYear')).to eq(2011) - expect(json.dig('data', 0, 'attributes', 'types')).to eq("resourceType"=>"Thesis", "resourceTypeGeneral"=>"Text") + expect(json.dig('data', 0, 'attributes', 'types')).to eq("resourceType"=>"Dissertation", "resourceTypeGeneral"=>"Text") end end @@ -259,7 +259,7 @@ end it 'filter for theses' do - get "/dois?resource-type=instrument", nil, headers + get "/dois?resource-type=Instrument", nil, headers expect(last_response.status).to eq(200) expect(json['data'].size).to eq(3)