Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for new publisher object in graphql #1075

Merged
merged 8 commits into from
Feb 27, 2024
138 changes: 84 additions & 54 deletions app/graphql/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -272,9 +272,9 @@ type Audiovisual implements DoiItem {
publicationYear: Int

"""
The name of the entity that holds, archives, publishes prints, distributes, releases, issues, or produces the resource
The entity that holds, archives, publishes prints, distributes, releases, issues, or produces the resource
"""
publisher: String @deprecated(reason: "This field will change structure on February 27, 2024. Applications that use it will need to be updated to the new structure by then. For details: https://support.datacite.org/docs/publisher-changes-in-schema-45")
publisher: Publisher

"""
Total number of references
Expand Down Expand Up @@ -607,9 +607,9 @@ type Book implements DoiItem {
publicationYear: Int

"""
The name of the entity that holds, archives, publishes prints, distributes, releases, issues, or produces the resource
The entity that holds, archives, publishes prints, distributes, releases, issues, or produces the resource
"""
publisher: String @deprecated(reason: "This field will change structure on February 27, 2024. Applications that use it will need to be updated to the new structure by then. For details: https://support.datacite.org/docs/publisher-changes-in-schema-45")
publisher: Publisher

"""
Total number of references
Expand Down Expand Up @@ -891,9 +891,9 @@ type BookChapter implements DoiItem {
publicationYear: Int

"""
The name of the entity that holds, archives, publishes prints, distributes, releases, issues, or produces the resource
The entity that holds, archives, publishes prints, distributes, releases, issues, or produces the resource
"""
publisher: String @deprecated(reason: "This field will change structure on February 27, 2024. Applications that use it will need to be updated to the new structure by then. For details: https://support.datacite.org/docs/publisher-changes-in-schema-45")
publisher: Publisher

"""
Total number of references
Expand Down Expand Up @@ -1325,9 +1325,9 @@ type Collection implements DoiItem {
publicationYear: Int

"""
The name of the entity that holds, archives, publishes prints, distributes, releases, issues, or produces the resource
The entity that holds, archives, publishes prints, distributes, releases, issues, or produces the resource
"""
publisher: String @deprecated(reason: "This field will change structure on February 27, 2024. Applications that use it will need to be updated to the new structure by then. For details: https://support.datacite.org/docs/publisher-changes-in-schema-45")
publisher: Publisher

"""
Total number of references
Expand Down Expand Up @@ -1660,9 +1660,9 @@ type ConferencePaper implements DoiItem {
publicationYear: Int

"""
The name of the entity that holds, archives, publishes prints, distributes, releases, issues, or produces the resource
The entity that holds, archives, publishes prints, distributes, releases, issues, or produces the resource
"""
publisher: String @deprecated(reason: "This field will change structure on February 27, 2024. Applications that use it will need to be updated to the new structure by then. For details: https://support.datacite.org/docs/publisher-changes-in-schema-45")
publisher: Publisher

"""
Total number of references
Expand Down Expand Up @@ -2287,9 +2287,9 @@ type DataManagementPlan implements DoiItem {
publicationYear: Int

"""
The name of the entity that holds, archives, publishes prints, distributes, releases, issues, or produces the resource
The entity that holds, archives, publishes prints, distributes, releases, issues, or produces the resource
"""
publisher: String @deprecated(reason: "This field will change structure on February 27, 2024. Applications that use it will need to be updated to the new structure by then. For details: https://support.datacite.org/docs/publisher-changes-in-schema-45")
publisher: Publisher

"""
Total number of references
Expand Down Expand Up @@ -2622,9 +2622,9 @@ type DataPaper implements DoiItem {
publicationYear: Int

"""
The name of the entity that holds, archives, publishes prints, distributes, releases, issues, or produces the resource
The entity that holds, archives, publishes prints, distributes, releases, issues, or produces the resource
"""
publisher: String @deprecated(reason: "This field will change structure on February 27, 2024. Applications that use it will need to be updated to the new structure by then. For details: https://support.datacite.org/docs/publisher-changes-in-schema-45")
publisher: Publisher

"""
Total number of references
Expand Down Expand Up @@ -2957,9 +2957,9 @@ type Dataset implements DoiItem {
publicationYear: Int

"""
The name of the entity that holds, archives, publishes prints, distributes, releases, issues, or produces the resource
The entity that holds, archives, publishes prints, distributes, releases, issues, or produces the resource
"""
publisher: String @deprecated(reason: "This field will change structure on February 27, 2024. Applications that use it will need to be updated to the new structure by then. For details: https://support.datacite.org/docs/publisher-changes-in-schema-45")
publisher: Publisher

"""
Total number of references
Expand Down Expand Up @@ -3410,9 +3410,9 @@ type Dissertation implements DoiItem {
publicationYear: Int

"""
The name of the entity that holds, archives, publishes prints, distributes, releases, issues, or produces the resource
The entity that holds, archives, publishes prints, distributes, releases, issues, or produces the resource
"""
publisher: String @deprecated(reason: "This field will change structure on February 27, 2024. Applications that use it will need to be updated to the new structure by then. For details: https://support.datacite.org/docs/publisher-changes-in-schema-45")
publisher: Publisher

"""
Total number of references
Expand Down Expand Up @@ -3748,9 +3748,9 @@ interface DoiItem {
publicationYear: Int

"""
The name of the entity that holds, archives, publishes prints, distributes, releases, issues, or produces the resource
The entity that holds, archives, publishes prints, distributes, releases, issues, or produces the resource
"""
publisher: String @deprecated(reason: "This field will change structure on February 27, 2024. Applications that use it will need to be updated to the new structure by then. For details: https://support.datacite.org/docs/publisher-changes-in-schema-45")
publisher: Publisher

"""
Total number of references
Expand Down Expand Up @@ -4082,9 +4082,9 @@ type Event implements DoiItem {
publicationYear: Int

"""
The name of the entity that holds, archives, publishes prints, distributes, releases, issues, or produces the resource
The entity that holds, archives, publishes prints, distributes, releases, issues, or produces the resource
"""
publisher: String @deprecated(reason: "This field will change structure on February 27, 2024. Applications that use it will need to be updated to the new structure by then. For details: https://support.datacite.org/docs/publisher-changes-in-schema-45")
publisher: Publisher

"""
Total number of references
Expand Down Expand Up @@ -4395,9 +4395,9 @@ type EventData implements DoiItem {
publicationYear: Int

"""
The name of the entity that holds, archives, publishes prints, distributes, releases, issues, or produces the resource
The entity that holds, archives, publishes prints, distributes, releases, issues, or produces the resource
"""
publisher: String @deprecated(reason: "This field will change structure on February 27, 2024. Applications that use it will need to be updated to the new structure by then. For details: https://support.datacite.org/docs/publisher-changes-in-schema-45")
publisher: Publisher

"""
Total number of references
Expand Down Expand Up @@ -5004,9 +5004,9 @@ type Image implements DoiItem {
publicationYear: Int

"""
The name of the entity that holds, archives, publishes prints, distributes, releases, issues, or produces the resource
The entity that holds, archives, publishes prints, distributes, releases, issues, or produces the resource
"""
publisher: String @deprecated(reason: "This field will change structure on February 27, 2024. Applications that use it will need to be updated to the new structure by then. For details: https://support.datacite.org/docs/publisher-changes-in-schema-45")
publisher: Publisher

"""
Total number of references
Expand Down Expand Up @@ -5339,9 +5339,9 @@ type Instrument implements DoiItem {
publicationYear: Int

"""
The name of the entity that holds, archives, publishes prints, distributes, releases, issues, or produces the resource
The entity that holds, archives, publishes prints, distributes, releases, issues, or produces the resource
"""
publisher: String @deprecated(reason: "This field will change structure on February 27, 2024. Applications that use it will need to be updated to the new structure by then. For details: https://support.datacite.org/docs/publisher-changes-in-schema-45")
publisher: Publisher

"""
Total number of references
Expand Down Expand Up @@ -5674,9 +5674,9 @@ type InteractiveResource implements DoiItem {
publicationYear: Int

"""
The name of the entity that holds, archives, publishes prints, distributes, releases, issues, or produces the resource
The entity that holds, archives, publishes prints, distributes, releases, issues, or produces the resource
"""
publisher: String @deprecated(reason: "This field will change structure on February 27, 2024. Applications that use it will need to be updated to the new structure by then. For details: https://support.datacite.org/docs/publisher-changes-in-schema-45")
publisher: Publisher

"""
Total number of references
Expand Down Expand Up @@ -6014,9 +6014,9 @@ type JournalArticle implements DoiItem {
publicationYear: Int

"""
The name of the entity that holds, archives, publishes prints, distributes, releases, issues, or produces the resource
The entity that holds, archives, publishes prints, distributes, releases, issues, or produces the resource
"""
publisher: String @deprecated(reason: "This field will change structure on February 27, 2024. Applications that use it will need to be updated to the new structure by then. For details: https://support.datacite.org/docs/publisher-changes-in-schema-45")
publisher: Publisher

"""
Total number of references
Expand Down Expand Up @@ -6645,9 +6645,9 @@ type Model implements DoiItem {
publicationYear: Int

"""
The name of the entity that holds, archives, publishes prints, distributes, releases, issues, or produces the resource
The entity that holds, archives, publishes prints, distributes, releases, issues, or produces the resource
"""
publisher: String @deprecated(reason: "This field will change structure on February 27, 2024. Applications that use it will need to be updated to the new structure by then. For details: https://support.datacite.org/docs/publisher-changes-in-schema-45")
publisher: Publisher

"""
Total number of references
Expand Down Expand Up @@ -7177,9 +7177,9 @@ type Other implements DoiItem {
publicationYear: Int

"""
The name of the entity that holds, archives, publishes prints, distributes, releases, issues, or produces the resource
The entity that holds, archives, publishes prints, distributes, releases, issues, or produces the resource
"""
publisher: String @deprecated(reason: "This field will change structure on February 27, 2024. Applications that use it will need to be updated to the new structure by then. For details: https://support.datacite.org/docs/publisher-changes-in-schema-45")
publisher: Publisher

"""
Total number of references
Expand Down Expand Up @@ -7537,9 +7537,9 @@ type PeerReview implements DoiItem {
publicationYear: Int

"""
The name of the entity that holds, archives, publishes prints, distributes, releases, issues, or produces the resource
The entity that holds, archives, publishes prints, distributes, releases, issues, or produces the resource
"""
publisher: String @deprecated(reason: "This field will change structure on February 27, 2024. Applications that use it will need to be updated to the new structure by then. For details: https://support.datacite.org/docs/publisher-changes-in-schema-45")
publisher: Publisher

"""
Total number of references
Expand Down Expand Up @@ -8009,9 +8009,9 @@ type PhysicalObject implements DoiItem {
publicationYear: Int

"""
The name of the entity that holds, archives, publishes prints, distributes, releases, issues, or produces the resource
The entity that holds, archives, publishes prints, distributes, releases, issues, or produces the resource
"""
publisher: String @deprecated(reason: "This field will change structure on February 27, 2024. Applications that use it will need to be updated to the new structure by then. For details: https://support.datacite.org/docs/publisher-changes-in-schema-45")
publisher: Publisher

"""
Total number of references
Expand Down Expand Up @@ -8397,9 +8397,9 @@ type Preprint implements DoiItem {
publicationYear: Int

"""
The name of the entity that holds, archives, publishes prints, distributes, releases, issues, or produces the resource
The entity that holds, archives, publishes prints, distributes, releases, issues, or produces the resource
"""
publisher: String @deprecated(reason: "This field will change structure on February 27, 2024. Applications that use it will need to be updated to the new structure by then. For details: https://support.datacite.org/docs/publisher-changes-in-schema-45")
publisher: Publisher

"""
Total number of references
Expand Down Expand Up @@ -8732,9 +8732,9 @@ type Publication implements DoiItem {
publicationYear: Int

"""
The name of the entity that holds, archives, publishes prints, distributes, releases, issues, or produces the resource
The entity that holds, archives, publishes prints, distributes, releases, issues, or produces the resource
"""
publisher: String @deprecated(reason: "This field will change structure on February 27, 2024. Applications that use it will need to be updated to the new structure by then. For details: https://support.datacite.org/docs/publisher-changes-in-schema-45")
publisher: Publisher

"""
Total number of references
Expand Down Expand Up @@ -8910,6 +8910,36 @@ type PublicationEdge {
node: Publication
}

"""
Publisher information
"""
type Publisher {
"""
Language
"""
lang: String

"""
The name of the publisher
"""
name: String

"""
Uniquely identifies the publisher, according to various schemes
"""
publisherIdentifier: String

"""
The name of the publisher identifier scheme
"""
publisherIdentifierScheme: String

"""
The URI of the publisher identifier scheme
"""
schemeUri: String
}

type Query {
_service: _Service!
actor(id: ID!): ActorItem!
Expand Down Expand Up @@ -9712,9 +9742,9 @@ type Service implements DoiItem {
publicationYear: Int

"""
The name of the entity that holds, archives, publishes prints, distributes, releases, issues, or produces the resource
The entity that holds, archives, publishes prints, distributes, releases, issues, or produces the resource
"""
publisher: String @deprecated(reason: "This field will change structure on February 27, 2024. Applications that use it will need to be updated to the new structure by then. For details: https://support.datacite.org/docs/publisher-changes-in-schema-45")
publisher: Publisher

"""
Total number of references
Expand Down Expand Up @@ -10048,9 +10078,9 @@ type Software implements DoiItem {
publicationYear: Int

"""
The name of the entity that holds, archives, publishes prints, distributes, releases, issues, or produces the resource
The entity that holds, archives, publishes prints, distributes, releases, issues, or produces the resource
"""
publisher: String @deprecated(reason: "This field will change structure on February 27, 2024. Applications that use it will need to be updated to the new structure by then. For details: https://support.datacite.org/docs/publisher-changes-in-schema-45")
publisher: Publisher

"""
Total number of references
Expand Down Expand Up @@ -10414,9 +10444,9 @@ type Sound implements DoiItem {
publicationYear: Int

"""
The name of the entity that holds, archives, publishes prints, distributes, releases, issues, or produces the resource
The entity that holds, archives, publishes prints, distributes, releases, issues, or produces the resource
"""
publisher: String @deprecated(reason: "This field will change structure on February 27, 2024. Applications that use it will need to be updated to the new structure by then. For details: https://support.datacite.org/docs/publisher-changes-in-schema-45")
publisher: Publisher

"""
Total number of references
Expand Down Expand Up @@ -10960,9 +10990,9 @@ type Work implements DoiItem {
publicationYear: Int

"""
The name of the entity that holds, archives, publishes prints, distributes, releases, issues, or produces the resource
The entity that holds, archives, publishes prints, distributes, releases, issues, or produces the resource
"""
publisher: String @deprecated(reason: "This field will change structure on February 27, 2024. Applications that use it will need to be updated to the new structure by then. For details: https://support.datacite.org/docs/publisher-changes-in-schema-45")
publisher: Publisher

"""
Total number of references
Expand Down Expand Up @@ -11317,9 +11347,9 @@ type Workflow implements DoiItem {
publicationYear: Int

"""
The name of the entity that holds, archives, publishes prints, distributes, releases, issues, or produces the resource
The entity that holds, archives, publishes prints, distributes, releases, issues, or produces the resource
"""
publisher: String @deprecated(reason: "This field will change structure on February 27, 2024. Applications that use it will need to be updated to the new structure by then. For details: https://support.datacite.org/docs/publisher-changes-in-schema-45")
publisher: Publisher

"""
Total number of references
Expand Down
15 changes: 3 additions & 12 deletions app/graphql/types/doi_item.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,10 @@ class CitationFormat < GraphQL::Schema::Enum
description:
"The year when the data was or will be made publicly available"
field :publisher,
String,
PublisherType,
null: true,
description:
"The name of the entity that holds, archives, publishes prints, distributes, releases, issues, or produces the resource",
deprecation_reason:
"This field will change structure on February 27, 2024. Applications that use it will need to be updated to the new structure by then. For details: https://support.datacite.org/docs/publisher-changes-in-schema-45"
"The entity that holds, archives, publishes prints, distributes, releases, issues, or produces the resource"
field :subjects,
[SubjectType],
null: true,
Expand Down Expand Up @@ -582,14 +580,7 @@ def identifiers
end

def publisher
case object.publisher
when Hash
object.publisher["name"]
when String
object.publisher
else
object.publisher
end
object.try(:publisher_obj) || object.try(:publisher)
end

def bibtex
Expand Down
Loading