mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-12 23:35:58 +00:00
add graphql for group search
This commit is contained in:
parent
cb1e9f95e0
commit
add85ef49c
@ -62,6 +62,18 @@ export const postFragment = gql`
|
||||
}
|
||||
`
|
||||
|
||||
export const groupFragment = gql`
|
||||
fragment group on Group {
|
||||
id
|
||||
groupName: name
|
||||
slug
|
||||
disabled
|
||||
deleted
|
||||
about
|
||||
groupType
|
||||
}
|
||||
`
|
||||
|
||||
export const postCountsFragment = gql`
|
||||
fragment postCounts on Post {
|
||||
commentsCount
|
||||
|
||||
@ -1,9 +1,15 @@
|
||||
import gql from 'graphql-tag'
|
||||
import { userFragment, postFragment, tagsCategoriesAndPinnedFragment } from './Fragments'
|
||||
import {
|
||||
userFragment,
|
||||
postFragment,
|
||||
groupFragment,
|
||||
tagsCategoriesAndPinnedFragment,
|
||||
} from './Fragments'
|
||||
|
||||
export const searchQuery = gql`
|
||||
${userFragment}
|
||||
${postFragment}
|
||||
${groupFragment}
|
||||
|
||||
query ($query: String!) {
|
||||
searchResults(query: $query, limit: 5) {
|
||||
@ -24,6 +30,9 @@ export const searchQuery = gql`
|
||||
... on Tag {
|
||||
id
|
||||
}
|
||||
... on Group {
|
||||
...group
|
||||
}
|
||||
}
|
||||
}
|
||||
`
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user