Add new GraphQL types for budget investments
- added 2 new types - modified the models to get data through graphQL - modified the corresponding spec - also testing that hidden comments do not show up - modified comments specs bc now it returns comments on budget investments
This commit is contained in:
@@ -38,7 +38,10 @@ class Comment < ApplicationRecord
|
||||
scope :sort_by_flags, -> { order(flags_count: :desc, updated_at: :desc) }
|
||||
scope :public_for_api, -> do
|
||||
not_valuations
|
||||
.where(commentable: [Debate.public_for_api, Proposal.public_for_api, Poll.public_for_api])
|
||||
.where(commentable: [Debate.public_for_api,
|
||||
Proposal.public_for_api,
|
||||
Poll.public_for_api,
|
||||
Budget::Investment.public_for_api])
|
||||
end
|
||||
|
||||
scope :sort_by_most_voted, -> { order(confidence_score: :desc, created_at: :desc) }
|
||||
|
||||
Reference in New Issue
Block a user