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

feat: allow null field values in loadManyByFieldEqualityConjunctionAsync #130

Merged
merged 3 commits into from
Jul 1, 2021

Conversation

wschurman
Copy link
Member

Why

A feature request from @jkhales for an API endpoint within the Expo server.

Since the results for this type of load aren't stored in a dataloader or cached, we can just pipe null fieldValues directly through to the database adapters for load, and it is their duty to handle them for this type of load.

How

This ended up being slightly more difficult than anticipated but not too bad. Complications:

Test Plan

Run tests.

@wschurman wschurman requested review from ide and jkhales June 28, 2021 22:42
@codecov
Copy link

codecov bot commented Jun 28, 2021

Codecov Report

Merging #130 (9ef9fe7) into master (5401be0) will increase coverage by 0.45%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #130      +/-   ##
==========================================
+ Coverage   95.31%   95.76%   +0.45%     
==========================================
  Files          70       70              
  Lines        1772     1796      +24     
  Branches      208      217       +9     
==========================================
+ Hits         1689     1720      +31     
+ Misses         81       75       -6     
+ Partials        2        1       -1     
Flag Coverage Δ
integration 95.76% <100.00%> (+0.45%) ⬆️
unittest 95.76% <100.00%> (+0.45%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
packages/entity/src/EntityDatabaseAdapter.ts 100.00% <ø> (ø)
...-adapter-knex/src/PostgresEntityDatabaseAdapter.ts 100.00% <100.00%> (ø)
packages/entity/src/EntityLoader.ts 88.88% <100.00%> (ø)
...es/entity/src/utils/testing/StubDatabaseAdapter.ts 98.09% <100.00%> (+7.77%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5401be0...9ef9fe7. Read the comment docs.

Copy link

@jkhales jkhales left a comment

Choose a reason for hiding this comment

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

Wow, quick turn around! Thank you!

@wschurman wschurman merged commit 2f37dc6 into master Jul 1, 2021
@wschurman wschurman deleted the @wschurman/nulls branch July 1, 2021 17:58
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.

3 participants