Sha256: 03b8ab980adebd84bdab9ff8f43cf8a1b55703c4010a07519a08d070f7f96639

Contents?: true

Size: 1.32 KB

Versions: 2

Compression:

Stored size: 1.32 KB

Contents

GraphQL::Introspection::TypeType = GraphQL::ObjectType.define do
  name "__Type"
  description "The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in "\
              "GraphQL as represented by the `__TypeKind` enum.\n\n"\
              "Depending on the kind of a type, certain fields describe information about that type. "\
              "Scalar types provide no information beyond a name and description, while "\
              "Enum types provide their values. Object and Interface types provide the fields "\
              "they describe. Abstract types, Union and Interface, provide the Object types "\
              "possible at runtime. List and NonNull types compose other types."

  field :kind do
    type !GraphQL::Introspection::TypeKindEnum
    resolve ->(target, a, c) { target.kind.name }
  end
  field :name, types.String
  field :description, types.String
  field :fields,          field: GraphQL::Introspection::FieldsField
  field :interfaces,      field: GraphQL::Introspection::InterfacesField
  field :possibleTypes,   field: GraphQL::Introspection::PossibleTypesField
  field :enumValues,      field: GraphQL::Introspection::EnumValuesField
  field :inputFields,     field: GraphQL::Introspection::InputFieldsField
  field :ofType,          field: GraphQL::Introspection::OfTypeField
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
graphql-1.0.0 lib/graphql/introspection/type_type.rb
graphql-0.19.4 lib/graphql/introspection/type_type.rb