Commit bcf1d813 authored by Robert Speicher's avatar Robert Speicher

Merge branch 'bw-allow-unlimited-transactions' into 'master'

Allow a high query transaction threshold when using `all_graphql_fields_for`

See merge request gitlab-org/gitlab!23453
parents b4aac026 3dbe5eb8
...@@ -136,6 +136,7 @@ module GraphqlHelpers ...@@ -136,6 +136,7 @@ module GraphqlHelpers
allow_unlimited_graphql_complexity allow_unlimited_graphql_complexity
allow_unlimited_graphql_depth allow_unlimited_graphql_depth
allow_high_graphql_recursion allow_high_graphql_recursion
allow_high_graphql_transaction_threshold
type = GitlabSchema.types[class_name.to_s] type = GitlabSchema.types[class_name.to_s]
return "" unless type return "" unless type
...@@ -295,6 +296,10 @@ module GraphqlHelpers ...@@ -295,6 +296,10 @@ module GraphqlHelpers
allow_any_instance_of(Gitlab::Graphql::QueryAnalyzers::RecursionAnalyzer).to receive(:recursion_threshold).and_return 1000 allow_any_instance_of(Gitlab::Graphql::QueryAnalyzers::RecursionAnalyzer).to receive(:recursion_threshold).and_return 1000
end end
def allow_high_graphql_transaction_threshold
stub_const("Gitlab::QueryLimiting::Transaction::THRESHOLD", 1000)
end
def node_array(data, extract_attribute = nil) def node_array(data, extract_attribute = nil)
data.map do |item| data.map do |item|
extract_attribute ? item['node'][extract_attribute] : item['node'] extract_attribute ? item['node'][extract_attribute] : item['node']
......
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