joist-orm / joist-orm/joist-orm
Upstream falseIsNull
Open
hack day
- Dominant language
- TypeScript
- Stars
- 385
- Forks
- 26
- Avg merge
- 8h 55m
- Merged PRs (30d)
- 42
Description
Sometimes a GraphQL input filter of `isAuthor: Boolean` will want to map `isAuthor: false` to `is_author IS NULL` b/c of how the schema is modeled.
We can map that with something like:
```
function falseIsNull(filter: boolean | null | undefined): BooleanGraphQLFilter | undefined {
if (filter === undefined) {
return undefined;
} else {
return filter ? true : null;
}
}
```
Contributor guide
Assessment
This issue has not been assessed yet.