joist-orm / joist-orm/joist-orm

Upstream falseIsNull

Open
#736 0 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.