mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
Added findPost query
This commit is contained in:
parent
a2590fe7b8
commit
4f8f0debbe
@ -1,6 +1,16 @@
|
||||
type Query {
|
||||
isLoggedIn: Boolean!
|
||||
statistics: Statistics!
|
||||
findPosts(filter: String!, limit: Int = 10): [Post]! @cypher(
|
||||
statement: """
|
||||
CALL db.index.fulltext.queryNodes(
|
||||
'postTitleAndContent', $filter+'~')
|
||||
YIELD node AS node
|
||||
RETURN node
|
||||
ORDER BY node.createdAt DESC
|
||||
LIMIT $limit
|
||||
"""
|
||||
)
|
||||
}
|
||||
type Mutation {
|
||||
login(email: String!, password: String!): LoggedInUser
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user