wasp-lang / wasp

The fastest way to develop full-stack web apps with React & Node.js.
https://wasp-lang.dev
MIT License
13.48k stars 1.18k forks source link

Improve server-side operations API #2044

Closed sodic closed 3 months ago

sodic commented 4 months ago

Closes #1909 using the approach described in the last comment on the issue. Closes #2004.

[!NOTE] I've only implemented the API for AuthUser for now. I think I'll make another issue that deals with adding User to the mix because it's probably not important enough to justify the time it would take.

[!TIP] I recommend generating the files by running wasp start and looking at the SDK. It's much easier to understand what's going on this way. Choose an app with many operations (e.g., waspc/todoApp)

[!WARNING] I love these admonitions and have started overusing them.

Todos:

infomiho commented 4 months ago

Good job!

It seems like the AuthUser is causing some trouble for us here 😢 they can simply coerce some object like { id: 5 } as AuthUser as an extreme measure?