Skip to content

Commit

Permalink
Expose moderation_scores field on holdable itesm
Browse files Browse the repository at this point in the history
  • Loading branch information
NuckChorris committed Feb 2, 2025
1 parent 1198aca commit a8a065b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
7 changes: 4 additions & 3 deletions app/graphql/types/comment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,10 @@ class Types::Comment < Types::BaseObject
null: true,
description: 'The parent comment if this comment was a reply to another.'

field :held_reason, Types::Enum::HeldReason,
null: true,
description: 'The reason why this comment is held for manual moderator approval.'
field :moderation_scores, Types::Map, null: true do
directive Directives::SitePermission, required: 'community_mod'
description 'The moderation scores for this post.'
end

field :likes, Types::Profile.connection_type, null: false do
description 'Users who liked this comment'
Expand Down
7 changes: 4 additions & 3 deletions app/graphql/types/media_reaction.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,10 @@ def library_entry
null: false,
description: 'The reaction text related to a media.'

field :held_reason, Types::Enum::HeldReason,
null: true,
description: 'The reason why this reaction is held for manual moderator approval.'
field :moderation_scores, Types::Map, null: true do
directive Directives::SitePermission, required: 'community_mod'
description 'The moderation scores for this post.'
end

field :likes, Types::Profile.connection_type, null: false do
description 'Users that have liked this reaction'
Expand Down
7 changes: 4 additions & 3 deletions app/graphql/types/post.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,10 @@ class Types::Post < Types::BaseObject
null: true,
description: 'The reason why this post was locked.'

field :held_reason, Types::Enum::HeldReason,
null: true,
description: 'The reason why this post is held for manual moderator approval.'
field :moderation_scores, Types::Map, null: true do
directive Directives::SitePermission, required: 'community_mod'
description 'The moderation scores for this post.'
end

field :comments, Types::Comment.connection_type, null: false do
description 'All comments on this post'
Expand Down

0 comments on commit a8a065b

Please sign in to comment.