Skip to content

Commit

Permalink
CodeClimate
Browse files Browse the repository at this point in the history
  • Loading branch information
jazairi committed Aug 23, 2024
1 parent 1c28fa1 commit b28f37a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions app/graphql/types/detectors_type.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

module Types
class DetectorsType < Types::BaseObject
field :journals, [Types::JournalsType]
field :standard_identifiers, [Types::StandardIdentifiersType]
field :journals, [Types::JournalsType], description: 'Information about journals detected in the search term'
field :standard_identifiers, [Types::StandardIdentifiersType], description: 'Currently supported: ISBN, ISSN, PMID, DOI'

def standard_identifiers
Detector::StandardIdentifiers.new(@object).identifiers.map do |identifier|
Expand Down
4 changes: 2 additions & 2 deletions app/graphql/types/journals_type.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module Types
class JournalsType < Types::BaseObject
field :additional_info, GraphQL::Types::JSON
field :title, String, null: false
field :additional_info, GraphQL::Types::JSON, description: 'Additional information about the detected journal'
field :title, String, null: false, description: 'Title of the detected journal'
end
end
6 changes: 3 additions & 3 deletions app/graphql/types/standard_identifiers_type.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

module Types
class StandardIdentifiersType < Types::BaseObject
field :details, DetailsType
field :kind, String, null: false
field :value, String, null: false
field :details, DetailsType, description: 'Additional information about the detected identifier(s)'
field :kind, String, null: false, description: 'The type of identifier detected (one of ISBN, ISSN, PMID, DOI)'
field :value, String, null: false, description: 'The identifier detected in the search term'

# details does external lookups and should only be run if the fields
# have been explicitly requested
Expand Down

0 comments on commit b28f37a

Please sign in to comment.