getDiscussions method

Future<DiscussionList> getDiscussions({
  1. List<String> categories = const [],
  2. List<String> tags = const [],
  3. String? orderBy,
  4. String? searchQuery,
  5. required int offset,
})

Implementation

Future<DiscussionList> getDiscussions({
  List<String> categories = const [],
  List<String> tags = const [],
  String? orderBy,
  String? searchQuery,
  required int offset,
}) async {
  final data = await makeGraphQLRequest(getGraphQLPayloadDiscussionList(
    offset: offset,
    tags: tags,
    categories: categories,
    orderBy: orderBy,
    searchQuery: searchQuery,
  ));
  return DiscussionList.fromJson(data['data']['categoryTopicList']);
}