-
Notifications
You must be signed in to change notification settings - Fork 0
DBP-38: Allow saving users' submit result #9
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
DBP-38: Allow saving users' submit result #9
Conversation
pan93412
commented
Sep 17, 2025
- feat: add submission model
- chore: generate ent code
- refactor: update SubmissionResult definition
- feat: implement submission API
There was a problem hiding this 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 submission functionality allowing users to save their SQL query submission results. The changes include adding a submission model, implementing a submission service with answer validation, and integrating it with the GraphQL API.
- Add submission domain models: Introduces
SQLExecutionResultandUserSQLExecutionResultfor storing query results and comparison status - Implement submission service: Creates service to handle answer submission, validation against reference answers, and persistence
- Integration with GraphQL API: Adds
submitAnswermutation and updates resolver structure to support submission functionality
Reviewed Changes
Copilot reviewed 60 out of 60 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| models/submission.go | Defines submission result data structures |
| internal/submission/submission.go | Core submission service with answer validation logic |
| internal/submission/submission_test.go | Comprehensive test suite for submission functionality |
| internal/testhelper/sqlrunner.go | Test helpers for SQL runner container setup |
| graph/question.resolvers.go | GraphQL resolver for submitAnswer mutation |
| ent/schema/submission.go | Database schema definition for submissions |
| Multiple ent/ files | Generated Ent ORM code for submission entity |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.