Skip to content

refactor(api): additional findings resolvers - #7534

Open
lcampbell2 wants to merge 9 commits into
masterfrom
feat/refactor-additional-findings-resolvers
Open

lcampbell2 wants to merge 9 commits into
masterfrom
feat/refactor-additional-findings-resolvers

Conversation

@lcampbell2

Copy link
Copy Markdown
Collaborator
  • refactors additionalFindings object to match fields established in feat(scanners): additional findings processor #7518
  • refactors Domain.additionalFindings loader to a Relay connection and adds pagination, sorting, and filtering support
  • removes legacy top-25 additional findings query code

@lcampbell2
lcampbell2 requested a review from FestiveKyle August 20, 2026 19:29
Comment thread api/src/additional-findings/objects/additional-finding.js Outdated
Comment thread api/src/additional-findings/objects/additional-finding.js Outdated
Comment thread api/src/additional-findings/objects/additional-finding.js Outdated
@lcampbell2
lcampbell2 requested a review from FestiveKyle August 31, 2026 18:17
@lcampbell2
lcampbell2 removed this pull request from stack #7541 September 18, 2026 16:51
@lcampbell2
lcampbell2 added this pull request to stack #7589 September 18, 2026 16:51
@lcampbell2
lcampbell2 removed this pull request from stack #7589 September 18, 2026 16:53
@lcampbell2 lcampbell2 changed the title feat(api): refactor additional findings resolvers refactor(api): additional findings resolvers Sep 18, 2026

@FestiveKyle FestiveKyle left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Domain CSV exports break for me after the new additionalFindings documents start populating. I think due to the webComponents section

sortTemplate = aql`SORT TO_NUMBER(finding._key) ${relayDirectionString}`
} else {
sortTemplate = aql`
SORT finding.${orderBy.field} ${orderBy.direction}, TO_NUMBER(finding._key) ${relayDirectionString}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Severity and Confidence are sorted alphabetically, should probably be sorted by rank instead (high -> med -> low)

sortTemplate = aql`SORT TO_NUMBER(finding._key) ${relayDirectionString}`
} else {
sortTemplate = aql`
SORT finding.${orderBy.field} ${orderBy.direction}, TO_NUMBER(finding._key) ${relayDirectionString}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Sorting by Severity ASC break pagination, returns an empty list. I think it has to do with undefined values in the cursor as severity is optional. Not 100% sure

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