Module: BulkImports::Projects::Graphql::Queryable

Included in:
GetProjectQuery, GetRepositoryQuery, GetSnippetRepositoryQuery
Defined in:
lib/bulk_imports/projects/graphql/queryable.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#contextObject (readonly)

Returns the value of attribute context.



7
8
9
# File 'lib/bulk_imports/projects/graphql/queryable.rb', line 7

def context
  @context
end

Instance Method Details

#base_pathObject



17
18
19
# File 'lib/bulk_imports/projects/graphql/queryable.rb', line 17

def base_path
  %w[data project]
end

#data_pathObject



21
22
23
# File 'lib/bulk_imports/projects/graphql/queryable.rb', line 21

def data_path
  base_path
end

#initialize(context:) ⇒ Object



9
10
11
# File 'lib/bulk_imports/projects/graphql/queryable.rb', line 9

def initialize(context:)
  @context = context
end

#page_info_pathObject



25
26
27
# File 'lib/bulk_imports/projects/graphql/queryable.rb', line 25

def page_info_path
  base_path << 'page_info'
end

#variablesObject



13
14
15
# File 'lib/bulk_imports/projects/graphql/queryable.rb', line 13

def variables
  { full_path: context.entity.source_full_path }
end