Class: GraphitiGql::Schema::Query

Inherits:
Object
  • Object
show all
Defined in:
lib/graphiti_gql/schema/query.rb

Instance Method Summary collapse

Constructor Details

#initialize(resources, existing_query: nil) ⇒ Query

Returns a new instance of Query.



4
5
6
7
8
# File 'lib/graphiti_gql/schema/query.rb', line 4

def initialize(resources, existing_query: nil)
  @resources = resources
  @query_class = Class.new(existing_query || Schema.base_object)
  @query_class.graphql_name "Query"
end

Instance Method Details

#buildObject



10
11
12
13
# File 'lib/graphiti_gql/schema/query.rb', line 10

def build
  define_entrypoints
  @query_class
end