Discussions

Topics & Comments

A DiscussionActivity consists of topics. A Topic contains a connection to Comment, which contains the top-level comments, then every Comment contains a connection to Comment for replies.

Comment replies in Eduflow go one level deep only.

API Example

Topics and Comments are available via a pageable GraphQL Connection:

{
  activity(id: "ae8f3183-0fd0-48e1-b52d-2f455cd78db7") {
    ... on DiscussionActivity {
      title
      topics(first: 2) {
        edges {
          node {
            title
            content
            likesCount
            author {
              name
            }
            commentsCount
            comments {
              edges {
                node {
                  content
                  likesCount
                  repliesCount
                  author {
                    name
                  }
                  replies {
                    edges {
                      node {
                        content
                        author {
                          name
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}

Last updated