diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-20 17:22:11 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-20 17:22:11 +0300 |
commit | 0c872e02b2c822e3397515ec324051ff540f0cd5 (patch) | |
tree | ce2fb6ce7030e4dad0f4118d21ab6453e5938cdd /app/graphql/resolvers/base_resolver.rb | |
parent | f7e05a6853b12f02911494c4b3fe53d9540d74fc (diff) |
Add latest changes from gitlab-org/gitlab@15-7-stable-eev15.7.0-rc42
Diffstat (limited to 'app/graphql/resolvers/base_resolver.rb')
-rw-r--r-- | app/graphql/resolvers/base_resolver.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/app/graphql/resolvers/base_resolver.rb b/app/graphql/resolvers/base_resolver.rb index 2b54a3fdd55..6f847221f1b 100644 --- a/app/graphql/resolvers/base_resolver.rb +++ b/app/graphql/resolvers/base_resolver.rb @@ -15,6 +15,13 @@ module Resolvers @calls_gitaly = true end + # This is a flag to allow us to use `complexity_multiplier` to compute complexity for connection + # fields(see BaseField#connection_complexity_multiplier) in resolvers that do external connection pagination, + # thus disabling the default `connection` option(see self.field_options method above). + def self.calculate_ext_conn_complexity + false + end + def self.field_options extra_options = { requires_argument: @requires_argument, @@ -116,7 +123,7 @@ module Resolvers # When fetching many items, additional complexity is added to the field # depending on how many items is fetched. For each item we add 1% of the # original complexity - this means that loading 100 items (our default - # maxp_age_size limit) doubles the original complexity. + # max_page_size limit) doubles the original complexity. # # Complexity is not increased when searching by specific ID(s), because # complexity difference is minimal in this case. |