Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/bulk_imports/projects/graphql')
-rw-r--r--lib/bulk_imports/projects/graphql/get_project_query.rb5
-rw-r--r--lib/bulk_imports/projects/graphql/get_repository_query.rb5
-rw-r--r--lib/bulk_imports/projects/graphql/get_snippet_repository_query.rb7
-rw-r--r--lib/bulk_imports/projects/graphql/queryable.rb8
4 files changed, 14 insertions, 11 deletions
diff --git a/lib/bulk_imports/projects/graphql/get_project_query.rb b/lib/bulk_imports/projects/graphql/get_project_query.rb
index 04ac0916bbc..b3d7f3f4683 100644
--- a/lib/bulk_imports/projects/graphql/get_project_query.rb
+++ b/lib/bulk_imports/projects/graphql/get_project_query.rb
@@ -3,9 +3,8 @@
module BulkImports
module Projects
module Graphql
- module GetProjectQuery
- extend Queryable
- extend self
+ class GetProjectQuery
+ include Queryable
def to_s
<<-'GRAPHQL'
diff --git a/lib/bulk_imports/projects/graphql/get_repository_query.rb b/lib/bulk_imports/projects/graphql/get_repository_query.rb
index 24efce9e276..ca777c1a7e0 100644
--- a/lib/bulk_imports/projects/graphql/get_repository_query.rb
+++ b/lib/bulk_imports/projects/graphql/get_repository_query.rb
@@ -3,9 +3,8 @@
module BulkImports
module Projects
module Graphql
- module GetRepositoryQuery
- extend Queryable
- extend self
+ class GetRepositoryQuery
+ include Queryable
def to_s
<<-'GRAPHQL'
diff --git a/lib/bulk_imports/projects/graphql/get_snippet_repository_query.rb b/lib/bulk_imports/projects/graphql/get_snippet_repository_query.rb
index 1ba57789612..c105b04c731 100644
--- a/lib/bulk_imports/projects/graphql/get_snippet_repository_query.rb
+++ b/lib/bulk_imports/projects/graphql/get_snippet_repository_query.rb
@@ -3,9 +3,8 @@
module BulkImports
module Projects
module Graphql
- module GetSnippetRepositoryQuery
- extend Queryable
- extend self
+ class GetSnippetRepositoryQuery
+ include Queryable
def to_s
<<-'GRAPHQL'
@@ -27,7 +26,7 @@ module BulkImports
GRAPHQL
end
- def variables(context)
+ def variables
{
full_path: context.entity.source_full_path,
cursor: context.tracker.next_page,
diff --git a/lib/bulk_imports/projects/graphql/queryable.rb b/lib/bulk_imports/projects/graphql/queryable.rb
index a897632dff3..bd3116cb838 100644
--- a/lib/bulk_imports/projects/graphql/queryable.rb
+++ b/lib/bulk_imports/projects/graphql/queryable.rb
@@ -4,7 +4,13 @@ module BulkImports
module Projects
module Graphql
module Queryable
- def variables(context)
+ attr_reader :context
+
+ def initialize(context:)
+ @context = context
+ end
+
+ def variables
{ full_path: context.entity.source_full_path }
end