Method: GraphQL::Schema::Argument#type=

Defined in:
lib/graphql/schema/argument.rb

#type=(new_type) ⇒ Object



198
199
200
201
202
203
204
205
206
# File 'lib/graphql/schema/argument.rb', line 198

def type=(new_type)
  validate_input_type(new_type)
  # This isn't true for LateBoundTypes, but we can assume those will
  # be updated via this codepath later in schema setup.
  if new_type.respond_to?(:non_null?)
    validate_deprecated_or_optional(null: !new_type.non_null?, deprecation_reason: deprecation_reason)
  end
  @type = new_type
end