From 18ce9bdf4c25c6712d01ac1c5b51f4e8b2fe7d24 Mon Sep 17 00:00:00 2001 From: Mike Griffin Date: Fri, 8 Sep 2023 16:22:19 +0100 Subject: [PATCH] Add answered filter and isAnswered field --- .../guides/using-the-graphql-api-for-discussions.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/content/graphql/guides/using-the-graphql-api-for-discussions.md b/content/graphql/guides/using-the-graphql-api-for-discussions.md index 090fe2c43e9b..2e052e26bbcf 100644 --- a/content/graphql/guides/using-the-graphql-api-for-discussions.md +++ b/content/graphql/guides/using-the-graphql-api-for-discussions.md @@ -15,6 +15,7 @@ This API is available for authenticated users, {% data variables.product.prodnam ### Repository.discussions List the discussions within a repository. If `categoryId` is specified, only results within that category will be returned. +If `answered` is not specified, both answered and unanswered discussions will be returned. _Signature:_ @@ -25,6 +26,7 @@ discussions( first: Int, last: Int, categoryId: ID = null, + answered: Boolean = null, orderBy: DiscussionOrder = {field: UPDATED_AT, direction: DESC} ) : Discussion ``` @@ -157,6 +159,11 @@ type Discussion implements Comment & Deletable & Lockable & Node & Reactable & R """ activeLockReason: LockReason + """ + Check if this discussion has been answered + """ + isAnswered: Boolean! + """ The comment chosen as this discussion's answer, if any. """