Sha256: b21ea4e3a22b14a04e626315f9c8c0a0a2eb4f120a315005c96736fbe77f4d90

Contents?: true

Size: 393 Bytes

Versions: 7

Compression:

Stored size: 393 Bytes

Contents

# frozen_string_literal: true
module GraphQL
  module Introspection
    TypeByNameField = GraphQL::Field.define do
      name("__type")
      description("A type in the GraphQL system")
      type(GraphQL::Introspection::TypeType)
      introspection true
      argument :name, !types.String
      resolve ->(o, args, ctx) {
        ctx.warden.get_type(args["name"])
      }
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
graphql-1.7.14 lib/graphql/introspection/type_by_name_field.rb
graphql-1.7.13 lib/graphql/introspection/type_by_name_field.rb
graphql-1.7.12 lib/graphql/introspection/type_by_name_field.rb
graphql-1.7.11 lib/graphql/introspection/type_by_name_field.rb
graphql-1.7.10 lib/graphql/introspection/type_by_name_field.rb
graphql-1.7.9 lib/graphql/introspection/type_by_name_field.rb
graphql-1.7.8 lib/graphql/introspection/type_by_name_field.rb