2019-02-15 15:39:39 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-11-08 19:23:39 +05:30
|
|
|
module Gitlab
|
|
|
|
module Graphql
|
|
|
|
# Allow fields to declare permissions their objects must have. The field
|
|
|
|
# will be set to nil unless all required permissions are present.
|
|
|
|
module Authorize
|
|
|
|
extend ActiveSupport::Concern
|
|
|
|
|
|
|
|
def self.use(schema_definition)
|
2019-05-18 00:54:41 +05:30
|
|
|
schema_definition.instrument(:field, Instrumentation.new, after_built_ins: true)
|
2018-11-08 19:23:39 +05:30
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|