Bean
Beanβ€’4mo ago

type safety with meta

how do I get the meta types to work correctly?
No description
No description
4 Replies
Bean
Beanβ€’4mo ago
I want the authRequired type to automatically infer the correct type for the context in my protectedProcedure, I have the isAuthed middleware set up to throw an error if the meta is set to true, but that type doesnt work in my procedure and the usermodel type is still nullable how can I fix that?
Alex / KATT 🐱
Alex / KATT πŸ±β€’4mo ago
Just don't use meta here
Bean
Beanβ€’4mo ago
how do I set this up then?
Alex / KATT 🐱
Alex / KATT πŸ±β€’4mo ago
Use protected procedures for protected ones and public for non protected ones