We're still missing the feature that allows the user argument to be of type User (not only AuthUser):
// current type signature
getFoo(payload: Input, { user }: { user: AuthUser })
// desired type signature
getFoo(payload: Input, { user }: { user: User | AuthUser })
The getFoo function should be overloaded and its implementation should figure out whether the caller sent a User or an AuthUser and act accordingly.
We want this feature because, outside of an operation, the User is much more easily attainable than an AuthUser.
2044 closed #1909, but we're not yet quite where we wanted to be.
See the comment for the API's original specification: https://github.com/wasp-lang/wasp/issues/1909#issuecomment-2104476140.
We're still missing the feature that allows the
user
argument to be of typeUser
(not onlyAuthUser
):The
getFoo
function should be overloaded and its implementation should figure out whether the caller sent aUser
or anAuthUser
and act accordingly.We want this feature because, outside of an operation, the
User
is much more easily attainable than anAuthUser
.