Welcome to mirror list, hosted at ThFree Co, Russian Federation.

blob_connection_type.rb « snippets « types « graphql « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 15d26af73741704f1a297a94b04121033094fbc9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# frozen_string_literal: true

module Types
  module Snippets
    # rubocop: disable Graphql/AuthorizeTypes
    class BlobConnectionType < GraphQL::Types::Relay::BaseConnection
      field :has_unretrievable_blobs, GraphQL::Types::Boolean, null: false,
            description: 'Indicates if the snippet has unretrievable blobs.',
            resolver_method: :unretrievable_blobs?

      def unretrievable_blobs?
        !!context[:unretrievable_blobs?]
      end
    end
  end
end