diff options
author | charlieablett <cablett@gitlab.com> | 2019-06-16 22:12:56 +1200 |
---|---|---|
committer | charlieablett <cablett@gitlab.com> | 2019-07-03 22:53:13 +1200 |
commit | 8b809837f44bbebdac65eebadb09a45fb60c6a65 (patch) | |
tree | f4c4d929f6dcd74c939290eaf1d79f809b6032fe /app/graphql/types/tree | |
parent | 9b06890d1d6901b840fb321c9b99264c2e8813f7 (diff) | |
download | gitlab-ce-8b809837f44bbebdac65eebadb09a45fb60c6a65.tar.gz |
Enumerate fields with Gitaly calls
- Add a complexity of 1 if Gitaly is called at least once
- Add an error notification if `calls_gitaly` isn't right for a
particular field
Diffstat (limited to 'app/graphql/types/tree')
-rw-r--r-- | app/graphql/types/tree/tree_type.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/graphql/types/tree/tree_type.rb b/app/graphql/types/tree/tree_type.rb index b947713074e..2023abc13f9 100644 --- a/app/graphql/types/tree/tree_type.rb +++ b/app/graphql/types/tree/tree_type.rb @@ -15,9 +15,9 @@ module Types Gitlab::Graphql::Representation::TreeEntry.decorate(obj.trees, obj.repository) end - field :submodules, Types::Tree::SubmoduleType.connection_type, null: false + field :submodules, Types::Tree::SubmoduleType.connection_type, null: false, calls_gitaly: true - field :blobs, Types::Tree::BlobType.connection_type, null: false, resolve: -> (obj, args, ctx) do + field :blobs, Types::Tree::BlobType.connection_type, null: false, calls_gitaly: true, resolve: -> (obj, args, ctx) do Gitlab::Graphql::Representation::TreeEntry.decorate(obj.blobs, obj.repository) end # rubocop: enable Graphql/AuthorizeTypes |