summaryrefslogtreecommitdiff
path: root/app/graphql/types/notes/discussion_type.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/graphql/types/notes/discussion_type.rb')
-rw-r--r--app/graphql/types/notes/discussion_type.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/app/graphql/types/notes/discussion_type.rb b/app/graphql/types/notes/discussion_type.rb
new file mode 100644
index 00000000000..c4691942f2d
--- /dev/null
+++ b/app/graphql/types/notes/discussion_type.rb
@@ -0,0 +1,15 @@
+# frozen_string_literal: true
+
+module Types
+ module Notes
+ class DiscussionType < BaseObject
+ graphql_name 'Discussion'
+
+ authorize :read_note
+
+ field :id, GraphQL::ID_TYPE, null: false
+ field :created_at, Types::TimeType, null: false
+ field :notes, Types::Notes::NoteType.connection_type, null: false, description: "All notes in the discussion"
+ end
+ end
+end