class Graphql::Generators::ObjectGenerator
Generate an object type by name, with the specified fields.
“` rails g graphql:object PostType name:String! “`
Add the Node interface with `–node`.
Public Instance Methods
create_type_file()
click to toggle source
# File lib/generators/graphql/object_generator.rb, line 29 def create_type_file template "object.erb", "#{options[:directory]}/types/#{type_file_name}.rb" end