Added findPost query

This commit is contained in:
Grzegorz Leoniec 2019-02-13 16:02:25 +01:00
parent a2590fe7b8
commit 4f8f0debbe
No known key found for this signature in database
GPG Key ID: 3AA43686D4EB1377

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