Start uniquely naming node default exports in generated code
- Dominant language
- Rust
- Stars
- 19k
- Forks
- 1.9k
- PR merge metrics
- No merged PRs in 30d
Description
Currently the default exports of `queryname.graphql.ts` and `queryname$parameters.ts` are simply named `node`. This makes it really cumbersome to work with import suggestions, as typing `node` will suggest every query in the whole project (see screenshot from VS Code).
Instead I suggest these exports get a unique name, so that the name of the query can be typed to get a single import suggestion from the IDE. Additionally the export could be exported as a named query in addition to the default export (to avoid breaking existing code).
Examples of names for the queries could be `queryNameNode` for `queryName.graphql.ts` and `queryNamePreloadable` for `queryName$parameters.ts`.
Contributor guide
Assessment
This issue has not been assessed yet.