From 4f8ebebac338e497c4815920bbe38d7bf191c71f Mon Sep 17 00:00:00 2001 From: Moriz Wahl Date: Mon, 17 Oct 2022 19:20:41 +0200 Subject: [PATCH] add search groups to schema --- backend/src/schema/types/type/Search.gql | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/backend/src/schema/types/type/Search.gql b/backend/src/schema/types/type/Search.gql index 9537b5a84..5cb68e22d 100644 --- a/backend/src/schema/types/type/Search.gql +++ b/backend/src/schema/types/type/Search.gql @@ -1,4 +1,4 @@ -union SearchResult = Post | User | Tag +union SearchResult = Post | User | Tag | Group type postSearchResults { postCount: Int @@ -15,9 +15,15 @@ type hashtagSearchResults { hashtags: [Tag]! } +type groupSearchResults { + groupCount: Int + groups: [Group]! +} + type Query { searchPosts(query: String!, firstPosts: Int, postsOffset: Int): postSearchResults! searchUsers(query: String!, firstUsers: Int, usersOffset: Int): userSearchResults! + searchGroups(query: String!, firstGroups: Int, groupsOffset: Int): groupSearchResults! searchHashtags(query: String!, firstHashtags: Int, hashtagsOffset: Int): hashtagSearchResults! searchResults(query: String!, limit: Int = 5): [SearchResult]! }