-
Notifications
You must be signed in to change notification settings - Fork 8
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
Fix useUpdate hook and improve defaultMutations and mutators dependency #62
Conversation
Just did a todo: data validation functions where splitted in 2 (validateDocument and validateData) that were called by validateMutationData in a tricky way in the mutator. |
Great work so far!! |
async function getSelector({ dataId, selector, input, context, model }: GetSelectorInput | ||
) { | ||
if (dataId) { | ||
selector = { _id: dataId }; |
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.
Prefer early return pattern:
if (dataId) return ...
if (selector) { deprecate(); return ... }
return ...
@Timi-Duban I think we're good, the last comments are pure form but it seems that you have covered everything at this point. Does it work ok when you plug Vulcan Next? Thanks for this huge refactor! |
🥇 |
Two big things here:
This is a draft PR because I need to think about all the TODO on these documents, and to fix and improve the tests that are currently broken because of the changes.
About #33 and maybe #59 it needs to be tested
Closes #33