mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
Removed category fragments form search gql
This commit is contained in:
parent
de2193e75a
commit
da801d6410
@ -928,19 +928,21 @@ const languages = ['de', 'en', 'es', 'fr', 'it', 'pt', 'pl']
|
|||||||
trollingComment.update({ disabled: true, updatedAt: new Date().toISOString(), closed: true }),
|
trollingComment.update({ disabled: true, updatedAt: new Date().toISOString(), closed: true }),
|
||||||
])
|
])
|
||||||
|
|
||||||
const additionalUsers = await Promise.all([...Array(30).keys()].map(() => Factory.build('user')))
|
const additionalUsers = await Promise.all(
|
||||||
|
[...Array(30).keys()].map(() => Factory.build('user')),
|
||||||
|
)
|
||||||
|
|
||||||
await Promise.all(
|
await Promise.all(
|
||||||
additionalUsers.map(async (user) => {
|
additionalUsers.map(async (user) => {
|
||||||
await jennyRostock.relateTo(user, 'following')
|
await jennyRostock.relateTo(user, 'following')
|
||||||
await user.relateTo(jennyRostock, 'following')
|
await user.relateTo(jennyRostock, 'following')
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
|
|
||||||
await Promise.all(
|
await Promise.all(
|
||||||
[...Array(30).keys()].map((index) => Factory.build('user', { name: `Jenny${index}` })),
|
[...Array(30).keys()].map((index) => Factory.build('user', { name: `Jenny${index}` })),
|
||||||
)
|
)
|
||||||
|
|
||||||
await Promise.all(
|
await Promise.all(
|
||||||
[...Array(30).keys()].map(() =>
|
[...Array(30).keys()].map(() =>
|
||||||
Factory.build(
|
Factory.build(
|
||||||
@ -956,7 +958,7 @@ const languages = ['de', 'en', 'es', 'fr', 'it', 'pt', 'pl']
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
await Promise.all(
|
await Promise.all(
|
||||||
[...Array(30).keys()].map(() =>
|
[...Array(30).keys()].map(() =>
|
||||||
Factory.build(
|
Factory.build(
|
||||||
|
|||||||
@ -1,17 +1,15 @@
|
|||||||
import gql from 'graphql-tag'
|
import gql from 'graphql-tag'
|
||||||
import { userFragment, postFragment, tagsCategoriesAndPinnedFragment } from './Fragments'
|
import { userFragment, postFragment } from './Fragments'
|
||||||
|
|
||||||
export const searchQuery = gql`
|
export const searchQuery = gql`
|
||||||
${userFragment}
|
${userFragment}
|
||||||
${postFragment}
|
${postFragment}
|
||||||
${tagsCategoriesAndPinnedFragment}
|
|
||||||
|
|
||||||
query($query: String!) {
|
query($query: String!) {
|
||||||
searchResults(query: $query, limit: 5) {
|
searchResults(query: $query, limit: 5) {
|
||||||
__typename
|
__typename
|
||||||
... on Post {
|
... on Post {
|
||||||
...post
|
...post
|
||||||
...tagsCategoriesAndPinned
|
|
||||||
commentsCount
|
commentsCount
|
||||||
shoutedCount
|
shoutedCount
|
||||||
author {
|
author {
|
||||||
@ -31,7 +29,6 @@ export const searchQuery = gql`
|
|||||||
export const searchPosts = gql`
|
export const searchPosts = gql`
|
||||||
${userFragment}
|
${userFragment}
|
||||||
${postFragment}
|
${postFragment}
|
||||||
${tagsCategoriesAndPinnedFragment}
|
|
||||||
|
|
||||||
query($query: String!, $firstPosts: Int, $postsOffset: Int) {
|
query($query: String!, $firstPosts: Int, $postsOffset: Int) {
|
||||||
searchPosts(query: $query, firstPosts: $firstPosts, postsOffset: $postsOffset) {
|
searchPosts(query: $query, firstPosts: $firstPosts, postsOffset: $postsOffset) {
|
||||||
@ -39,7 +36,6 @@ export const searchPosts = gql`
|
|||||||
posts {
|
posts {
|
||||||
__typename
|
__typename
|
||||||
...post
|
...post
|
||||||
...tagsCategoriesAndPinned
|
|
||||||
commentsCount
|
commentsCount
|
||||||
shoutedCount
|
shoutedCount
|
||||||
author {
|
author {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user