Skip to content
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

Feature request: refactor findBy... Methods for scalability and DX #551

Open
Tracked by #1332
thierryskoda opened this issue Nov 27, 2024 · 0 comments
Open
Tracked by #1332
Labels
enhancement New feature or request

Comments

@thierryskoda
Copy link

Is your feature request related to a problem?

No, only a suggestion.

The growing number of findDmBy... and findGroupBy... findConversation... methods can become confusing and bloating the API.

It's also easier (IMO) for DX if I see just one method like findConversation and then I can pass args to build that query depending on what I need.

Describe the solution to the problem

Introduce a single method, like Prisma did with findUnique. This would consolidate queries and leverage TypeScript to enforce required arguments based on the criteria.

Describe the uses cases for the feature

No response

Additional details

Don't think it's worth changing anything now. Just a suggestion in case you planned to add more and more unique methods like that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Todo
Development

No branches or pull requests

1 participant