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

fix: insert nulls in place of missing database document fields #8

Merged
merged 2 commits into from
Mar 20, 2024

Conversation

hallettj
Copy link
Collaborator

We had a problem where a missing requested field on any database document would lead to an internal error in the engine. It turns out that in $replaceWith stages fields with missing values are silently omitted from response documents.

This change adds $ifNull checks which insert null values in such cases. $ifNull checks for either null or missing values, and the checks are written to put in an explicit null value in either case.

Thankfully I was able to record a macro to help update the test cases!

Ticket: https://hasurahq.atlassian.net/browse/MDB-90

@hallettj hallettj merged commit 66ded02 into main Mar 20, 2024
2 checks passed
@hallettj hallettj deleted the jesse/fix/internal-error-on-missing-fields branch March 20, 2024 17:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants