Sha256: 48e82ffa01dd0dd18fe7b122dd4d9809c3783991748023801f7bc6c15833f730

Contents?: true

Size: 544 Bytes

Versions: 9

Compression:

Stored size: 544 Bytes

Contents

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

9 entries across 9 versions & 1 rubygems

Version Path
graphql-1.2.6 lib/graphql/define/assign_enum_value.rb
graphql-1.2.5 lib/graphql/define/assign_enum_value.rb
graphql-1.2.4 lib/graphql/define/assign_enum_value.rb
graphql-1.2.3 lib/graphql/define/assign_enum_value.rb
graphql-1.2.2 lib/graphql/define/assign_enum_value.rb
graphql-1.2.1 lib/graphql/define/assign_enum_value.rb
graphql-1.2.0 lib/graphql/define/assign_enum_value.rb
graphql-1.1.0 lib/graphql/define/assign_enum_value.rb
graphql-1.0.0 lib/graphql/define/assign_enum_value.rb