graphile / graphile/crystal

Fun: `graphile-export` can simplify some pg-sql2 expressions

Open
#2,594 0 comments 0 reactions 0 assignees View on GitHub
✨ feature
Dominant language
TypeScript
Stars
12.9k
Forks
625
Avg merge
5h 23m
Merged PRs (30d)
24

Description

We do a number of optimizations in graphile-export... I just noticed another that we could do would be compressing SQL expressions. For example:

```ts
fragment: sql`${alias}.${sql.identifier("type")}`
```

could easily become:

```ts
fragment: sql`${alias}."type"`
```

or if we're being _really_ fancy:

```ts
fragment: sql`${alias}.type`
```

Wouldn't make a huge difference to performance, but is much easier for humans to read (which is one of the goals of Graphile Export!)

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.