Sha256: 093c24b9dc8ff894a03b1cb4aededc8bcd7b3b3d4eddb604a260dad5b7283edf

Contents?: true

Size: 410 Bytes

Versions: 8

Compression:

Stored size: 410 Bytes

Contents

# frozen_string_literal: true
module GraphQL
  module Introspection
    # A wrapper to implement `__schema`
    class SchemaField
      def self.create(wrapped_type)
        GraphQL::Field.define do
          name("__schema")
          description("This GraphQL schema")
          type(!GraphQL::Introspection::SchemaType)
          resolve ->(o, a, c) { wrapped_type }
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
graphql-1.5.3 lib/graphql/introspection/schema_field.rb
graphql-1.4.5 lib/graphql/introspection/schema_field.rb
graphql-1.4.4 lib/graphql/introspection/schema_field.rb
graphql-1.4.3 lib/graphql/introspection/schema_field.rb
graphql-1.4.2 lib/graphql/introspection/schema_field.rb
graphql-1.4.1 lib/graphql/introspection/schema_field.rb
graphql-1.4.0 lib/graphql/introspection/schema_field.rb
graphql-1.3.0 lib/graphql/introspection/schema_field.rb