Skip to content
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

Data dashboard GraphQL API #2077

Merged
merged 34 commits into from
Oct 28, 2024
Merged

Data dashboard GraphQL API #2077

merged 34 commits into from
Oct 28, 2024

Conversation

caiosba
Copy link
Contributor

@caiosba caiosba commented Oct 10, 2024

Description

GraphQL API responsible for returning the workspace statistics for the data dashboard. Steps:

  • Implement GraphQL field under TeamType, which returns an object of a new GraphQL type TeamStatisticsType
  • Implement a library TeamStatistics, which is exposed in GraphQL by the type TeamStatisticsType, which implements one method for each data point
  • Implement the logic for each data point exposed in the GraphQL API:
    • number_of_articles_created_by_date
    • number_of_articles_updated_by_date
    • number_of_explainers_created
    • number_of_fact_checks_created
    • number_of_published_fact_checks
    • number_of_fact_checks_by_rating
    • top_articles_sent
    • top_articles_tags
    • number_of_messages
    • number_of_conversations
    • number_of_messages_by_date
    • number_of_conversations_by_date
    • number_of_search_results_by_feedback_type
    • average_response_time
    • number_of_unique_users
    • number_of_total_users
    • number_of_returning_users
    • number_of_subscribers
    • number_of_new_subscribers
    • number_of_newsletters_sent
    • number_of_newsletters_delivered
    • number_of_media_received_by_media_type
    • top_media_tags
    • top_requested_media_clusters
    • number_of_articles_sent
    • number_of_matched_results_by_article_type
  • Make sure fields are computed in parallel
  • Check for permissions
  • Implement automated tests

References: CV2-5389, CV2-4111.

How has this been tested?

Automated tests implemented for all methods. Make sure that all fields filter by team, date and optionally language and platform (for tiplines).

Checklist

  • I have performed a self-review of my own code
  • I have added unit and feature tests, if the PR implements a new feature or otherwise would benefit from additional testing
  • I have added regression tests, if the PR fixes a bug
  • I have added logging, exception reporting, and custom tracing with any additional information required for debugging
  • I considered secure coding practices when writing this code. Any security concerns are noted above.
  • I have commented my code in hard-to-understand areas, if any
  • I have made needed changes to the README
  • My changes generate no new warnings
  • If I added a third party module, I included a rationale for doing so and followed our current guidelines

@caiosba caiosba marked this pull request as ready for review October 28, 2024 03:33
@caiosba caiosba merged commit f6b5675 into develop Oct 28, 2024
11 checks passed
@caiosba caiosba deleted the epic/CV2-4111-workspace-analytics branch October 28, 2024 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants