diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-19 06:07:38 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-19 06:07:38 +0300 |
commit | 0cee6f1577cd31cae7dc0e82f65dcad462a4d18a (patch) | |
tree | 180a48cc0b5b15e6f2ac489a6c828ebab591d4cf /lib/gitlab/graphql | |
parent | dcd01617a750c41fd082cc3383fc7ad2f2afd026 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/graphql')
-rw-r--r-- | lib/gitlab/graphql/queries.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/gitlab/graphql/queries.rb b/lib/gitlab/graphql/queries.rb index cf06a2729d9..9cdc84ffaa3 100644 --- a/lib/gitlab/graphql/queries.rb +++ b/lib/gitlab/graphql/queries.rb @@ -91,7 +91,8 @@ module Gitlab end def print_field(field, indent: '') - if skips? && field.directives.any? { |d| d.name == 'client' } + if skips? && + (field.directives.any? { |d| d.name == 'client' || d.name == 'persist' } || field.name == '__persist') skipped = self.class.new(false) skipped.print_node(field) @@ -136,7 +137,7 @@ module Gitlab qs = [query] + all_imports(mode: mode).uniq.sort.map { |p| fragment(p).query } t = qs.join("\n\n").gsub(/\n\n+/, "\n\n") - return t unless /@client/.match?(t) + return t unless /(@client)|(persist)/.match?(t) doc = ::GraphQL.parse(t) printer = ClientFieldRedactor.new |