Sha256: e7c601439975d0a229904c003e6ab3684a0a3084fd8a7ea33e4c3b802c426cb7

Contents?: true

Size: 490 Bytes

Versions: 106

Compression:

Stored size: 490 Bytes

Contents

# frozen_string_literal: true
module GraphQL
  module Introspection
    class DynamicFields < Introspection::BaseObject
      field :__typename, String, "The name of this type", null: false, extras: [:irep_node]

      # `irep_node:` will be nil for the interpreter, since there is no such thing
      def __typename(irep_node: nil)
        if context.interpreter?
          object.class.graphql_name
        else
          irep_node.owner_type.name
        end
      end
    end
  end
end

Version data entries

106 entries across 106 versions & 2 rubygems

Version Path
graphql-1.13.23 lib/graphql/introspection/dynamic_fields.rb
graphql-1.13.22 lib/graphql/introspection/dynamic_fields.rb
graphql-1.13.21 lib/graphql/introspection/dynamic_fields.rb
graphql-1.13.20 lib/graphql/introspection/dynamic_fields.rb
graphql-1.13.19 lib/graphql/introspection/dynamic_fields.rb
graphql-1.13.18 lib/graphql/introspection/dynamic_fields.rb
graphql-1.13.17 lib/graphql/introspection/dynamic_fields.rb
graphql-1.13.16 lib/graphql/introspection/dynamic_fields.rb
graphql-1.13.15 lib/graphql/introspection/dynamic_fields.rb
graphql-1.13.14 lib/graphql/introspection/dynamic_fields.rb
graphql-1.13.13 lib/graphql/introspection/dynamic_fields.rb
graphql_cody-1.13.0 lib/graphql/introspection/dynamic_fields.rb
graphql-1.13.12 lib/graphql/introspection/dynamic_fields.rb
graphql-1.13.11 lib/graphql/introspection/dynamic_fields.rb
graphql-1.13.10 lib/graphql/introspection/dynamic_fields.rb
graphql-1.13.9 lib/graphql/introspection/dynamic_fields.rb
graphql-1.12.24 lib/graphql/introspection/dynamic_fields.rb
graphql-1.13.8 lib/graphql/introspection/dynamic_fields.rb
graphql-1.13.7 lib/graphql/introspection/dynamic_fields.rb
graphql-1.13.6 lib/graphql/introspection/dynamic_fields.rb