Skip to content

Commit ae2695f

Browse files
author
Stephen Gutekanst
committed
update src/shared
1 parent da1fb33 commit ae2695f

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/shared/api.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ const discussionCommentFieldsFragment = `
77
author {
88
...UserFields
99
}
10+
contents
1011
html
1112
inlineURL
1213
createdAt
@@ -90,13 +91,17 @@ export async function createThread(
9091
...DiscussionThreadFields
9192
comments {
9293
totalCount
94+
nodes {
95+
...DiscussionCommentFields
96+
}
9397
}
9498
}
9599
}
96100
}
97101
${discussionThreadFieldsFragment(relativeRev)}
102+
${discussionCommentFieldsFragment}
98103
`,
99-
{ input }
104+
{ input, relativeRev }
100105
)
101106
if (!data || !data.discussions || !data.discussions.createThread) {
102107
throw createAggregateError(errors)
@@ -190,7 +195,7 @@ export async function fetchDiscussionThreadAndComments(
190195
${discussionThreadFieldsFragment(relativeRev)}
191196
${discussionCommentFieldsFragment}
192197
`,
193-
{ threadID }
198+
{ threadID, relativeRev }
194199
)
195200
if (
196201
!data ||
@@ -231,7 +236,7 @@ export async function addCommentToThread(
231236
${discussionThreadFieldsFragment(relativeRev)}
232237
${discussionCommentFieldsFragment}
233238
`,
234-
{ threadID, contents }
239+
{ threadID, contents, relativeRev }
235240
)
236241
if (!data || !data.discussions || !data.discussions.addCommentToThread) {
237242
throw createAggregateError(errors)

0 commit comments

Comments
 (0)