class Graphql::Generators::TypeGeneratorBase::NormalizedField

Public Class Methods

new(name, type_expr, null) click to toggle source
# File lib/generators/graphql/type_generator.rb, line 85
def initialize(name, type_expr, null)
  @name = name
  @type_expr = type_expr
  @null = null
end

Public Instance Methods

to_ruby() click to toggle source
# File lib/generators/graphql/type_generator.rb, line 91
def to_ruby
  "field :#{@name}, #{@type_expr}, null: #{@null}"
end