Sha256: e8202459a7104b676177dd17dbc853f6eadea9903aa3250989f3b48006c8ce4d

Contents?: true

Size: 776 Bytes

Versions: 25

Compression:

Stored size: 776 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
      field :__type, GraphQL::Schema::LateBoundType.new("__Type"), "A type in the GraphQL system" 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.authorized_new(schema, @context)
      end

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

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
graphql-2.0.23 lib/graphql/introspection/entry_points.rb
graphql-2.0.22 lib/graphql/introspection/entry_points.rb
graphql-2.0.21 lib/graphql/introspection/entry_points.rb
graphql-2.0.20 lib/graphql/introspection/entry_points.rb
graphql-2.0.17.2 lib/graphql/introspection/entry_points.rb
graphql-2.0.17.1 lib/graphql/introspection/entry_points.rb
graphql-2.0.19 lib/graphql/introspection/entry_points.rb
graphql-2.0.18 lib/graphql/introspection/entry_points.rb
graphql-2.0.17 lib/graphql/introspection/entry_points.rb
graphql-2.0.16 lib/graphql/introspection/entry_points.rb
graphql-2.0.15 lib/graphql/introspection/entry_points.rb
graphql-2.0.14 lib/graphql/introspection/entry_points.rb
graphql-2.0.13 lib/graphql/introspection/entry_points.rb
graphql-2.0.12 lib/graphql/introspection/entry_points.rb
graphql-2.0.11 lib/graphql/introspection/entry_points.rb
graphql-2.0.9 lib/graphql/introspection/entry_points.rb
graphql-2.0.8 lib/graphql/introspection/entry_points.rb
graphql-2.0.7 lib/graphql/introspection/entry_points.rb
graphql-2.0.6 lib/graphql/introspection/entry_points.rb
graphql-2.0.5 lib/graphql/introspection/entry_points.rb