Sha256: fe2bbd01822b9c75e26a06a7da13b6941686de5ded4328d6dbfbe93d463d074f
Contents?: true
Size: 574 Bytes
Versions: 8
Compression:
Stored size: 574 Bytes
Contents
# frozen_string_literal: true module GraphQL module Define # Turn enum value configs into a {GraphQL::EnumType::EnumValue} and register it with the {GraphQL::EnumType} module AssignEnumValue def self.call(enum_type, name, desc = nil, deprecation_reason: nil, value: name, &block) enum_value = GraphQL::EnumType::EnumValue.define( name: name, description: desc, deprecation_reason: deprecation_reason, value: value, &block ) enum_type.add_value(enum_value) end end end end
Version data entries
8 entries across 8 versions & 1 rubygems