2018-12-05 23:21:45 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-11-08 19:23:39 +05:30
|
|
|
module Types
|
|
|
|
class BaseObject < GraphQL::Schema::Object
|
|
|
|
prepend Gitlab::Graphql::Present
|
|
|
|
prepend Gitlab::Graphql::ExposePermissions
|
2019-09-30 21:07:59 +05:30
|
|
|
prepend Gitlab::Graphql::MarkdownField
|
2018-11-08 19:23:39 +05:30
|
|
|
|
|
|
|
field_class Types::BaseField
|
2019-09-04 21:01:54 +05:30
|
|
|
|
|
|
|
# All graphql fields exposing an id, should expose a global id.
|
|
|
|
def id
|
|
|
|
GitlabSchema.id_from_object(object)
|
|
|
|
end
|
2018-11-08 19:23:39 +05:30
|
|
|
end
|
|
|
|
end
|