OWASP / OWASP/Nest

refactor: migrate ModuleNode to use strawberry-django decorator for consistency

Open
#4,226 2 comments 0 reactions 1 assignee Claimed by @Jpeg-create View on GitHub
enhancement
Dominant language
Python
Stars
451
Forks
707
Avg merge
22h 59m
Merged PRs (30d)
91

Description

## Problem
`ModuleNode` in `backend/apps/mentorship/api/internal/nodes/module.py` is currently
implemented using the base `@strawberry.type` decorator with manually defined fields
and a TODO comment left by @arkid15r:
```python
# TODO (@arkid15r ): migrate to decorator for consistency.
id: strawberry.ID
```

## Proposed Solution
Migrate `ModuleNode` to use `@strawberry_django.type(Module, ...)` instead of
`@strawberry.type`, aligning it with the pattern used in other nodes in the codebase.

## Additional Context
A similar refactor for `MenteeNode` is tracked in #3555. This issue covers the
equivalent change for `ModuleNode`.

## Are you going to work on implementing this?
- [x] Yes

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.