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

Resolve all options during construction #226

Merged
merged 1 commit into from Nov 17, 2019
Merged

Conversation

leebyron
Copy link
Contributor

Rather than holding a reference to the provided options and computing behaviors and defaults on the fly, this validates and extracts all options during construction.

Minor additional behavioral changes include allowing cacheMap to be set to null as an equivalence to cache: false and providing the DataLoader instance as this to cacheKeyFn to be consistent with doing the same for batchLoadFn.

Finally, this adds additional tests and makes minor edits to documentation.

@leebyron leebyron mentioned this pull request Nov 17, 2019
@leebyron leebyron merged commit 01c829d into master Nov 17, 2019
@leebyron leebyron deleted the dont-hold-options branch November 17, 2019 20:28
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.

None yet

1 participant