cjoudrey/graphql-schema-linter

Feature: Custom Sorting

Opened this issue · 1 comments

While we use standard alphabetic sorting for types, fields, etc we also like to have any id: ID! fields remain at the top. This helps with DX as our databases are structured in much the same way. While I wouldn't suggest pushing our sorting preferences on any other users, it would be handy to be able to specify a custom sorter.

Hey @shellscape! Thanks for opening this issue.

I would be open to add support for loading custom sorting functions to solve your issue.

Perhaps we can do something similar to how custom rules work and then anything loaded that way would be a valid value for sortOrder.