Added findPost query

This commit is contained in:
Grzegorz Leoniec 2019-02-13 16:02:25 +01:00 committed by Matt Rider
parent bc6089dbf5
commit 832a778ca1

View File

@ -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