-
Notifications
You must be signed in to change notification settings - Fork 11
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
CV2-3777: expose TiplineRequestType #1692
CV2-3777: expose TiplineRequestType #1692
Conversation
app/graph/types/query_type.rb
Outdated
field :tipline_request, | ||
TiplineRequestType, | ||
description: | ||
"Information about tipline request, given its id", | ||
null: true do | ||
argument :id, GraphQL::Types::String, required: true | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check permissions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Used same permission for dynamic_annotation_field
calling.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that permission only applies to global API keys, so it won't work from the web client for regular users, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why we need this API endpoint anyway? We always we want to get the requests under the scope of an item, no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just talked to Sawy - we can delete this block.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deleted
app/models/bot/smooch.rb
Outdated
self.send_report_to_user(uid, data, pm, lang, 'fact_check_report') | ||
end | ||
unless field_name.blank? | ||
a = pm.get_annotations('smooch').last.load |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of getting the annotation here, please pass it as a parameter to the method
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
…report-delivery-state-in-graph-ql-api
…report-delivery-state-in-graph-ql-api
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just added two comments, Sawy. Also, please check if the frontend still works with these changes. If not, let's wait to merge this branch until the backend changes are in place too.
app/graph/types/query_type.rb
Outdated
field :tipline_request, | ||
TiplineRequestType, | ||
description: | ||
"Information about tipline request, given its id", | ||
null: true do | ||
argument :id, GraphQL::Types::String, required: true | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that permission only applies to global API keys, so it won't work from the web client for regular users, right?
app/graph/types/query_type.rb
Outdated
field :tipline_request, | ||
TiplineRequestType, | ||
description: | ||
"Information about tipline request, given its id", | ||
null: true do | ||
argument :id, GraphQL::Types::String, required: true | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why we need this API endpoint anyway? We always we want to get the requests under the scope of an item, no?
…report-delivery-state-in-graph-ql-api
…report-delivery-state-in-graph-ql-api
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sawy, please just add a test for the new field:
Unconvered lines in app/models/concerns/smooch_fields.rb: 81, 82
Good to merge after that.
Code Climate has analyzed commit dce137f and detected 0 issues on this pull request. The test coverage on the diff in this pull request is 100.0% (100% is the threshold). This pull request will bring the total coverage in the repository to 100.0% (0.0% change). View more on Code Climate. |
Description
report_sent_at
,report_correction_sent_at
&smooch_request_type
References: CV2-3777
How has this been tested?
Implemented automated tests.
Things to pay attention to during code review
Please describe parts of the change that require extra attention during code review, for example:
Checklist