-
-
Notifications
You must be signed in to change notification settings - Fork 93
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
Request parameters in fetch #87
Comments
I definitely feel your pain. I've seen many people be annoyed they have to parse out the params they just had for this. I'm considering shifting the interface around a bit so fetch has the actual params. To address the sample code: It's a clever workaround, but kind of breaks the current assumptions of I'm curious to hear about the 'impossible' scenario as I haven't run into that yet. If you are willing I would love to hear about your specific use-case where it is not just burdensome and annoying but actually not possible to get the params back. This would help me holistically consider things as I think about tweaks to the design. Now to address my current thoughts on a solution:
I would love to hear your thoughts on my current solution ideas as well as explaining this 'impossible' case you have run into. Thanks for the detailed report! |
If you have a spare moment, I'd love to hear your thoughts on #94. I am preparing for a 2.0 release soon and want to make sure this solves your issues :) |
Closed in #94 |
Is your feature request related to a problem? Please describe.
I want to include additional parameters which are not included in the server response in the Resource as described in https://resthooks.io/docs/guides/network-transform#case-of-the-missing-id. However parsing them out from the url seems really burdensome and can be impossible, since the request parameters could also be in the body in some cases.
Describe the solution you'd like
As a workaround, I whipped up this static method in my Resource:
Describe alternatives you've considered
Haven't considered other solutions, but I'm sure there's some cleaner pattern.
Additional context
The text was updated successfully, but these errors were encountered: