diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-02-18 12:45:46 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-02-18 12:45:46 +0300 |
commit | a7b3560714b4d9cc4ab32dffcd1f74a284b93580 (patch) | |
tree | 7452bd5c3545c2fa67a28aa013835fb4fa071baf /lib/bulk_imports/common/extractors/graphql_extractor.rb | |
parent | ee9173579ae56a3dbfe5afe9f9410c65bb327ca7 (diff) |
Add latest changes from gitlab-org/gitlab@14-8-stable-eev14.8.0-rc42
Diffstat (limited to 'lib/bulk_imports/common/extractors/graphql_extractor.rb')
-rw-r--r-- | lib/bulk_imports/common/extractors/graphql_extractor.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/bulk_imports/common/extractors/graphql_extractor.rb b/lib/bulk_imports/common/extractors/graphql_extractor.rb index cde3d1cad5b..bfdc0b13603 100644 --- a/lib/bulk_imports/common/extractors/graphql_extractor.rb +++ b/lib/bulk_imports/common/extractors/graphql_extractor.rb @@ -5,15 +5,16 @@ module BulkImports module Extractors class GraphqlExtractor def initialize(options = {}) - @query = options[:query] + @query_klass = options[:query] end def extract(context) client = graphql_client(context) + query = query_klass.new(context: context) response = client.execute( client.parse(query.to_s), - query.variables(context) + query.variables ).original_hash.deep_dup BulkImports::Pipeline::ExtractedData.new( @@ -24,7 +25,7 @@ module BulkImports private - attr_reader :query + attr_reader :query_klass def graphql_client(context) @graphql_client ||= BulkImports::Clients::Graphql.new( |