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
Is your feature request related to a problem? Please describe.
In some cases, you might want to transform the data from PostgREST after fetching it, e.g. create a js Date for timestamptz columns, or convert the snake case to camel case (#244)
Describe the solution you'd like
Add a transformer API to all query hooks, that accepts a transformer: (result: R) => TransformedResult method. The transformer is applied within the fetcher, and before the data is written to the cache. It also transforms the Result type to ensure type-safety.
Describe alternatives you've considered
Wrapping the hooks and transform them afterwards.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
In some cases, you might want to transform the data from PostgREST after fetching it, e.g. create a js
Date
fortimestamptz
columns, or convert the snake case to camel case (#244)Describe the solution you'd like
Add a transformer API to all query hooks, that accepts a
transformer: (result: R) => TransformedResult
method. The transformer is applied within the fetcher, and before the data is written to the cache. It also transforms theResult
type to ensure type-safety.Describe alternatives you've considered
Wrapping the hooks and transform them afterwards.
The text was updated successfully, but these errors were encountered: