shoutsByLayout, no checks

This commit is contained in:
tonyrewin 2022-11-12 21:13:23 +03:00
parent 3ae65b0c36
commit 25dd0ba553
3 changed files with 18 additions and 13 deletions

5
CHECKS
View File

@ -1,5 +0,0 @@
WAIT=30
TIMEOUT=10
ATTEMPTS=60 # 60 * 30 = 30 min
/ Playground

View File

@ -347,7 +347,7 @@ def prepare_html_body(entry):
def extract_html(entry): def extract_html(entry):
body_orig = entry.get("body").replace('\(', '(').replace('/)', ')') or "" body_orig = (entry.get("body") or "").replace('\(', '(').replace('/)', ')')
media = entry.get("media", []) media = entry.get("media", [])
kind = entry.get("type") or "" kind = entry.get("type") or ""
print("[extract] kind: " + kind) print("[extract] kind: " + kind)

View File

@ -26,12 +26,21 @@ type AuthResult {
type ChatMember { type ChatMember {
slug: String! slug: String!
name: String! name: String!
pic: String userpic: String
invitedAt: DateTime invitedAt: DateTime
invitedBy: String # user slug invitedBy: String # user slug
# TODO: add more # TODO: add more
} }
type Author {
slug: String!
name: String
userpic: String
stat: AuthorStat
roles: [Role] # in different communities
lastSeen: DateTime
}
type Result { type Result {
error: String error: String
uids: [String] uids: [String]
@ -43,8 +52,8 @@ type Result {
members: [ChatMember] members: [ChatMember]
shout: Shout shout: Shout
shouts: [Shout] shouts: [Shout]
author: User author: Author
authors: [User] authors: [Author]
reaction: Reaction reaction: Reaction
reactions: [Reaction] reactions: [Reaction]
topic: Topic topic: Topic
@ -212,19 +221,20 @@ type Query {
signOut: AuthResult! signOut: AuthResult!
# profile # profile
getUsersBySlugs(slugs: [String]!): [User]! getUsersBySlugs(slugs: [String]!): [Author]!
userFollowers(slug: String!): [User]! userFollowers(slug: String!): [Author]!
userFollowedAuthors(slug: String!): [User]! userFollowedAuthors(slug: String!): [Author]!
userFollowedTopics(slug: String!): [Topic]! userFollowedTopics(slug: String!): [Topic]!
userFollowedCommunities(slug: String!): [Community]! userFollowedCommunities(slug: String!): [Community]!
userReactedShouts(slug: String!): [Shout]! # test userReactedShouts(slug: String!): [Shout]! # test
getUserRoles(slug: String!): [Role]! getUserRoles(slug: String!): [Role]!
authorsAll: [User]! authorsAll: [Author]!
getAuthor(slug: String!): User! getAuthor(slug: String!): User!
# shouts # shouts
getShoutBySlug(slug: String!): Shout! getShoutBySlug(slug: String!): Shout!
shoutsForFeed(offset: Int!, limit: Int!): [Shout]! # test shoutsForFeed(offset: Int!, limit: Int!): [Shout]! # test
shoutsByLayout(layout: String, amount: Int!, offset: Int!): [Shout]!
shoutsByTopics(slugs: [String]!, offset: Int!, limit: Int!): [Shout]! shoutsByTopics(slugs: [String]!, offset: Int!, limit: Int!): [Shout]!
shoutsByAuthors(slugs: [String]!, offset: Int!, limit: Int!): [Shout]! shoutsByAuthors(slugs: [String]!, offset: Int!, limit: Int!): [Shout]!
shoutsByCommunities(slugs: [String]!, offset: Int!, limit: Int!): [Shout]! shoutsByCommunities(slugs: [String]!, offset: Int!, limit: Int!): [Shout]!