Commit 3dbe5eb8 authored by Brett Walker's avatar Brett Walker

Add the allow_high_graphql_transaction_threshold

method to allow a high number of transactions when
using all_graphql_fields_for
parent 52b9a1cd
......@@ -136,6 +136,7 @@ module GraphqlHelpers
allow_unlimited_graphql_complexity
allow_unlimited_graphql_depth
allow_high_graphql_recursion
allow_high_graphql_transaction_threshold
type = GitlabSchema.types[class_name.to_s]
return "" unless type
......@@ -295,6 +296,10 @@ module GraphqlHelpers
allow_any_instance_of(Gitlab::Graphql::QueryAnalyzers::RecursionAnalyzer).to receive(:recursion_threshold).and_return 1000
end
def allow_high_graphql_transaction_threshold
stub_const("Gitlab::QueryLimiting::Transaction::THRESHOLD", 1000)
end
def node_array(data, extract_attribute = nil)
data.map do |item|
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