Class: ElasticGraph::SchemaDefinition::Results

Inherits:
Object
  • Object
show all
Includes:
ElasticGraph::SchemaArtifacts::ArtifactsHelperMethods
Defined in:
elasticgraph-schema_definition/lib/elastic_graph/schema_definition/results.rb

Overview

Note:

This class is designed to implement the same interface as ElasticGraph::SchemaArtifacts::FromDisk, so that it can be used

Provides the results of defining a schema.

interchangeably with schema artifacts loaded from disk. This allows the artifacts to be used in tests without having to dump them or reload them.

Instance Method Summary collapse

Methods included from ElasticGraph::SchemaArtifacts::ArtifactsHelperMethods

#datastore_scripts, #index_mappings_by_index_def_name, #index_templates, #indices

Instance Method Details

#datastore_configHash<String, Object>

Returns the Elasticsearch/OpenSearch configuration dumped as datastore_config.yaml.

Returns:

  • (Hash<String, Object>)

    the Elasticsearch/OpenSearch configuration dumped as datastore_config.yaml



37
38
39
# File 'elasticgraph-schema_definition/lib/elastic_graph/schema_definition/results.rb', line 37

def datastore_config
  @datastore_config ||= generate_datastore_config
end

#graphql_schema_stringString

Returns the generated GraphQL SDL schema string dumped as schema.graphql.

Returns:

  • (String)

    the generated GraphQL SDL schema string dumped as schema.graphql



32
33
34
# File 'elasticgraph-schema_definition/lib/elastic_graph/schema_definition/results.rb', line 32

def graphql_schema_string
  @graphql_schema_string ||= generate_sdl
end

#runtime_metadataHash<String, Object>

Returns runtime metadata used by other parts of ElasticGraph and dumped as runtime_metadata.yaml.

Returns:

  • (Hash<String, Object>)

    runtime metadata used by other parts of ElasticGraph and dumped as runtime_metadata.yaml



42
43
44
# File 'elasticgraph-schema_definition/lib/elastic_graph/schema_definition/results.rb', line 42

def 
  @runtime_metadata ||= 
end