Dao complex filtering #181
Some checks failed
Test before pr merge / test-lint (pull_request) Failing after 6s
Some checks failed
Test before pr merge / test-lint (pull_request) Failing after 6s
This commit is contained in:
@@ -7,9 +7,9 @@ from model.post import Post
|
||||
class PostFilter(Filter[Post]):
|
||||
def __init__(self):
|
||||
Filter.__init__(self)
|
||||
self.field("id", int)
|
||||
self.field("title", str)
|
||||
self.field("content", str)
|
||||
self.int_field("id")
|
||||
self.string_field("title")
|
||||
self.string_field("content")
|
||||
|
||||
class PostSort(Sort[Post]):
|
||||
def __init__(self):
|
||||
@@ -18,7 +18,6 @@ class PostSort(Sort[Post]):
|
||||
self.field("title", SortOrder)
|
||||
self.field("content", SortOrder)
|
||||
|
||||
|
||||
class PostGraphType(GraphType[Post]):
|
||||
|
||||
def __init__(self):
|
||||
@@ -35,4 +34,4 @@ class PostGraphType(GraphType[Post]):
|
||||
self.string_field(
|
||||
"content",
|
||||
resolver=lambda root: root.content,
|
||||
)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user