Module: ElasticGraph::Apollo::GraphQL::EngineExtension

Defined in:
lib/elastic_graph/apollo/graphql/engine_extension.rb

Overview

ElasticGraph application extension module designed to hook into the ElasticGraph GraphQL engine in order to support Apollo-specific fields.

Instance Method Summary collapse

Instance Method Details

#graphql_gem_pluginsObject



22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/elastic_graph/apollo/graphql/engine_extension.rb', line 22

def graphql_gem_plugins
  @graphql_gem_plugins ||= begin
    require "apollo-federation/tracing/proto"
    require "apollo-federation/tracing/node_map"
    require "apollo-federation/tracing/tracer"
    require "apollo-federation/tracing"

    # @type var options: ::Hash[::Symbol, untyped]
    options = {}
    super.merge(ApolloFederation::Tracing => options)
  end
end

#graphql_http_endpointObject



36
37
38
39
40
41
# File 'lib/elastic_graph/apollo/graphql/engine_extension.rb', line 36

def graphql_http_endpoint
  @graphql_http_endpoint ||= super.tap do |endpoint|
    require "elastic_graph/apollo/graphql/http_endpoint_extension"
    endpoint.extend HTTPEndpointExtension
  end
end