Skip to content

Commit 59f08b9

Browse files
committed
feat(tool-picker): add user answers on recommendation query
1 parent d97d34b commit 59f08b9

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

apps/tool_picker/graphql/types.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
RecommendationResult,
99
Tool,
1010
ToolAnswer,
11+
UserAnswer,
1112
)
1213
from utils.graphql.types import DjangoFileType
1314

@@ -79,12 +80,13 @@ class ToolType:
7980
class UserSubmissionType:
8081
id: strawberry.ID
8182
catalog_id: strawberry.ID
83+
answers: list[UserAnswerType]
8284

8385

8486
@strawberry_django.type(RecommendationResult)
8587
class RecommendationResultType:
8688
id: strawberry.auto
87-
submission: strawberry.auto
89+
submission: UserSubmissionType
8890
rank: strawberry.auto
8991
score: strawberry.auto
9092
tool: ToolType

schema.graphql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ input RecommendationResultOrder @oneOf {
262262
"""Model representing recommended tools for a submission."""
263263
type RecommendationResultType {
264264
id: ID!
265-
submission: DjangoModelType!
265+
submission: UserSubmissionType!
266266
rank: Int!
267267

268268
"""Proximity score - lower is better (closer match)"""
@@ -367,6 +367,7 @@ input UserSubmissionInput {
367367
type UserSubmissionType {
368368
id: ID!
369369
catalogId: ID!
370+
answers: [UserAnswerType!]!
370371
}
371372

372373
type UserSubmissionTypeMutationResponseType {

0 commit comments

Comments
 (0)