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

Start uniquely naming node default exports in generated code #4644

Open
jakst opened this issue Mar 11, 2024 · 0 comments
Open

Start uniquely naming node default exports in generated code #4644

jakst opened this issue Mar 11, 2024 · 0 comments

Comments

@jakst
Copy link

jakst commented Mar 11, 2024

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).

image

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant