Job Queues: Improve typing for input/output schema #9004
tyteen4a03
started this conversation in
Feature Requests & Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
While looking at the types for an issue where
date
fields specified in theinputSchema
does not result in aDate
object being passed to the handler, I noticed the types aren't narrowed down to JSON-serializable fields (which I think is the intent, given that Payload currently turnsdate
fields intostring
s ingenerate:types
)I think the schema should be tied down to only simple fields that can be safely JSON-serialized (e.g. what does an input with field
join
mean? and do we really need to let devs go ham by giving themblocks
?). Maaaaybe we should give special treatment todate
field where the handler getsDate
objects back but I already shudder to think about the consequences of timezones and stuff, it feels like something the dev should handle themselves with their favorite datetime library.Beta Was this translation helpful? Give feedback.
All reactions