needed queries
This commit is contained in:
parent
741ede054d
commit
ee53fe7508
|
@ -93,6 +93,12 @@ class TopShouts:
|
|||
async with TopShouts.lock:
|
||||
TopShouts.shouts_by_rating = shouts
|
||||
|
||||
@staticmethod
|
||||
async def prepare_shouts_by_time():
|
||||
month_ago = datetime.now() - timedelta(days = 30)
|
||||
with local_session() as session:
|
||||
# TODO: select recent shouts
|
||||
|
||||
@staticmethod
|
||||
async def prepare_favorites_shouts():
|
||||
with local_session() as session:
|
||||
|
|
|
@ -98,12 +98,12 @@ type Query {
|
|||
getMessages(count: Int = 100, page: Int = 1): [Message!]!
|
||||
|
||||
# shouts
|
||||
getShoutBySlug(slug: String!): Shout! # NOTE: with .comments: Comments[]
|
||||
# getShoutRating(shout: Int): Int!
|
||||
# shoutsByAuthor(author: Int): [Shout]!
|
||||
# shoutsByReplyTo(shout: Int): [Shout]!
|
||||
# shoutsByTags(tags: [String]): [Shout]!
|
||||
# shoutsByTime(time: DateTime): [Shout]!
|
||||
getShoutBySlug(slug: String!): Shout!
|
||||
# NOTE: with .comments: Comments[]
|
||||
recentShouts(limit: Int): [Shout]!
|
||||
shoutsByTopic(topic: String!, limit: Int!): [Shout]!
|
||||
shoutsByAuthor(author: String!, limit: Int!): [Shout]!
|
||||
shoutsByCommunity(community: String!, limit: Int!): [Shout]!
|
||||
|
||||
# mainpage
|
||||
topShoutsByView(limit: Int): [Shout]!
|
||||
|
|
Loading…
Reference in New Issue
Block a user