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

Add ability to call specialized dataProvider hooks with specialized parameters #6168

Merged
merged 5 commits into from
Apr 15, 2021

Conversation

fzaninotto
Copy link
Member

@fzaninotto fzaninotto commented Apr 15, 2021

// build-time query
const [update] = useUpdate()
// call-time query
update('likes', record.id, diff, record)

Also, made all specialized mutation hooks generic:

const [update, { data }] = useUpdate<Product>('products', record.id, diff, record)
                   \- data is Product

Closes #6047
Refs #6143

@fzaninotto fzaninotto added the RFR Ready For Review label Apr 15, 2021
Copy link
Collaborator

@djhi djhi left a comment

Choose a reason for hiding this comment

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

🔥

@djhi djhi added this to the 3.15 milestone Apr 15, 2021
@djhi djhi merged commit f82ffff into next Apr 15, 2021
@djhi djhi deleted the dataprovider-hooks-generic branch April 15, 2021 12:07
@fzaninotto fzaninotto mentioned this pull request Jun 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RFR Ready For Review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants