Skip to content

Conversation

@slaveeks
Copy link
Member

added graphql resolver for affected users chart data

@n0str n0str requested review from Copilot and n0str January 21, 2026 17:31
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds a new GraphQL resolver to retrieve chart data for affected users over a specified time period. The implementation follows the existing pattern for the chartData resolver and extends the shared findChartData method to support aggregating different fields.

Changes:

  • Added affectedUsersChartData GraphQL field to Event type with parameters for days and timezone offset
  • Implemented resolver that calls a new factory method getEventDailyAffectedUsersChart
  • Extended findChartData method to accept a valueField parameter supporting both 'count' and 'affectedUsers'
  • Added formatting improvements (blank lines) to SAML controller for consistency
  • Bumped package version from 1.3.1 to 1.3.2

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/typeDefs/event.ts Added GraphQL schema definition for affectedUsersChartData field with documentation
src/resolvers/event.js Implemented resolver that retrieves affected users chart data using events factory
src/models/eventsFactory.js Added getEventDailyAffectedUsersChart method and made findChartData more flexible to support different aggregation fields
src/sso/saml/controller.ts Added blank lines before log statements for improved code formatting
package.json Incremented version to 1.3.2

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

},

/**
* Return chart data for affected users of target event occured in last few days
Copy link

Copilot AI Jan 21, 2026

Choose a reason for hiding this comment

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

The JSDoc comment has a typo: "occured" should be "occurred".

Copilot uses AI. Check for mistakes.
*
* @param {string} projectId - event's project
* @param {string} groupHash - event's groupHash
* @param {number} days - how many days we need to fetch for displaying in a charts
Copy link

Copilot AI Jan 21, 2026

Choose a reason for hiding this comment

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

The JSDoc comment contains a grammatical error: "displaying in a charts" should be "displaying in a chart" (or "displaying in charts").

Copilot uses AI. Check for mistakes.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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