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

Add ability to sort types and properties alphabetically #2

Open
gajus opened this issue Sep 9, 2017 · 5 comments
Open

Add ability to sort types and properties alphabetically #2

gajus opened this issue Sep 9, 2017 · 5 comments

Comments

@gajus
Copy link

gajus commented Sep 9, 2017

Working with large schemas it is easy to get lost in the file. Being able to sort type declarations and their properties alphabetically would be incredibly useful.

@happylinks
Copy link
Owner

Could you explain a bit more about your workflow? Which tools do you use to make the schema?
Currently gqlint doesn't change the graphql file, it only shows error in it. I could make a linting-rule that shows when it's not in alphabetical order, but I'm not sure if that would help you a lot.

@gajus
Copy link
Author

gajus commented Sep 9, 2017

Yeah, this is not a minor milestone.

I was thinking of releasing gqlint myself. My plan was to effectively use ESLint project bones to create GraphQL linter with ability to write plugins that can both report and fix issues.

I am not aware of any other tools in the ecosystem that provide similar/ equivalent functionality.

@happylinks
Copy link
Owner

Ahh cool, we can think of our own --fix parameter like eslint has. But it really depends on the tools that create the schema. For example, in our project the schema is created by running a script that creates the schema based on the graphene library. Fixing the gql wouldn't mean that it's also fixed in the python code. But if people have other usecases for this I'm open for suggestions.

@gajus
Copy link
Author

gajus commented Sep 10, 2017

But it really depends on the tools that create the schema.

Oh, the schema is all handcrafted.

@happylinks
Copy link
Owner

happylinks commented Sep 10, 2017 via email

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