diff options
author | charlieablett <cablett@gitlab.com> | 2019-08-23 00:17:38 +1000 |
---|---|---|
committer | charlieablett <cablett@gitlab.com> | 2019-10-23 15:35:33 +1300 |
commit | 32cdfb95352b4269df288ae77d9ce85fd04e723f (patch) | |
tree | 588708e7454904f0b5f2e34be4c583eb9634bbd0 /app/graphql/gitlab_schema.rb | |
parent | dffeff5520e861dc6e7319b690c573186bbbd22e (diff) | |
download | gitlab-ce-32cdfb95352b4269df288ae77d9ce85fd04e723f.tar.gz |
Check for recursion and fail if too recursive
- List all overly-recursive fields
- Reduce recursion threshold to 2
- Add test for not-recursive-enough query
- Use reusable methods in tests
- Add changelog
- Set changeable acceptable recursion level
- Add error check test helpers
Diffstat (limited to 'app/graphql/gitlab_schema.rb')
-rw-r--r-- | app/graphql/gitlab_schema.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/app/graphql/gitlab_schema.rb b/app/graphql/gitlab_schema.rb index 4c8612c8f2e..1899278ff3c 100644 --- a/app/graphql/gitlab_schema.rb +++ b/app/graphql/gitlab_schema.rb @@ -18,15 +18,15 @@ class GitlabSchema < GraphQL::Schema use Gitlab::Graphql::GenericTracing query_analyzer Gitlab::Graphql::QueryAnalyzers::LoggerAnalyzer.new - - query(Types::QueryType) - - default_max_page_size 100 + query_analyzer Gitlab::Graphql::QueryAnalyzers::RecursionAnalyzer.new max_complexity DEFAULT_MAX_COMPLEXITY max_depth DEFAULT_MAX_DEPTH - mutation(Types::MutationType) + query Types::QueryType + mutation Types::MutationType + + default_max_page_size 100 class << self def multiplex(queries, **kwargs) |