-
-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat: Add transformer option to use-query #501
base: main
Are you sure you want to change the base?
Feat: Add transformer option to use-query #501
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@toki-developer is attempting to deploy a commit to the psteinroe's projects Team on Vercel. A member of the Team first needs to authorize it. |
hey @toki-developer, welcome to GitHub. its a pleasure to have your first contribution in my repository. did you test if this works with cache updates? I believe the change has to be done at a lower level to ensure the automatic revalidations work. |
Thank you for the review, @psteinroe. I'll look into it!
I will conduct my own research, but if you could identify any specific files, I would be most grateful.
|
I understand what this message means.
|
I meant that it should be possible to use |
|
@psteinroe Target hooks
|
thanks for your effort @toki-developer! appreciate it a lot, but the solution here is not as straightforward as it seems to be. the mutation hooks should not need the transformer to be passed. that's the hard part here: All mutations have to work on all queries with or without a transformer being applied to a query. Any query with a transformer should behave the same way as any other query but just return a transformed result. |
Thanks for the feedback! I agree that the current solution isn't optimal. I'll look into alternative approaches. If you have any better approaches in mind, I would be grateful if you could share them with me.🙇 |
Issue
#245
Overview
I've added a transformer option to use-query. This allows you to transform data, such as converting from snake_case to camelCase.
Capture
CODE: snakeToCamel function
Additional Notes
I'm a junior engineer. This is my first contribution to an open-source project. I'm eager to receive feedback on my work. I'm very interested in Supabase and would love to work on other issues if there are any.