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

[1.0] Suggestion: make plugin generated node names more terse #1122

Closed
0x80 opened this issue Jun 7, 2017 · 3 comments
Closed

[1.0] Suggestion: make plugin generated node names more terse #1122

0x80 opened this issue Jun 7, 2017 · 3 comments

Comments

@0x80
Copy link
Contributor

0x80 commented Jun 7, 2017

Plugins create nodes names like childMarkdownRemark and childImageSharp.

So the node is named after child + type + plugin. That seems overly verbose to me. I would think markdownRemark and imageSharp is already clear enough.

Also the type seems unnecessary since the user will already know what remark or sharp does, and the type of content they work with. I get that you want to avoid naming collisions, but then I would suggest picking a clear standardized prefix like ext.

So nodes could be named extRemark and extSharp.

What do you think?

@KyleAMathews
Copy link
Contributor

Imagine a scenario where you come into a site that you didn't build — either it's from a starter/theme or someone else built it — and you're trying to understand how it works. If you have no idea what Remark is and there's 50 different plugins, it'd be quite helpful to see childMarkdownRemark as a) you know it's a link to another node type and b) that node type is a transformed child that has something to do with Markdown.

That seems really useful to me.

@0x80
Copy link
Contributor Author

0x80 commented Jun 7, 2017

Alright. I see your point 😄

@0x80 0x80 closed this as completed Jun 7, 2017
@KyleAMathews
Copy link
Contributor

Something that'd be amazing would be to get auto-complete setup for GraphQL queries in popular text editors. That'd help with the verbosity a lot.

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

2 participants