Commit 11968f2d authored by Douglas Barbosa Alexandre's avatar Douglas Barbosa Alexandre

Merge branch 'jcunha/refactor-bi-project-queriable' into 'master'

Refactor BulkImport graphql queriable methods

See merge request gitlab-org/gitlab!75385
parents ec9635db 665afdd1
...@@ -4,6 +4,7 @@ module BulkImports ...@@ -4,6 +4,7 @@ module BulkImports
module Projects module Projects
module Graphql module Graphql
module GetProjectQuery module GetProjectQuery
extend Queryable
extend self extend self
def to_s def to_s
...@@ -28,22 +29,6 @@ module BulkImports ...@@ -28,22 +29,6 @@ module BulkImports
} }
GRAPHQL GRAPHQL
end end
def variables(context)
{ full_path: context.entity.source_full_path }
end
def base_path
%w[data project]
end
def data_path
base_path
end
def page_info_path
base_path << 'page_info'
end
end end
end end
end end
......
...@@ -4,6 +4,7 @@ module BulkImports ...@@ -4,6 +4,7 @@ module BulkImports
module Projects module Projects
module Graphql module Graphql
module GetRepositoryQuery module GetRepositoryQuery
extend Queryable
extend self extend self
def to_s def to_s
...@@ -15,22 +16,6 @@ module BulkImports ...@@ -15,22 +16,6 @@ module BulkImports
} }
GRAPHQL GRAPHQL
end end
def variables(context)
{ full_path: context.entity.source_full_path }
end
def base_path
%w[data project]
end
def data_path
base_path
end
def page_info_path
base_path << 'page_info'
end
end end
end end
end end
......
# frozen_string_literal: true
module BulkImports
module Projects
module Graphql
module Queryable
def variables(context)
{ full_path: context.entity.source_full_path }
end
def base_path
%w[data project]
end
def data_path
base_path
end
def page_info_path
base_path << 'page_info'
end
end
end
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment