increment-view
This commit is contained in:
parent
61b1a2be49
commit
4446255f64
|
@ -15,6 +15,12 @@ from sqlalchemy import select, desc, and_
|
||||||
from sqlalchemy.orm import selectinload
|
from sqlalchemy.orm import selectinload
|
||||||
|
|
||||||
|
|
||||||
|
@mutation.field("incrementView")
|
||||||
|
async def increment_view(_, _info, shout):
|
||||||
|
async with ViewedStorage.lock:
|
||||||
|
return ViewedStorage.increment(shout)
|
||||||
|
|
||||||
|
|
||||||
@query.field("topViewed")
|
@query.field("topViewed")
|
||||||
async def top_viewed(_, _info, page, size):
|
async def top_viewed(_, _info, page, size):
|
||||||
async with ShoutsCache.lock:
|
async with ShoutsCache.lock:
|
||||||
|
|
|
@ -197,6 +197,9 @@ type Mutation {
|
||||||
unfollow(what: FollowingEntity!, slug: String!): Result!
|
unfollow(what: FollowingEntity!, slug: String!): Result!
|
||||||
|
|
||||||
# TODO: transform reaction with body to shout
|
# TODO: transform reaction with body to shout
|
||||||
|
|
||||||
|
# seen
|
||||||
|
incrementView(shout: String!): Result!
|
||||||
}
|
}
|
||||||
|
|
||||||
################################### Query
|
################################### Query
|
||||||
|
|
Loading…
Reference in New Issue
Block a user