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

Update `*All` helpers for better ergononmics #36

Merged
merged 2 commits into from Oct 24, 2018

Conversation

1 participant
@thomashoneyman
Copy link
Owner

thomashoneyman commented Oct 23, 2018

What does this pull request do?

Updates the setAll, modifyAll, setValidateAll, and modifyValidateAll query helpers (adding the last two as brand-new ones) so that they don't force users to wrap their input records when passing them. This brings them in line with the other query helpers like set and modify and reduces boilerplate.

-- old
H.query unit $ F.setAll_ (F.wrapInputFields { id: 5, email: "hello@hello.com" }) `F.andThen_` F.validateAll_

-- new
H.query unit $ F.setValidateAll_ { id: 5, email: "hello@hello.com" }

Other Notes:

This breaks the 0.3.0 API for these helpers and will require a bump to 0.4.0.

@thomashoneyman thomashoneyman self-assigned this Oct 23, 2018

@thomashoneyman thomashoneyman merged commit 225dd6c into master Oct 24, 2018

1 check passed

ci/circleci: test Your tests passed on CircleCI!
Details

@thomashoneyman thomashoneyman deleted the query-update branch Oct 24, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment