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

close #466 | create mutation shorthand #467

Closed
wants to merge 2 commits into from
Closed

Conversation

xaota
Copy link

@xaota xaota commented Apr 5, 2024

Copy link
Owner

@igorkamyshev igorkamyshev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution 🙏

  1. Please add changeset by instruction in README. It will be used to determine the next version of the library and would be filled to CHANGELOG.
  2. Please mark your changes in docs. At least in API ref with a mention that this overload is available since the next minor release (0.13 I assume).
  3. I see type-tests for the change, but I do not see any runtime-test. Could you add it to ensure your changes are working correctly? We do not accept PRs without tests.

@igorkamyshev
Copy link
Owner

igorkamyshev commented Apr 16, 2024

Shall we introduce the same change for createQuery?

Does it worth changing?

// before
const mut = createMutation({ handler })

// after
const mut = createMutation(handler)

It's only removing brackets. Why is this important?

I believe it's better to start with an RFC accordingly to https://github.com/igorkamyshev/farfetched/blob/master/CONTRIBUTING.md 🙏

@xaota
Copy link
Author

xaota commented Apr 22, 2024

It's only removing brackets

createMutation({ handler: service }) vs createMutation(service). Usually you have many services in your model

Shall we introduce the same change for createQuery?

yes

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

Successfully merging this pull request may close these issues.

2 participants