Class: GraphQL::Introspection::EntryPoints
- Inherits:
-
Introspection::BaseObject
- Object
- Introspection::BaseObject
- GraphQL::Introspection::EntryPoints
- Defined in:
- lib/graphql/introspection/entry_points.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.__schema(context) ⇒ Object
12 13 14 15 16 17 |
# File 'lib/graphql/introspection/entry_points.rb', line 12 def self.__schema(context) # Apply wrapping manually since this field isn't wrapped by instrumentation schema = context.schema schema_type = schema.introspection_system.types["__Schema"] schema_type.wrap(schema, context) end |
.__type(context, name:) ⇒ Object
27 28 29 30 31 32 33 34 35 |
# File 'lib/graphql/introspection/entry_points.rb', line 27 def self.__type(context, name:) if context.types.reachable_type?(name) && (type = context.types.type(name)) type elsif (type = context.schema.extra_types.find { |t| t.graphql_name == name }) type else nil end end |
Instance Method Details
#__schema ⇒ Object
19 20 21 |
# File 'lib/graphql/introspection/entry_points.rb', line 19 def __schema self.class.__schema(context) end |
#__type(name:) ⇒ Object
23 24 25 |
# File 'lib/graphql/introspection/entry_points.rb', line 23 def __type(name:) self.class.__type(context, name: name) end |