Class: Types::Notes::NoteType
- Inherits:
-
BaseObject
- Object
- GraphQL::Schema::Object
- BaseObject
- Types::Notes::NoteType
show all
- Defined in:
- app/graphql/types/notes/note_type.rb
Instance Method Summary
collapse
Methods inherited from BaseObject
accepts, assignable?, authorization, authorize, authorized?, #current_user
#present, #unpresented
Instance Method Details
#id ⇒ Object
We now support also SyntheticNote notes as a NoteType, but SyntheticNote does not have a real note ID, as SyntheticNote is generated dynamically from a ResourceEvent instance.
118
119
120
121
122
|
# File 'app/graphql/types/notes/note_type.rb', line 118
def id
return super unless object.is_a?(SyntheticNote)
::Gitlab::GlobalId.build(object, model_name: object.class.to_s, id: object.discussion_id)
end
|
#system_note_icon_name ⇒ Object
#url ⇒ Object
100
101
102
|
# File 'app/graphql/types/notes/note_type.rb', line 100
def url
::Gitlab::UrlBuilder.build(object)
end
|