2018-09-11 19:08:34 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-05-23 07:55:14 +00:00
|
|
|
module Types
|
|
|
|
class BaseObject < GraphQL::Schema::Object
|
|
|
|
prepend Gitlab::Graphql::Present
|
2018-06-25 08:59:00 +00:00
|
|
|
prepend Gitlab::Graphql::ExposePermissions
|
2018-05-23 07:55:14 +00:00
|
|
|
|
|
|
|
field_class Types::BaseField
|
2019-06-03 17:38:16 +00:00
|
|
|
|
|
|
|
# All graphql fields exposing an id, should expose a global id.
|
|
|
|
def id
|
|
|
|
GitlabSchema.id_from_object(object)
|
|
|
|
end
|
2018-05-23 07:55:14 +00:00
|
|
|
end
|
|
|
|
end
|