Sha256: c679abd095f3207df91b2c42418b8ad0ba158fe2074fd7b92edc845fdcb3225b
Contents?: true
Size: 520 Bytes
Versions: 40
Compression:
Stored size: 520 Bytes
Contents
# frozen_string_literal: true GraphQL::Introspection::EnumValuesField = GraphQL::Field.define do type types[!GraphQL::Introspection::EnumValueType] argument :includeDeprecated, types.Boolean, default_value: false resolve ->(object, arguments, context) do if !object.kind.enum? nil else enum_values = context.warden.enum_values(object) if !arguments["includeDeprecated"] enum_values = enum_values.select {|f| !f.deprecation_reason } end enum_values end end end
Version data entries
40 entries across 40 versions & 1 rubygems