nole
WWasp
•Created by nole on 5/10/2025 in #🙋questions
How do you access a user's identity through a query?
Context
Myapp is configured to use
usernameAndPassword
auth method.
s
I am trying to show an entity based off of a parameter in the URL
📄 main.wasp
My attempt
I thought this was the right way to do it but,
📄 queries.ts
I'm getting this error:
What I've tried so far
- I have tried logging out the entities to try and find the right way to access the username.
- I have tried talking to the AI in my IDE, but the suggestions have been to add an identity's field to the user schema.
- I think wasp attaches this relation to the user entity without being explicitly defined.7 replies