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