Class: GraphQL::Introspection::SchemaField

Inherits:
Object
  • Object
show all
Defined in:
lib/graphql/introspection/schema_field.rb

Overview

A wrapper to implement ‘__schema`

Class Method Summary collapse

Class Method Details

.create(wrapped_type) ⇒ Object



3
4
5
6
7
8
9
10
# File 'lib/graphql/introspection/schema_field.rb', line 3

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