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

Add word_type_filter to get_trending_words #3895

Merged
merged 1 commit into from
Aug 22, 2023

Conversation

IvanIvanoff
Copy link
Member

@IvanIvanoff IvanIvanoff commented Aug 22, 2023

Changes

  • Add project field in the trending words result. It is filled when the word refers to a project.
  • Add wordTypeFilter argument accepting one of: PROJECT, NON_PROJECT or ALL. Defaults to ALL if not provided. This allows to filter and return only those words that are a project, or are not project, or just return all.
{
  getTrendingWords(wordTypeFilter: PROEJECT, size: 10, from: "2023-08-02T11:00:00Z", to: "2023-08-02T12:00:00Z", interval: "1h") {
    datetime
    topWords {
      word
      project {
        slug
      }
      score
    }
  }
}

Ticket

Checklist:

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have tried to find clearer solution before commenting hard-to-understand parts of code
  • I have added tests that prove my fix is effective or that my feature works

@IvanIvanoff IvanIvanoff force-pushed the trending-words-project-filter branch 2 times, most recently from 1ac9591 to 58fa44c Compare August 22, 2023 12:43
@IvanIvanoff IvanIvanoff merged commit d1248ff into master Aug 22, 2023
1 check passed
@delete-merged-branch delete-merged-branch bot deleted the trending-words-project-filter branch August 22, 2023 13:53
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.

2 participants