roschaefer 2bf998d1ba DRY graphql query with fragments
This is also adding `disabled`, `deleted` flags. I don't know if it
would change anything in the template, but now they are there.
2019-12-20 20:20:47 +01:00

25 lines
441 B
JavaScript

import gql from 'graphql-tag'
import { userFragment, postFragment } from './Fragments'
export const findResourcesQuery = gql`
${userFragment}
${postFragment}
query($query: String!) {
findResources(query: $query, limit: 5) {
__typename
... on Post {
...post
commentsCount
shoutedCount
author {
...user
}
}
... on User {
...user
}
}
}
`