random top articles query (#109)

* loadRandomTopShouts

* minor fixes

---------

Co-authored-by: Igor Lobanov <igor.lobanov@onetwotrip.com>
This commit is contained in:
Igor Lobanov
2023-12-13 23:56:01 +01:00
committed by GitHub
parent b63b6e7ee7
commit f9bc1d67ae
2 changed files with 106 additions and 56 deletions

View File

@@ -212,14 +212,13 @@ input AuthorsBy {
}
input LoadShoutsFilters {
title: String
body: String
topic: String
author: String
layout: String
excludeLayout: String
visibility: String
days: Int
fromDate: String
toDate: String
reacted: Boolean
}
@@ -232,6 +231,12 @@ input LoadShoutsOptions {
order_by_desc: Boolean
}
input LoadRandomTopShoutsParams {
filters: LoadShoutsFilters
limit: Int!
fromRandomCount: Int
}
input ReactionBy {
shout: String # slug
shouts: [String]
@@ -276,6 +281,7 @@ type Query {
loadAuthorsBy(by: AuthorsBy, limit: Int, offset: Int): [Author]!
loadShout(slug: String, shout_id: Int): Shout
loadShouts(options: LoadShoutsOptions): [Shout]!
loadRandomTopShouts(params: LoadRandomTopShoutsParams): [Shout]!
loadDrafts: [Shout]!
loadReactionsBy(by: ReactionBy!, limit: Int, offset: Int): [Reaction]!
userFollowers(slug: String!): [Author]!