Class: GraphQL::GraphQLSchema
- Inherits:
-
Configuration::Configurable
- Object
- Configuration::Configurable
- GraphQL::GraphQLSchema
- Defined in:
- lib/graphql/type/schema.rb
Instance Method Summary collapse
- #directives ⇒ Object
- #mutation_type ⇒ Object
- #query_type ⇒ Object
- #to_s ⇒ Object
- #type(name) ⇒ Object
- #type_map ⇒ Object
- #type_names ⇒ Object
- #types ⇒ Object
Methods inherited from Configuration::Configurable
configuration, configure_with, #initialize, #method_missing, new
Constructor Details
This class inherits a constructor from GraphQL::Configuration::Configurable
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class GraphQL::Configuration::Configurable
Instance Method Details
#directives ⇒ Object
39 40 41 |
# File 'lib/graphql/type/schema.rb', line 39 def directives @directives ||= [GraphQLSkipDirective, GraphQLIncludeDirective] end |
#mutation_type ⇒ Object
19 20 21 |
# File 'lib/graphql/type/schema.rb', line 19 def mutation_type @configuration.mutation end |
#query_type ⇒ Object
15 16 17 |
# File 'lib/graphql/type/schema.rb', line 15 def query_type @configuration.query end |
#to_s ⇒ Object
43 44 45 |
# File 'lib/graphql/type/schema.rb', line 43 def to_s name end |
#type(name) ⇒ Object
35 36 37 |
# File 'lib/graphql/type/schema.rb', line 35 def type(name) type_map[name] end |
#type_map ⇒ Object
23 24 25 |
# File 'lib/graphql/type/schema.rb', line 23 def type_map @type_map ||= [query_type, mutation_type, Introspection::Schema__].reduce({}, &TypeMapReducer) end |
#type_names ⇒ Object
27 28 29 |
# File 'lib/graphql/type/schema.rb', line 27 def type_names @type_names ||= type_map.keys end |
#types ⇒ Object
31 32 33 |
# File 'lib/graphql/type/schema.rb', line 31 def types @types ||= type_map.values end |