benawad / benawad/jwt-auth-example

Resolvers best practices?

Open
#34 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
463
Forks
119
PR merge metrics
No merged PRs in 30d

Description

Hi Ben,

I'm working on a [project](https://github.com/timthedev07/your-doge), where I have a single giant user resolver class with the `@Resolver()` decorator. And recently I'm starting to wonder if it is actually better to split them up into separate files and use a utility function to manually import each resolver from each individual file. But I guess there is a tradeoff, that is, every time I create a new resolver, I need to go back to that utility function to import it from the newly created file, and in fact, I'm going to create many other resolvers in the future.

[UserResolvers.ts](https://github.com/timthedev07/Your-Doge/blob/staging/shibe/src/resolvers/UserResolvers.ts)

I would appreciate your suggestions on what to do in this case.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reading the linked UserResolvers.ts file and the resolver organization described in the issue. Compare the current structure with the project's existing resolver entry points, but note that the issue provides no requested change or acceptance criteria, so there is no defined completion state.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
backend-api-design
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.