Sha256: 317aa1533695771e6684e511472fb505b433018306ce4ad13456047b5e55e952
Contents?: true
Size: 1.04 KB
Versions: 37
Compression:
Stored size: 1.04 KB
Contents
# frozen_string_literal: true GraphQL::Introspection::InputValueType = GraphQL::ObjectType.define do name "__InputValue" description "Arguments provided to Fields or Directives and the input fields of an "\ "InputObject are represented as Input Values which describe their type and "\ "optionally a default value." field :name, !types.String field :description, types.String field :type, !GraphQL::Introspection::TypeType field :defaultValue, types.String, "A GraphQL-formatted string representing the default value for this input value." do resolve ->(obj, args, ctx) { if obj.default_value? value = obj.default_value if value.nil? 'null' else coerced_default_value = obj.type.coerce_result(value, ctx) if obj.type.unwrap.is_a?(GraphQL::EnumType) coerced_default_value else GraphQL::Language.serialize(coerced_default_value) end end else nil end } end introspection true end
Version data entries
37 entries across 37 versions & 1 rubygems