diff --git a/backend/src/schema/resolvers/searches.ts b/backend/src/schema/resolvers/searches.ts index fba74ecc7..5f4097c17 100644 --- a/backend/src/schema/resolvers/searches.ts +++ b/backend/src/schema/resolvers/searches.ts @@ -110,7 +110,13 @@ const searchResultPromise = async (session, setup, params) => { } const searchResultCallback = (result) => { - return result.records.map((r) => r.get('result')) + const response = result.records.map((r) => r.get('result')) + if (Array.isArray(response) && response.length && response[0].__typename === 'Post') { + response.forEach((post) => { + post.postType = [post.postType] + }) + } + return response } const countResultCallback = (result) => { diff --git a/webapp/graphql/Search.js b/webapp/graphql/Search.js index b8c4fcb51..beb017b5a 100644 --- a/webapp/graphql/Search.js +++ b/webapp/graphql/Search.js @@ -53,6 +53,16 @@ export const searchPosts = gql` shoutedCount clickedCount viewedTeaserCount + postType + eventStart + eventEnd + eventVenue + eventLocationName + eventLocation { + lng + lat + } + eventIsOnline author { ...user }