Sha256: e84f3e93e366e738a8f7963eff4968a3adf89532a365678638362c9fcf392855
Contents?: true
Size: 541 Bytes
Versions: 7
Compression:
Stored size: 541 Bytes
Contents
# frozen_string_literal: true GraphQL::Introspection::EnumValuesField = GraphQL::Field.define do type types[!GraphQL::Introspection::EnumValueType] introspection true 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
7 entries across 7 versions & 1 rubygems