Skip to content

Refactor/user selection level #413

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

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

theodorklauritzen
Copy link
Member

@theodorklauritzen theodorklauritzen commented Apr 13, 2025

MERGE #406 first!

This PR adds different levels of fields to expose from the user object. This should hopefully reduce the amount of user data that is exposed.

Copy link
Member

@JohanHjelsethStorstad JohanHjelsethStorstad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is more correct to use Prisma giving it the selection to generate the types, however, I still think the types for all different selections is sort of clucky. Ideally, I think all reads should have a filterSelection (an includes) to be as explicit as possible. -> this filter has a name (I belive we probably should call them selections as it is consistent with SELECT) and this name always corresponds to a type by Prisma.UserGetPayload. This type should have the same name... . I am sort of wondering, why do we need the type? can't we have a wrapper takin in the selection object you want to use. So if you need the UserNameFiltered type you use SmartWrapperName or with som name changing Selection

@Paulijuz
Copy link
Member

Paulijuz commented Apr 24, 2025

whops, trykket knappen med et uhell. bare å ignorere

@theodorklauritzen theodorklauritzen marked this pull request as draft May 15, 2025 20:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants