Commit e1186959 authored by charlieablett's avatar charlieablett

Make descriptions consistent

For boolean values, as much as possible, try to frame it as
'what does this field do?'

e.g. 'Indicates repository has a Git repository'
parent a5b6245d
...@@ -5,10 +5,9 @@ module Mutations ...@@ -5,10 +5,9 @@ module Mutations
class Toggle < Base class Toggle < Base
graphql_name 'ToggleAwardEmoji' graphql_name 'ToggleAwardEmoji'
field :toggledOn, field :toggledOn, GraphQL::BOOLEAN_TYPE, null: false,
GraphQL::BOOLEAN_TYPE, description: 'Indicates the status of the emoji. ' \
null: false, 'True if the toggle awarded the emoji, and false if the toggle removed the emoji.'
description: 'True when the emoji was awarded, false when it was removed'
def resolve(args) def resolve(args)
awardable = authorized_find!(id: args[:awardable_id]) awardable = authorized_find!(id: args[:awardable_id])
......
...@@ -69,7 +69,7 @@ module Types ...@@ -69,7 +69,7 @@ module Types
field :participants, Types::UserType.connection_type, null: true, complexity: 5, field :participants, Types::UserType.connection_type, null: true, complexity: 5,
description: 'List of participants in the issue' description: 'List of participants in the issue'
field :subscribed, GraphQL::BOOLEAN_TYPE, method: :subscribed?, null: false, complexity: 5, field :subscribed, GraphQL::BOOLEAN_TYPE, method: :subscribed?, null: false, complexity: 5,
description: 'Boolean flag for whether the currently logged in user is subscribed to this issue' description: 'Indicates the currently logged in user is subscribed to the issue'
field :time_estimate, GraphQL::INT_TYPE, null: false, field :time_estimate, GraphQL::INT_TYPE, null: false,
description: 'Time estimate of the issue' description: 'Time estimate of the issue'
field :total_time_spent, GraphQL::INT_TYPE, null: false, field :total_time_spent, GraphQL::INT_TYPE, null: false,
......
...@@ -25,7 +25,7 @@ module Types ...@@ -25,7 +25,7 @@ module Types
kword_args = kword_args.reverse_merge( kword_args = kword_args.reverse_merge(
name: name, name: name,
type: GraphQL::BOOLEAN_TYPE, type: GraphQL::BOOLEAN_TYPE,
description: "Whether or not a user can perform `#{name}` on this resource", description: "Indicates the user can perform `#{name}` on this resource",
null: false) null: false)
field(**kword_args) # rubocop:disable Graphql/Descriptions field(**kword_args) # rubocop:disable Graphql/Descriptions
......
...@@ -46,7 +46,7 @@ module Types ...@@ -46,7 +46,7 @@ module Types
description: 'Timestamp of the project last activity' description: 'Timestamp of the project last activity'
field :archived, GraphQL::BOOLEAN_TYPE, null: true, field :archived, GraphQL::BOOLEAN_TYPE, null: true,
description: 'Archived status of the project' description: 'Indicates the archived status of the project'
field :visibility, GraphQL::STRING_TYPE, null: true, field :visibility, GraphQL::STRING_TYPE, null: true,
description: 'Visibility of the project' description: 'Visibility of the project'
......
This diff is collapsed.
...@@ -210,7 +210,7 @@ class MergeRequestPermissionsType < BasePermissionType ...@@ -210,7 +210,7 @@ class MergeRequestPermissionsType < BasePermissionType
abilities :admin_merge_request, :update_merge_request, :create_note abilities :admin_merge_request, :update_merge_request, :create_note
ability_field :resolve_note, ability_field :resolve_note,
description: 'Whether or not the user can resolve disussions on the merge request' description: 'Indicates the user can resolve discussions on the merge request'
permission_field :push_to_source_branch, method: :can_push_to_source_branch? permission_field :push_to_source_branch, method: :can_push_to_source_branch?
end end
``` ```
......
...@@ -98,7 +98,7 @@ module Types ...@@ -98,7 +98,7 @@ module Types
method: :subscribed?, method: :subscribed?,
null: false, null: false,
complexity: 5, complexity: 5,
description: 'Boolean flag for whether the currently logged in user is subscribed to this epic' description: 'Indicates the currently logged in user is subscribed to the epic'
field :issues, field :issues,
Types::EpicIssueType.connection_type, Types::EpicIssueType.connection_type,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment