Sha256: bdde77ea27bb41d1f41ca71f71c4dc453159dfc86d667079ed2502597b5505b6
Contents?: true
Size: 616 Bytes
Versions: 35
Compression:
Stored size: 616 Bytes
Contents
module GraphQL module Define # Turn argument configs into a {GraphQL::Argument}. module AssignArgument def self.call(target, name, type = nil, description = nil, default_value: nil, &block) argument = if block_given? GraphQL::Argument.define(&block) else GraphQL::Argument.new end argument.name = name.to_s type && argument.type = type description && argument.description = description !default_value.nil? && argument.default_value = default_value target.arguments[name.to_s] = argument end end end end
Version data entries
35 entries across 35 versions & 1 rubygems