Improved API docs autogeneration

This commit is contained in:
Alberto Miedes Garcés
2017-01-27 12:39:44 +01:00
parent 6101848f7a
commit 073ce38a8d
3 changed files with 17 additions and 5 deletions

View File

@@ -7,14 +7,14 @@ module Graphqlable
self.name.gsub('::', '_').underscore.to_sym
end
def graphql_pluralized_field_name
self.name.gsub('::', '_').underscore.pluralize.to_sym
end
def graphql_field_description
"Find one #{self.model_name.human} by ID"
end
def graphql_pluralized_field_name
self.name.gsub('::', '_').underscore.pluralize.to_sym
end
def graphql_pluralized_field_description
"Find all #{self.model_name.human.pluralize}"
end