Class: GraphQL::Language::DocumentFromSchemaDefinition Private
- Inherits:
-
Object
- Object
- GraphQL::Language::DocumentFromSchemaDefinition
- Defined in:
- lib/graphql/language/document_from_schema_definition.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
DocumentFromSchemaDefinition is used to convert a Schema object To a Document AST node.
Instance Method Summary collapse
- #document ⇒ Object private
-
#initialize(schema) ⇒ DocumentFromSchemaDefinition
constructor
private
A new instance of DocumentFromSchemaDefinition.
Constructor Details
#initialize(schema) ⇒ DocumentFromSchemaDefinition
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of DocumentFromSchemaDefinition.
10 11 12 13 |
# File 'lib/graphql/language/document_from_schema_definition.rb', line 10 def initialize(schema) @schema = schema @types = GraphQL::Schema::Traversal.new(schema, introspection: true).type_map.values end |
Instance Method Details
#document ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
15 16 17 18 19 |
# File 'lib/graphql/language/document_from_schema_definition.rb', line 15 def document GraphQL::Language::Nodes::Document.new( definitions: build_definition_nodes ) end |