Skip to content

Conversation

@pan93412
Copy link
Member

No description provided.

@pan93412 pan93412 self-assigned this Oct 21, 2025
@linear
Copy link

linear bot commented Oct 21, 2025

@pan93412 pan93412 requested a review from Copilot October 21, 2025 19:23
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 implements statistics tracking for questions, providing metrics on submission counts, success rates, and user engagement. The feature enables GraphQL queries to retrieve aggregated data about question performance.

Key changes:

  • Added QuestionStatistics model with fields for tracking correct submissions, total submissions, attempted users, and passed users
  • Implemented GraphQL resolver to compute statistics by querying the submission database
  • Added comprehensive test coverage for various submission scenarios including edge cases

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
models/question.go Defines the QuestionStatistics struct with fields for submission and user metrics
graph/question.resolvers.go Implements the Statistics resolver that queries and aggregates submission data
graph/question.graphqls Extends the Question type with a statistics field and defines the QuestionStatistics GraphQL type
graph/question_resolver_test.go Adds comprehensive test cases covering different submission scenarios, authorization, and edge cases

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@pan93412 pan93412 merged commit 6b31961 into main Oct 21, 2025
2 checks passed
@pan93412 pan93412 deleted the pan93412/dbp-102-api-可以回傳一個題目的嘗試次數和攻克次數 branch November 1, 2025 05:06
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