-
-
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(query): 🔥 add injectMutation
to query
#121
Conversation
Run & review this pull request in StackBlitz Codeflow. |
query/src/lib/mutation.ts
Outdated
); | ||
|
||
return { | ||
mutate: mutationObserver.mutate.bind(mutationObserver), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about mutateAsync?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the mutate
would be the mutateAsync
here. if the normal mutate is also needed then i can implement it tomorrow though
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the mutate would be the mutateAsync here
What do u mean?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've just not named it mutateAsync
, the mutate
function just ignores the promise returned by the mutate
function of the mutationObserver
and attaches a noop
on the catch block of the promise. If you say that we'd need this additional function then im gonna implement it tomorrow, i just thought that it doesnt yield any advantage, so i didnt have implemented it for now, since you can just ignore the promise returned and it would still work.
Can you resolve the conflicts please? |
... to `true` on `toSignal`
3d60da1
to
129b3b8
Compare
I'll merge this and maybe make some changes.I think I'll change the toSignal function to result() instead |
yeah i think this would sound good, though it maybe could be a bit obscure for what it means if one does not read the documentation beforehand. Anyway, do you think there are some more thinks i can do? If there is nothing else than the documentation and playground examples i'll continue with the docs tomorrow then. |
Docs and It'll be awesome if you can make the playground looks better maybe use bulma so that we can include a gif in the release tweet :) |
Of course, i'll start with that tomorrow then! |
Checkout this commit: |
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue Number: N/A
What is the new behavior?
Does this PR introduce a breaking change?
Other information