Class: GraphqlRails::Attributes::InputAttribute
- Inherits:
-
Object
- Object
- GraphqlRails::Attributes::InputAttribute
- Includes:
- Attributable, AttributeConfigurable
- Defined in:
- lib/graphql_rails/attributes/input_attribute.rb
Overview
contains info about single graphql input attribute
Instance Method Summary collapse
-
#initialize(name, config:) ⇒ InputAttribute
constructor
A new instance of InputAttribute.
- #input_argument_args ⇒ Object
- #input_argument_options ⇒ Object
- #paginated? ⇒ Boolean
Methods included from AttributeConfigurable
#deprecated, #deprecation_reason, #group, #groups, #hidden_in_groups, #optional, #property, #required, #same_as
Methods included from Attributable
#field_name, #graphql_model, #initialize_copy, #name, #optional?, #required?, #scalar_type?, #type_name
Constructor Details
#initialize(name, config:) ⇒ InputAttribute
Returns a new instance of InputAttribute.
17 18 19 20 |
# File 'lib/graphql_rails/attributes/input_attribute.rb', line 17 def initialize(name, config:) @config = config @initial_name = name end |
Instance Method Details
#input_argument_args ⇒ Object
22 23 24 25 26 |
# File 'lib/graphql_rails/attributes/input_attribute.rb', line 22 def input_argument_args type = raw_input_type || input_type_parser.input_type_arg [field_name, type] end |
#input_argument_options ⇒ Object
28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/graphql_rails/attributes/input_attribute.rb', line 28 def { required: required?, description: description, camelize: false, groups: groups, hidden_in_groups: hidden_in_groups, **default_value_option, **property_params, **deprecation_reason_params } end |
#paginated? ⇒ Boolean
41 42 43 |
# File 'lib/graphql_rails/attributes/input_attribute.rb', line 41 def paginated? false end |