-
-
Notifications
You must be signed in to change notification settings - Fork 494
Open
Labels
3.xThis is related to Litestar version 3This is related to Litestar version 3EnhancementThis is a new feature or requestThis is a new feature or request
Description
Summary
Returning a DTO from a route automatically resolves it into JSON. It would be good to be able to do the same with a DTO yielded out of an SSE endpoint.
I can see two options:
- LItestar has magic to detect a DTO being yielded, and if it sees that it automatically and pushes it as an SSE event
- Litestar has a function/method that can be called by the developer to trigger DTO resolution, which can then be yielded
Basic Example
No response
Drawbacks and Impact
Providing the automatic resolution would probably be the simplest approach for the developer, but would lack flexibility. The manual option might be best for now, and adding an automatic alternative in future could be considered when we understand the problem better.
Unresolved questions
Should we do automatic or manual resolution of DTOs?
FHU-yezi and ste-pool
Metadata
Metadata
Assignees
Labels
3.xThis is related to Litestar version 3This is related to Litestar version 3EnhancementThis is a new feature or requestThis is a new feature or request