You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allow replacing null values in postgres responses with undefined.
🗣️ Discussion
The types generated by this package union null with the field's primitive type
The results returned from queries have concrete null values (matching the declared types)
However, inside our application we rarely desire null, and have to manually omit it with extra deserialization code.
This deserialization code ends up mirroring much of the schema shape, diminishing the benefit of using the generated types.
We thread data through different systems, ensuring their types conform at each technology boundary (eg; Postgres-to-OpenAPI Response), and being able to hand them around without massaging makes all of us much happier. 😄
⌛ Precedent
Many packages already provide hooks for selectively-transforming their output, either at types-generation time, or at run time.
atdatabases is uniquely situated to provide a comprehensive solution here, comprising both types-generation time and run time components.
An API allowing us to hook into both of these components to coerce data into the shapes we need would be super useful! ☘️
The text was updated successfully, but these errors were encountered:
⚡ Feature Request
Allow replacing
null
values in postgres responses withundefined
.🗣️ Discussion
null
with the field's primitive typenull
values (matching the declared types)However, inside our application we rarely desire
null
, and have to manually omit it with extra deserialization code.This deserialization code ends up mirroring much of the schema shape, diminishing the benefit of using the generated types.
We thread data through different systems, ensuring their types conform at each technology boundary (eg; Postgres-to-OpenAPI Response), and being able to hand them around without massaging makes all of us much happier. 😄
⌛ Precedent
Many packages already provide hooks for selectively-transforming their output, either at types-generation time, or at run time.
atdatabases is uniquely situated to provide a comprehensive solution here, comprising both types-generation time and run time components.
An API allowing us to hook into both of these components to coerce data into the shapes we need would be super useful! ☘️
The text was updated successfully, but these errors were encountered: