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
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from BaseObject
accepts, assignable?, authorization, authorize, authorized?, #current_user
#present, #unpresented
Class Method Details
.authorization_scopes ⇒ Object
16
17
18
|
# File 'app/graphql/types/notes/note_type.rb', line 16
def self.authorization_scopes
super + [:ai_workflows]
end
|
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.
83
84
85
86
87
88
|
# File 'app/graphql/types/notes/note_type.rb', line 83
def id
return super unless object.is_a?(SyntheticNote)
::Gitlab::GlobalId.build(object, model_name: object.object.class.to_s, id: object.discussion_id)
end
|
#position ⇒ Object
90
91
92
|
# File 'app/graphql/types/notes/note_type.rb', line 90
def position
object.position if object.position.is_a?(Gitlab::Diff::Position)
end
|
#system_note_icon_name ⇒ Object