Sha256: 4e75a7e7a58cfbd81ed977b812c19e417d2c5347c2d6d027ddfc13a3b4e5cd1a

Contents?: true

Size: 321 Bytes

Versions: 17

Compression:

Stored size: 321 Bytes

Contents

# frozen_string_literal: true
module GraphQL
  module Introspection
    TypenameField = GraphQL::Field.define do
      name "__typename"
      description "The name of this type"
      type -> { !GraphQL::STRING_TYPE }
      introspection true
      resolve ->(obj, a, ctx) { ctx.irep_node.owner_type }
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
graphql-1.8.0 lib/graphql/introspection/typename_field.rb
graphql-1.8.0.pre11 lib/graphql/introspection/typename_field.rb
graphql-1.8.0.pre10 lib/graphql/introspection/typename_field.rb
graphql-1.7.14 lib/graphql/introspection/typename_field.rb
graphql-1.8.0.pre9 lib/graphql/introspection/typename_field.rb
graphql-1.8.0.pre8 lib/graphql/introspection/typename_field.rb
graphql-1.7.13 lib/graphql/introspection/typename_field.rb
graphql-1.8.0.pre7 lib/graphql/introspection/typename_field.rb
graphql-1.7.12 lib/graphql/introspection/typename_field.rb
graphql-1.7.11 lib/graphql/introspection/typename_field.rb
graphql-1.7.10 lib/graphql/introspection/typename_field.rb
graphql-1.8.0.pre6 lib/graphql/introspection/typename_field.rb
graphql-1.8.0.pre5 lib/graphql/introspection/typename_field.rb
graphql-1.7.9 lib/graphql/introspection/typename_field.rb
graphql-1.8.0.pre4 lib/graphql/introspection/typename_field.rb
graphql-1.8.0.pre3 lib/graphql/introspection/typename_field.rb
graphql-1.7.8 lib/graphql/introspection/typename_field.rb