Sha256: c0e9c1dc0855782673722986b5118e795cc2a6025a59e704d010c7ba4c5654e3

Contents?: true

Size: 824 Bytes

Versions: 21

Compression:

Stored size: 824 Bytes

Contents

# frozen_string_literal: true
module GraphQL
  module Introspection
    class EntryPoints < Introspection::BaseObject
      field :__schema, GraphQL::Schema::LateBoundType.new("__Schema"), "This GraphQL schema", null: false, dynamic_introspection: true
      field :__type, GraphQL::Schema::LateBoundType.new("__Type"), "A type in the GraphQL system", dynamic_introspection: true do
        argument :name, String
      end

      def __schema
        # Apply wrapping manually since this field isn't wrapped by instrumentation
        schema = @context.query.schema
        schema_type = schema.introspection_system.types["__Schema"]
        schema_type.wrap(schema, @context)
      end

      def __type(name:)
        context.warden.reachable_type?(name) ? context.warden.get_type(name) : nil
      end
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
graphql-2.1.15 lib/graphql/introspection/entry_points.rb
graphql-2.1.14 lib/graphql/introspection/entry_points.rb
graphql-2.1.13 lib/graphql/introspection/entry_points.rb
graphql-2.1.12 lib/graphql/introspection/entry_points.rb
graphql-2.1.11 lib/graphql/introspection/entry_points.rb
graphql-2.2.5 lib/graphql/introspection/entry_points.rb
graphql-2.2.4 lib/graphql/introspection/entry_points.rb
graphql-2.2.3 lib/graphql/introspection/entry_points.rb
graphql-2.1.10 lib/graphql/introspection/entry_points.rb
graphql-2.2.2 lib/graphql/introspection/entry_points.rb
graphql-2.1.9 lib/graphql/introspection/entry_points.rb
graphql-2.2.1 lib/graphql/introspection/entry_points.rb
graphql-2.2.0 lib/graphql/introspection/entry_points.rb
graphql-2.1.8 lib/graphql/introspection/entry_points.rb
graphql-2.1.7 lib/graphql/introspection/entry_points.rb
graphql-2.1.6 lib/graphql/introspection/entry_points.rb
graphql-2.1.5 lib/graphql/introspection/entry_points.rb
graphql-2.1.4 lib/graphql/introspection/entry_points.rb
graphql-2.1.3 lib/graphql/introspection/entry_points.rb
graphql-2.1.2 lib/graphql/introspection/entry_points.rb