Class: GraphqlRails::Model::Input
- Inherits:
-
Object
- Object
- GraphqlRails::Model::Input
- Includes:
- Configurable
- Defined in:
- lib/graphql_rails/model/input.rb
Overview
stores information about model input specific config, like attributes and types
Instance Method Summary collapse
- #graphql_input_type ⇒ Object
-
#initialize(model_class, input_name_suffix) ⇒ Input
constructor
A new instance of Input.
Methods included from Configurable
#attribute, #attributes, #initialize_copy, #name, #type_name
Constructor Details
#initialize(model_class, input_name_suffix) ⇒ Input
Returns a new instance of Input.
15 16 17 18 |
# File 'lib/graphql_rails/model/input.rb', line 15 def initialize(model_class, input_name_suffix) @model_class = model_class @input_name_suffix = input_name_suffix end |
Instance Method Details
#graphql_input_type ⇒ Object
20 21 22 23 24 |
# File 'lib/graphql_rails/model/input.rb', line 20 def graphql_input_type @graphql_input_type ||= FindOrBuildGraphqlInputType.call( name: name, description: description, attributes: attributes, type_name: type_name ) end |