class Graphql::Generators::TypeGeneratorBase::NormalizedField
Public Class Methods
Source
# File lib/generators/graphql/type_generator.rb, line 149 def initialize(name, type_expr, null) @name = name @type_expr = type_expr @null = null end
Public Instance Methods
Source
# File lib/generators/graphql/type_generator.rb, line 159 def to_input_argument "argument :#{@name}, #{@type_expr}, required: false" end
Source
# File lib/generators/graphql/type_generator.rb, line 155 def to_object_field "field :#{@name}, #{@type_expr}#{@null ? '' : ', null: false'}" end