Sha256: e2c6280fc1c038e86e42f86e20b41f1a1b68c8a1da1ac5c438b0b5ea8daf5e9e

Contents?: true

Size: 1.29 KB

Versions: 1

Compression:

Stored size: 1.29 KB

Contents

# frozen_string_literal: true
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,        GraphQL::Introspection::FieldsField
  field :interfaces,    GraphQL::Introspection::InterfacesField
  field :possibleTypes, GraphQL::Introspection::PossibleTypesField
  field :enumValues,    GraphQL::Introspection::EnumValuesField
  field :inputFields,   GraphQL::Introspection::InputFieldsField
  field :ofType,        GraphQL::Introspection::OfTypeField
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
graphql-1.3.0 lib/graphql/introspection/type_type.rb