Sha256: 207e344351bb2ff2bce5a46fce3c8445b7758d040604dcda9dac9bab2ab53b27

Contents?: true

Size: 970 Bytes

Versions: 3

Compression:

Stored size: 970 Bytes

Contents

GraphQL::Introspection::TypeType = GraphQL::ObjectType.new do |t, type, field|
  t.name "__Type"
  t.description "A type in the GraphQL schema"

  t.fields = {
    name:           field.build(type: !type.String, desc: "The name of this type"),
    kind:           GraphQL::Field.new { |f|
                      f.type GraphQL::Introspection::TypeKindEnum
                      f.description "The kind of this type"
                      f.resolve -> (target, a, c) { target.kind.name }
                    },
    description:    field.build(type: type.String, desc: "The description for this type"),
    fields:         GraphQL::Introspection::FieldsField,
    ofType:         GraphQL::Introspection::OfTypeField,
    inputFields:    GraphQL::Introspection::InputFieldsField,
    possibleTypes:  GraphQL::Introspection::PossibleTypesField,
    enumValues:     GraphQL::Introspection::EnumValuesField,
    interfaces:     GraphQL::Introspection::InterfacesField,
  }
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
graphql-0.4.0 lib/graph_ql/introspection/type_type.rb
graphql-0.3.0 lib/graph_ql/introspection/type_type.rb
graphql-0.2.0 lib/graph_ql/introspection/type_type.rb