Skip to content

INS-1699 - #170

Merged
JoonLeeNIH merged 1 commit into
3.5.0from
INS-1701
Jul 30, 2026
Merged

INS-1699#170
JoonLeeNIH merged 1 commit into
3.5.0from
INS-1701

Conversation

@JoonLeeNIH

@JoonLeeNIH JoonLeeNIH commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Overview

Added resource counts for homepage stats.

Change Details (Specifics)

Added GraphQL field for returning resource counts, with an accompanying controller function.

Related Ticket(s)

https://tracker.nci.nih.gov/browse/INS-1699

Copilot AI review requested due to automatic review settings July 30, 2026 19:39
@JoonLeeNIH JoonLeeNIH changed the title Added homepage resource counts INS-1699 Jul 30, 2026
@JoonLeeNIH
JoonLeeNIH requested a review from RuoxiZhang08 July 30, 2026 19:41

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Not ready to approve

The new resolver can currently throw an unhelpful NullPointerException if num_resources is absent/null, and should handle that case explicitly.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.

Pull request overview

Adds a new homepage stat to the private ES GraphQL API by exposing a numberOfResources query field and wiring it to an OpenSearch-backed resolver in PrivateESDataFetcher.

Changes:

  • Added numberOfResources: Int to the private ES GraphQL QueryType.
  • Wired a new numberOfResources data fetcher in PrivateESDataFetcher.
  • Implemented numberOfResources() to read num_resources from the home_stats OpenSearch document.
File summaries
File Description
src/main/resources/graphql/ins-private-es.graphql Exposes numberOfResources on the private ES GraphQL QueryType.
src/main/java/gov/nih/nci/bento_ri/model/PrivateESDataFetcher.java Adds a resolver + runtime wiring to fetch num_resources from the home stats OpenSearch endpoint.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 2
  • Review effort level: Low

We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.

Comment thread src/main/java/gov/nih/nci/bento_ri/model/PrivateESDataFetcher.java
Comment thread src/main/java/gov/nih/nci/bento_ri/model/PrivateESDataFetcher.java
@JoonLeeNIH
JoonLeeNIH merged commit ac78365 into 3.5.0 Jul 30, 2026
2 checks passed
@JoonLeeNIH
JoonLeeNIH deleted the INS-1701 branch July 30, 2026 19:44
@amattu2 amattu2 added this to the 3.5.0 milestone Aug 3, 2026
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.

4 participants