PgSelect step is not deduplicating
- Dominant language
- TypeScript
- Stars
- 12.9k
- Forks
- 625
- Avg merge
- 5h 23m
- Merged PRs (30d)
- 24
Description
### Summary
When doing `xByRowId` queries with the same constant ID, pgSelect step does not seem to correctly deduplicate

### Steps to reproduce
Setup Postgraphile v5. Add a table with the ability to do a root query to fetch a single row of that table by its row ID
```sql
create table foo (id int primary key, a text);
```
Set `graphile.explain` to `true` in your preset
Execute a query in Ruru using aliases to query the same row twice. e.g.
```gql
query MyFoos {
foo1: foo(id="1") {
id
}
foo2: foo(id="1") {
id
}
}
```
See the diagram of the plan is similar to the screenshot above
Please let me know if it would be useful to create a minimal repro of this. I'm happy to do so
### Expected results
I expect there to be a single PgSelect step in the plan
### Actual results
There are 2 PgSelect steps
### Additional context
Additional discussion in this discord thread:
https://discord.com/channels/489127045289476126/1325736426587033652/1325879877576032288
### Possible Solution
Not sure without digging into PgSelect code
Contributor guide
Assessment
This issue has not been assessed yet.