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