Commit e5337c7e authored by Luke Duncalfe's avatar Luke Duncalfe Committed by Evan Read

Alphabetize GraphQL API docs fields

https://gitlab.com/gitlab-org/gitlab/issues/198573
parent be130b6e
This diff is collapsed.
......@@ -21,6 +21,10 @@ module Gitlab
MD
end
def sorted_fields(fields)
fields.sort_by { |field| field[:name] }
end
# Some fields types are arrays of other types and are displayed
# on docs wrapped in square brackets, for example: [String!].
# This makes GitLab docs renderer thinks they are links so here
......
......@@ -21,6 +21,6 @@ fields and methods on a model are available via GraphQL.
\
~ "| Name | Type | Description |"
~ "| --- | ---- | ---------- |"
- type[:fields].each do |field|
- sorted_fields(type[:fields]).each do |field|
= "| `#{field[:name]}` | #{render_field_type(field[:type][:info])} | #{field[:description]} |"
\
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment