Skip to content
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

SWR: add useSwrMutation hook #1013

Closed
matusgallik opened this issue Nov 4, 2023 · 3 comments · Fixed by #1148
Closed

SWR: add useSwrMutation hook #1013

matusgallik opened this issue Nov 4, 2023 · 3 comments · Fixed by #1148
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@matusgallik
Copy link

What are the steps to reproduce this issue?

  1. Used the example config

What happens?

I used the example config. For react-query my POST routes produce mutation hooks, but for SWR I only get a wrapper method for the axios call.

What were you expecting to happen?

I would expect a full useSWR mutation hook to be produced for post requests. Or a mention in the documentation that indicates a different usage (e.g. I need to use useSWRMutation by myself passing a key and the generated method)

What versions are you using?

Operating System: Linux
Package Version: 6.18.1
Browser Version: Chrome something - not relevant for this issue I guess?

@melloware melloware added the question Further information is requested label Nov 5, 2023
@melloware
Copy link
Collaborator

Can you provide a reproducer of your config and OpenApI file?

@melloware
Copy link
Collaborator

No it doesn't look like it is so marking this a new feature

@melloware melloware added enhancement New feature or request and removed question Further information is requested labels Nov 16, 2023
@melloware melloware changed the title Is SWR Mutation supported? SWR: add useSwrMutation hook Nov 16, 2023
@soartec-lab
Copy link
Member

good. I'll try to add this.

https://swr.vercel.app/docs/mutation#useswrmutation

@melloware @anymaniax

Could you assign this issue to me?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants