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

graphile-export optimize away constant conditions #425

Open
benjie opened this issue Jul 25, 2023 · 0 comments
Open

graphile-export optimize away constant conditions #425

benjie opened this issue Jul 25, 2023 · 0 comments
Labels
💅 enhancement New feature or request

Comments

@benjie
Copy link
Member

benjie commented Jul 25, 2023

Might be able to borrow something from babel for this?

              step.orderBy({
                codec: attribute.codec,
                fragment: sql`${step.alias}.${sql.identifier(attributeName)}`,
                direction: "DESC",
                ...(undefined != null ? {
                  nulls: undefined ? "LAST" : "FIRST"
                } : null)

Here undefined != null will always be falsy, so we can simplify the parens down to ...(null) which we can then eliminate.

@benjie benjie added the 💅 enhancement New feature or request label Jul 25, 2023
@benjie benjie added this to the V5 post launch milestone Jul 25, 2023
@benjie benjie added this to V5.0.0 Oct 4, 2023
@github-project-automation github-project-automation bot moved this to 🌳 Triage in V5.0.0 Oct 4, 2023
@benjie benjie added this to V5.X Oct 4, 2023
@github-project-automation github-project-automation bot moved this to 🌳 Triage in V5.X Oct 4, 2023
@benjie benjie removed this from V5.0.0 Oct 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💅 enhancement New feature or request
Projects
Status: 🌳 Triage
Development

No branches or pull requests

1 participant