Proper typings for local API #709
Replies: 2 comments 1 reply
-
Hey @chris-schra — good call. We have some of what you've got above, but this is nice to see. We do see a lot of value in how to further type incoming If you want to make a PR for this, we'd be happy to see, but otherwise we can address this and improve types of Thanks for the idea! |
Beta Was this translation helpful? Give feedback.
-
I am also very interested in this. One of the main reason why I was considering Payload for our project was the advertised typesafety. I was assuming that type safe local CRUD functions would be generated (just like Prisma's), but I think that's not the case. Is anything like that on the roadmap? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Dear All,
Payload looks really promising but I wonder if there's a reason why clients are not really typed (or did I miss something)?
Maybe a code sample demos the "issue" better.
Currently I can do something like this
Before I continue working on that, I just want to double-check if there's nothing I missed.
Here's just a simple POC:
Now I get nice auto-completion on Collections and filters - no more invalid fields.
Beta Was this translation helpful? Give feedback.
All reactions