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
its not clear from the docs or readme whats the best way to mutate response in response_handler. can someone please guide me or add this in README. thanks
The text was updated successfully, but these errors were encountered:
@tanweerdev it depends on what your API is using and what compatibility issue the gate should fix.
For example, if you had just name parameter and then started using first_name and last_name then the gate should map those back. In request gate, you want to read conn params and change them so that:
add something like [first_name, last_name] = String.split(name, " ") and then write that to first_name and last_name and then write that back to conn.
remove old field name;
For the response gate you would match on connection routes and for those that are returning first_name and last_name separately you would take response body, decode it, do reverse operation (create new name = first_name <> " " <> last_name) and write it back to response body.
It's very hard to give you anything better than very abstract ideas because every gate is unique.
its not clear from the docs or readme whats the best way to mutate response in response_handler. can someone please guide me or add this in README. thanks
The text was updated successfully, but these errors were encountered: