Class: Graphql::Generators::ObjectGenerator
- Inherits:
-
TypeGeneratorBase
- Object
- Rails::Generators::Base
- TypeGeneratorBase
- Graphql::Generators::ObjectGenerator
- Defined in:
- lib/generators/graphql/object_generator.rb
Overview
Generate an object type by name, with the specified fields.
rails g graphql:object PostType name:String!
Add the Node interface with --node
.
Instance Method Summary collapse
Methods inherited from TypeGeneratorBase
Instance Method Details
#create_type_file ⇒ Object
29 30 31 |
# File 'lib/generators/graphql/object_generator.rb', line 29 def create_type_file template "object.erb", "app/graphql/types/#{type_file_name}.rb" end |