Eduflow
Search…
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:
Query
Response
1
{
2
activity(id: "ae8f3183-0fd0-48e1-b52d-2f455cd78db7") {
3
... on DiscussionActivity {
4
title
5
topics(first: 2) {
6
edges {
7
node {
8
title
9
content
10
likesCount
11
author {
12
name
13
}
14
commentsCount
15
comments {
16
edges {
17
node {
18
content
19
likesCount
20
repliesCount
21
author {
22
name
23
}
24
replies {
25
edges {
26
node {
27
content
28
author {
29
name
30
}
31
}
32
}
33
}
34
}
35
}
36
}
37
}
38
}
39
}
40
}
41
}
42
}
43
Copied!
1
{
2
'data': {
3
'activity': {
4
'topics': {
5
'totalCount': 2,
6
'edges': [
7
{
8
'node': {
9
'title': 'Topic 2',
10
'content': '<p>Topic 2</p>',
11
'author': {
12
'name': 'Ryan Howard'
13
},
14
'commentsCount': 0,
15
'comments': {
16
'edges': [
17
]
18
},
19
'likesCount': 0
20
}
21
},
22
{
23
'node': {
24
'title': 'Topic 1',
25
'content': '<p>Topic 1</p>',
26
'author': {
27
'name': 'Ryan Howard'
28
},
29
'likesCount': 2,
30
'commentsCount': 4,
31
'comments': {
32
'edges': [
33
{
34
'node': {
35
'author': {
36
'name': 'Ryan Howard'
37
},
38
'content': '<p>Comment 1</p>',
39
'likesCount': 2,
40
'replies': {
41
'edges': [
42
{
43
'node': {
44
'author': {
45
'name': 'Ryan Howard'
46
},
47
'content': '<p>Reply 1</p>'
48
}
49
},
50
{
51
'node': {
52
'author': {
53
'name': 'Ryan Howard'
54
},
55
'content': '<p>Reply 2</p>'
56
}
57
}
58
]
59
},
60
'repliesCount': 2
61
}
62
},
63
{
64
'node': {
65
'author': {
66
'name': 'Pam Beesley'
67
},
68
'content': '<p>Comment 2</p>',
69
'likesCount': 0,
70
'replies': {
71
'edges': [
72
]
73
},
74
'repliesCount': 0
75
}
76
}
77
]
78
}
79
}
80
}
81
]
82
}
83
}
84
}
85
}
Copied!
Last modified 3mo ago