2021-08-21 02:17:15 +03:00
|
|
|
scalar DateTime
|
|
|
|
|
2022-07-21 14:58:50 +03:00
|
|
|
################################### Payload ###################################
|
2021-08-21 02:17:15 +03:00
|
|
|
|
2022-08-11 08:53:14 +03:00
|
|
|
enum MessageStatus {
|
|
|
|
NEW
|
|
|
|
UPDATED
|
|
|
|
DELETED
|
|
|
|
}
|
|
|
|
|
2022-10-04 15:07:41 +03:00
|
|
|
type UserFollowings {
|
2022-08-12 15:50:59 +03:00
|
|
|
unread: Int
|
|
|
|
topics: [String]
|
|
|
|
authors: [String]
|
|
|
|
reactions: [Int]
|
|
|
|
communities: [String]
|
|
|
|
}
|
|
|
|
|
2021-08-21 02:17:15 +03:00
|
|
|
type AuthResult {
|
2022-02-03 12:13:53 +03:00
|
|
|
error: String
|
|
|
|
token: String
|
|
|
|
user: User
|
2022-10-04 15:07:41 +03:00
|
|
|
news: UserFollowings
|
2021-08-21 02:17:15 +03:00
|
|
|
}
|
|
|
|
|
2022-11-02 13:00:04 +03:00
|
|
|
type ChatMember {
|
2022-11-21 11:13:57 +03:00
|
|
|
id: Int!
|
2022-11-02 13:00:04 +03:00
|
|
|
slug: String!
|
|
|
|
name: String!
|
2022-11-12 21:13:23 +03:00
|
|
|
userpic: String
|
2022-11-21 11:13:57 +03:00
|
|
|
lastSeen: DateTime
|
2022-11-02 13:00:04 +03:00
|
|
|
invitedAt: DateTime
|
|
|
|
invitedBy: String # user slug
|
|
|
|
# TODO: add more
|
|
|
|
}
|
|
|
|
|
2022-11-13 07:21:09 +03:00
|
|
|
type AuthorStat {
|
|
|
|
followings: Int
|
|
|
|
followers: Int
|
|
|
|
rating: Int
|
2022-11-13 18:24:29 +03:00
|
|
|
commented: Int
|
2022-11-19 14:35:34 +03:00
|
|
|
shouts: Int
|
2022-11-13 07:21:09 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2022-11-12 21:13:23 +03:00
|
|
|
type Author {
|
2022-11-13 07:21:09 +03:00
|
|
|
id: Int!
|
2022-11-12 21:13:23 +03:00
|
|
|
slug: String!
|
2022-11-13 07:21:09 +03:00
|
|
|
name: String!
|
2022-11-12 21:13:23 +03:00
|
|
|
userpic: String
|
2022-11-13 07:21:09 +03:00
|
|
|
caption: String # only for full shout
|
|
|
|
bio: String
|
|
|
|
links: [String]
|
2022-11-12 21:13:23 +03:00
|
|
|
stat: AuthorStat
|
|
|
|
roles: [Role] # in different communities
|
|
|
|
lastSeen: DateTime
|
|
|
|
}
|
|
|
|
|
2022-07-21 14:58:50 +03:00
|
|
|
type Result {
|
2022-02-03 12:13:53 +03:00
|
|
|
error: String
|
2022-11-12 00:27:17 +03:00
|
|
|
uids: [String]
|
|
|
|
slugs: [String]
|
2022-11-02 13:00:04 +03:00
|
|
|
chat: Chat
|
|
|
|
chats: [Chat]
|
|
|
|
message: Message
|
|
|
|
messages: [Message]
|
|
|
|
members: [ChatMember]
|
2022-07-21 14:58:50 +03:00
|
|
|
shout: Shout
|
|
|
|
shouts: [Shout]
|
2022-11-12 21:13:23 +03:00
|
|
|
author: Author
|
|
|
|
authors: [Author]
|
2022-07-21 14:58:50 +03:00
|
|
|
reaction: Reaction
|
|
|
|
reactions: [Reaction]
|
|
|
|
topic: Topic
|
|
|
|
topics: [Topic]
|
|
|
|
community: Community
|
|
|
|
communities: [Community]
|
|
|
|
}
|
|
|
|
|
|
|
|
enum ReactionStatus {
|
|
|
|
NEW
|
|
|
|
UPDATED
|
|
|
|
CHANGED
|
|
|
|
EXPLAINED
|
|
|
|
DELETED
|
|
|
|
}
|
|
|
|
|
|
|
|
type ReactionUpdating {
|
|
|
|
error: String
|
|
|
|
status: ReactionStatus
|
|
|
|
reaction: Reaction
|
2021-08-21 02:17:15 +03:00
|
|
|
}
|
|
|
|
|
2022-07-21 14:58:50 +03:00
|
|
|
################################### Inputs ###################################
|
|
|
|
|
2021-08-21 02:17:15 +03:00
|
|
|
input ShoutInput {
|
2022-02-03 12:13:53 +03:00
|
|
|
slug: String!
|
|
|
|
body: String!
|
2022-06-28 22:40:44 +03:00
|
|
|
community: String!
|
2022-02-03 12:13:53 +03:00
|
|
|
mainTopic: String
|
|
|
|
topic_slugs: [String]
|
|
|
|
title: String
|
|
|
|
subtitle: String
|
|
|
|
versionOf: String
|
|
|
|
visibleForRoles: [String] # role ids are strings
|
2022-11-02 16:36:10 +03:00
|
|
|
visibleForUsers: [String]
|
2021-08-21 03:40:41 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
input ProfileInput {
|
2022-02-03 12:13:53 +03:00
|
|
|
name: String
|
|
|
|
userpic: String
|
|
|
|
links: [String]
|
|
|
|
bio: String
|
2021-08-21 02:17:15 +03:00
|
|
|
}
|
|
|
|
|
2021-12-12 18:29:51 +03:00
|
|
|
input TopicInput {
|
2022-02-03 12:13:53 +03:00
|
|
|
slug: String!
|
2022-07-21 14:58:50 +03:00
|
|
|
community: String!
|
2022-02-03 12:13:53 +03:00
|
|
|
title: String
|
|
|
|
body: String
|
|
|
|
pic: String
|
2022-11-19 16:18:17 +03:00
|
|
|
# children: [String]
|
|
|
|
# parents: [String]
|
2022-01-28 12:49:46 +03:00
|
|
|
}
|
|
|
|
|
2022-07-21 14:58:50 +03:00
|
|
|
input ReactionInput {
|
|
|
|
kind: Int!
|
|
|
|
shout: String!
|
|
|
|
range: String
|
|
|
|
body: String
|
|
|
|
replyTo: Int
|
2022-01-28 12:49:46 +03:00
|
|
|
}
|
|
|
|
|
2022-11-02 16:36:10 +03:00
|
|
|
input ChatInput {
|
|
|
|
id: String!
|
|
|
|
title: String
|
|
|
|
description: String
|
|
|
|
}
|
|
|
|
|
2022-07-21 14:58:50 +03:00
|
|
|
enum FollowingEntity {
|
2022-06-12 10:51:22 +03:00
|
|
|
TOPIC
|
|
|
|
AUTHOR
|
|
|
|
COMMUNITY
|
2022-07-21 14:58:50 +03:00
|
|
|
REACTIONS
|
2022-06-12 10:51:22 +03:00
|
|
|
}
|
|
|
|
|
2021-08-21 02:17:15 +03:00
|
|
|
################################### Mutation
|
|
|
|
|
|
|
|
type Mutation {
|
2022-08-11 08:53:14 +03:00
|
|
|
# inbox
|
2022-11-02 16:36:10 +03:00
|
|
|
createChat(title: String, members: [String]!): Result!
|
|
|
|
updateChat(chat: ChatInput!): Result!
|
2022-11-12 10:13:51 +03:00
|
|
|
deleteChat(chatId: String!): Result!
|
2022-10-04 02:43:08 +03:00
|
|
|
inviteChat(chatId: String!, userslug: String!): Result!
|
2022-11-15 05:36:30 +03:00
|
|
|
|
2022-11-16 19:53:36 +03:00
|
|
|
createMessage(chat: String!, body: String!, replyTo: String): Result!
|
2022-11-02 13:00:04 +03:00
|
|
|
updateMessage(chatId: String!, id: Int!, body: String!): Result!
|
2022-08-11 08:53:14 +03:00
|
|
|
deleteMessage(chatId: String!, id: Int!): Result!
|
|
|
|
markAsRead(chatId: String!, ids: [Int]!): Result!
|
|
|
|
|
2022-02-03 12:13:53 +03:00
|
|
|
# auth
|
2022-08-12 11:13:18 +03:00
|
|
|
refreshSession: AuthResult!
|
2022-10-21 00:05:37 +02:00
|
|
|
registerUser(email: String!, password: String, name: String): AuthResult!
|
2022-10-21 08:47:58 +03:00
|
|
|
sendLink(email: String!, lang: String): Result!
|
2022-10-23 15:48:08 +03:00
|
|
|
confirmEmail(token: String!): AuthResult!
|
2022-02-03 12:13:53 +03:00
|
|
|
|
|
|
|
# shout
|
2022-07-21 14:58:50 +03:00
|
|
|
createShout(input: ShoutInput!): Result!
|
|
|
|
updateShout(input: ShoutInput!): Result!
|
2022-02-03 12:13:53 +03:00
|
|
|
deleteShout(slug: String!): Result!
|
|
|
|
|
|
|
|
# user profile
|
2022-02-16 15:38:05 +03:00
|
|
|
rateUser(slug: String!, value: Int!): Result!
|
2022-11-15 05:36:30 +03:00
|
|
|
updateOnlineStatus: Result!
|
2022-02-03 12:13:53 +03:00
|
|
|
updateProfile(profile: ProfileInput!): Result!
|
|
|
|
|
|
|
|
# topics
|
2022-07-21 14:58:50 +03:00
|
|
|
createTopic(input: TopicInput!): Result!
|
|
|
|
# TODO: mergeTopics(t1: String!, t2: String!): Result!
|
|
|
|
updateTopic(input: TopicInput!): Result!
|
|
|
|
destroyTopic(slug: String!): Result!
|
2022-02-03 12:13:53 +03:00
|
|
|
|
2022-07-21 14:58:50 +03:00
|
|
|
# reactions
|
2022-09-08 11:55:48 +03:00
|
|
|
createReaction(reaction: ReactionInput!): Result!
|
|
|
|
updateReaction(reaction: ReactionInput!): Result!
|
2022-07-21 14:58:50 +03:00
|
|
|
deleteReaction(id: Int!): Result!
|
2022-02-03 12:13:53 +03:00
|
|
|
|
2022-06-22 08:28:42 +03:00
|
|
|
# collab
|
|
|
|
inviteAuthor(author: String!, shout: String!): Result!
|
|
|
|
removeAuthor(author: String!, shout: String!): Result!
|
2022-07-21 14:58:50 +03:00
|
|
|
|
|
|
|
# following
|
|
|
|
follow(what: FollowingEntity!, slug: String!): Result!
|
|
|
|
unfollow(what: FollowingEntity!, slug: String!): Result!
|
2022-11-15 05:36:30 +03:00
|
|
|
}
|
2022-07-21 14:58:50 +03:00
|
|
|
|
2022-11-15 12:34:12 +03:00
|
|
|
input MessagesBy {
|
2022-11-15 05:36:30 +03:00
|
|
|
author: String
|
|
|
|
body: String
|
|
|
|
chat: String
|
2022-11-15 12:34:12 +03:00
|
|
|
order: String
|
|
|
|
days: Int
|
|
|
|
stat: String
|
2021-08-21 02:17:15 +03:00
|
|
|
}
|
|
|
|
|
2022-11-15 12:34:12 +03:00
|
|
|
input AuthorsBy {
|
2022-11-15 05:36:30 +03:00
|
|
|
lastSeen: DateTime
|
|
|
|
createdAt: DateTime
|
|
|
|
slug: String
|
|
|
|
name: String
|
|
|
|
topic: String
|
2022-11-15 12:34:12 +03:00
|
|
|
order: String
|
|
|
|
days: Int
|
|
|
|
stat: String
|
2022-11-15 05:36:30 +03:00
|
|
|
}
|
|
|
|
|
2022-11-17 21:33:03 +01:00
|
|
|
input ShoutsFilterBy {
|
2022-11-18 01:38:29 +01:00
|
|
|
slug: String
|
|
|
|
title: String
|
|
|
|
body: String
|
|
|
|
topic: String
|
|
|
|
topics: [String]
|
|
|
|
author: String
|
|
|
|
authors: [String]
|
|
|
|
layout: String
|
|
|
|
visibility: String
|
|
|
|
days: Int
|
|
|
|
stat: String
|
|
|
|
}
|
|
|
|
|
|
|
|
input LoadShoutsFilters {
|
|
|
|
title: String
|
|
|
|
body: String
|
|
|
|
topic: String
|
|
|
|
author: String
|
|
|
|
layout: String
|
|
|
|
visibility: String
|
|
|
|
days: Int
|
|
|
|
reacted: Boolean
|
|
|
|
}
|
|
|
|
|
|
|
|
input LoadShoutsOptions {
|
|
|
|
filters: LoadShoutsFilters
|
|
|
|
limit: Int!
|
|
|
|
offset: Int
|
|
|
|
order_by: String
|
|
|
|
order_by_desc: Boolean
|
2022-11-15 05:36:30 +03:00
|
|
|
}
|
|
|
|
|
2022-11-15 12:34:12 +03:00
|
|
|
input ReactionBy {
|
2022-11-15 05:36:30 +03:00
|
|
|
shout: String
|
2022-11-15 18:20:44 +03:00
|
|
|
shouts: [String]
|
2022-11-15 05:36:30 +03:00
|
|
|
body: String
|
|
|
|
topic: String
|
|
|
|
author: String
|
2022-11-15 12:34:12 +03:00
|
|
|
order: String
|
|
|
|
days: Int
|
|
|
|
stat: String
|
2022-11-15 05:36:30 +03:00
|
|
|
}
|
2021-08-21 02:17:15 +03:00
|
|
|
################################### Query
|
|
|
|
|
|
|
|
type Query {
|
2022-08-11 08:53:14 +03:00
|
|
|
# inbox
|
2022-11-16 10:32:24 +03:00
|
|
|
loadChats( limit: Int, offset: Int): Result! # your chats
|
|
|
|
loadMessagesBy(by: MessagesBy!, limit: Int, offset: Int): Result!
|
2022-11-21 11:13:57 +03:00
|
|
|
loadRecipients(limit: Int, offset: Int): Result!
|
|
|
|
searchRecipients(query: String!, limit: Int, offset: Int): Result!
|
2022-07-13 18:53:06 +03:00
|
|
|
|
2022-02-03 12:13:53 +03:00
|
|
|
# auth
|
2022-06-15 15:41:28 +03:00
|
|
|
isEmailUsed(email: String!): Boolean!
|
2022-10-21 08:47:58 +03:00
|
|
|
signIn(email: String!, password: String, lang: String): AuthResult!
|
2022-07-21 14:58:50 +03:00
|
|
|
signOut: AuthResult!
|
2022-02-03 12:13:53 +03:00
|
|
|
|
2022-11-15 05:36:30 +03:00
|
|
|
# zine
|
2022-11-16 10:32:24 +03:00
|
|
|
loadAuthorsBy(by: AuthorsBy, limit: Int, offset: Int): [Author]!
|
2022-11-18 01:38:29 +01:00
|
|
|
loadShout(slug: String!): Shout
|
|
|
|
loadShouts(options: LoadShoutsOptions): [Shout]!
|
2022-11-16 10:32:24 +03:00
|
|
|
loadReactionsBy(by: ReactionBy!, limit: Int, offset: Int): [Reaction]!
|
2022-11-12 21:13:23 +03:00
|
|
|
userFollowers(slug: String!): [Author]!
|
|
|
|
userFollowedAuthors(slug: String!): [Author]!
|
2022-07-21 14:58:50 +03:00
|
|
|
userFollowedTopics(slug: String!): [Topic]!
|
2022-11-12 21:13:23 +03:00
|
|
|
authorsAll: [Author]!
|
2022-11-18 03:19:10 +01:00
|
|
|
getAuthor(slug: String!): User
|
2022-04-28 12:04:14 +03:00
|
|
|
|
2022-07-21 14:58:50 +03:00
|
|
|
# collab
|
2022-09-02 13:23:33 +03:00
|
|
|
getCollabs: [Collab]!
|
2022-02-03 12:13:53 +03:00
|
|
|
|
2022-10-05 12:32:48 +03:00
|
|
|
# migrate
|
|
|
|
markdownBody(body: String!): String!
|
|
|
|
|
2022-02-03 12:13:53 +03:00
|
|
|
# topics
|
2022-11-18 03:19:10 +01:00
|
|
|
getTopic(slug: String!): Topic
|
2022-09-05 16:50:09 +03:00
|
|
|
topicsAll: [Topic]!
|
2022-09-06 19:02:05 +03:00
|
|
|
topicsRandom(amount: Int): [Topic]!
|
2022-02-03 12:13:53 +03:00
|
|
|
topicsByCommunity(community: String!): [Topic]!
|
|
|
|
topicsByAuthor(author: String!): [Topic]!
|
2021-08-21 02:17:15 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
############################################ Subscription
|
|
|
|
|
|
|
|
type Subscription {
|
2022-11-02 16:36:10 +03:00
|
|
|
newMessage(chats: [Int!]): Message!
|
2022-02-03 12:13:53 +03:00
|
|
|
onlineUpdated: [User!]!
|
|
|
|
shoutUpdated: Shout!
|
|
|
|
userUpdated: User!
|
2022-07-21 14:58:50 +03:00
|
|
|
reactionUpdated(shout: String!): ReactionUpdating!
|
2021-08-21 02:17:15 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
############################################ Entities
|
|
|
|
|
2021-11-24 12:09:47 +03:00
|
|
|
type Resource {
|
2022-02-03 12:13:53 +03:00
|
|
|
id: Int!
|
|
|
|
name: String!
|
2021-11-24 12:09:47 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
type Operation {
|
2022-02-03 12:13:53 +03:00
|
|
|
id: Int!
|
|
|
|
name: String!
|
2021-11-24 12:09:47 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
type Permission {
|
2022-02-03 12:13:53 +03:00
|
|
|
operation_id: Int!
|
|
|
|
resource_id: Int!
|
2021-11-24 12:09:47 +03:00
|
|
|
}
|
|
|
|
|
2021-08-21 02:17:15 +03:00
|
|
|
type Role {
|
2022-02-03 12:13:53 +03:00
|
|
|
id: Int!
|
|
|
|
name: String!
|
2022-06-28 22:40:44 +03:00
|
|
|
community: String!
|
2022-02-03 12:13:53 +03:00
|
|
|
desc: String
|
|
|
|
permissions: [Permission!]!
|
2021-08-21 02:17:15 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
type Rating {
|
2022-02-03 12:13:53 +03:00
|
|
|
rater: String!
|
|
|
|
value: Int!
|
2022-01-11 16:33:25 +03:00
|
|
|
}
|
|
|
|
|
2021-08-21 02:17:15 +03:00
|
|
|
type Notification {
|
2022-02-03 12:13:53 +03:00
|
|
|
kind: String! # unique primary key
|
|
|
|
template: String!
|
|
|
|
variables: [String]
|
2021-08-21 02:17:15 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
type UserNotification {
|
2022-02-03 12:13:53 +03:00
|
|
|
id: Int! # primary key
|
|
|
|
user: Int!
|
|
|
|
kind: String! # NotificationTemplate.name
|
|
|
|
values: [String]
|
2021-08-21 02:17:15 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
type User {
|
2022-02-03 12:13:53 +03:00
|
|
|
id: Int!
|
2022-11-10 08:40:32 +03:00
|
|
|
username: String! # to login, ex. email, phone
|
2022-02-03 12:13:53 +03:00
|
|
|
createdAt: DateTime!
|
2022-08-12 15:50:59 +03:00
|
|
|
lastSeen: DateTime
|
2022-02-03 12:13:53 +03:00
|
|
|
slug: String!
|
|
|
|
name: String # to display
|
|
|
|
email: String
|
|
|
|
password: String
|
|
|
|
oauth: String # provider:token
|
|
|
|
userpic: String
|
|
|
|
links: [String]
|
|
|
|
emailConfirmed: Boolean # should contain all emails too
|
|
|
|
muted: Boolean
|
|
|
|
updatedAt: DateTime
|
|
|
|
ratings: [Rating]
|
|
|
|
bio: String
|
|
|
|
notifications: [Int]
|
|
|
|
communities: [Int] # user participating communities
|
2022-07-07 16:55:13 +03:00
|
|
|
oid: String
|
2021-08-21 02:17:15 +03:00
|
|
|
}
|
|
|
|
|
2022-09-02 13:23:33 +03:00
|
|
|
type Collab {
|
|
|
|
authors: [String]!
|
|
|
|
invites: [String]
|
|
|
|
createdAt: DateTime!
|
|
|
|
title: String
|
|
|
|
body: String
|
|
|
|
}
|
|
|
|
|
2022-07-21 14:58:50 +03:00
|
|
|
enum ReactionKind {
|
|
|
|
LIKE
|
|
|
|
DISLIKE
|
|
|
|
|
|
|
|
AGREE
|
|
|
|
DISAGREE
|
|
|
|
|
|
|
|
PROOF
|
|
|
|
DISPROOF
|
2022-09-01 13:16:22 +03:00
|
|
|
|
2022-07-21 14:58:50 +03:00
|
|
|
COMMENT
|
2022-07-25 12:34:57 +03:00
|
|
|
QUOTE
|
2022-09-01 13:16:22 +03:00
|
|
|
|
2022-07-21 14:58:50 +03:00
|
|
|
PROPOSE
|
|
|
|
ASK
|
2022-09-01 13:16:22 +03:00
|
|
|
|
2022-07-21 14:58:50 +03:00
|
|
|
ACCEPT
|
|
|
|
REJECT
|
|
|
|
}
|
|
|
|
|
|
|
|
type Reaction {
|
2022-02-03 12:13:53 +03:00
|
|
|
id: Int!
|
2022-07-21 14:58:50 +03:00
|
|
|
shout: Shout!
|
2022-02-03 12:13:53 +03:00
|
|
|
createdAt: DateTime!
|
2022-07-21 14:58:50 +03:00
|
|
|
createdBy: User!
|
2022-02-03 12:13:53 +03:00
|
|
|
updatedAt: DateTime
|
|
|
|
deletedAt: DateTime
|
2022-07-07 16:55:13 +03:00
|
|
|
deletedBy: User
|
2022-07-21 14:58:50 +03:00
|
|
|
range: String # full / 0:2340
|
|
|
|
kind: ReactionKind!
|
|
|
|
body: String
|
|
|
|
replyTo: Reaction
|
|
|
|
stat: Stat
|
|
|
|
old_id: String
|
2022-02-03 12:13:53 +03:00
|
|
|
old_thread: String
|
2021-10-13 20:46:30 +03:00
|
|
|
}
|
2021-09-03 19:01:31 +03:00
|
|
|
|
2021-08-21 02:17:15 +03:00
|
|
|
# is publication
|
|
|
|
type Shout {
|
2022-06-14 09:13:06 +03:00
|
|
|
id: Int!
|
2022-02-03 12:13:53 +03:00
|
|
|
slug: String!
|
|
|
|
body: String!
|
|
|
|
createdAt: DateTime!
|
|
|
|
topics: [Topic]
|
|
|
|
mainTopic: String
|
|
|
|
title: String
|
|
|
|
subtitle: String
|
2022-11-13 07:07:52 +03:00
|
|
|
authors: [Author]
|
|
|
|
lang: String
|
|
|
|
community: String
|
|
|
|
cover: String
|
|
|
|
layout: String # audio video literature image
|
|
|
|
versionOf: String # for translations and re-telling the same story
|
|
|
|
visibility: String # owner authors community public
|
2022-02-03 12:13:53 +03:00
|
|
|
updatedAt: DateTime
|
2022-07-07 16:55:13 +03:00
|
|
|
updatedBy: User
|
2022-02-03 12:13:53 +03:00
|
|
|
deletedAt: DateTime
|
2022-07-07 16:55:13 +03:00
|
|
|
deletedBy: User
|
|
|
|
publishedBy: User
|
2022-02-03 12:13:53 +03:00
|
|
|
publishedAt: DateTime
|
2022-11-13 20:58:47 +03:00
|
|
|
media: String
|
2022-07-21 14:58:50 +03:00
|
|
|
stat: Stat
|
2021-12-17 11:22:31 +01:00
|
|
|
}
|
|
|
|
|
2022-07-21 14:58:50 +03:00
|
|
|
type Stat {
|
2022-08-13 12:48:07 +03:00
|
|
|
viewed: Int
|
|
|
|
reacted: Int
|
|
|
|
rating: Int
|
2022-08-17 10:59:17 +03:00
|
|
|
commented: Int
|
2022-09-05 10:28:23 +03:00
|
|
|
ranking: Int
|
2021-08-21 02:17:15 +03:00
|
|
|
}
|
|
|
|
|
2021-08-27 00:14:20 +03:00
|
|
|
type Community {
|
2022-11-10 08:40:32 +03:00
|
|
|
id: Int!
|
2022-02-03 12:13:53 +03:00
|
|
|
slug: String!
|
|
|
|
name: String!
|
|
|
|
desc: String
|
|
|
|
pic: String!
|
2022-06-16 14:44:36 +03:00
|
|
|
createdAt: DateTime!
|
|
|
|
createdBy: User!
|
2021-08-27 00:14:20 +03:00
|
|
|
}
|
|
|
|
|
2022-08-11 12:09:57 +03:00
|
|
|
type Collection {
|
2022-11-10 08:40:32 +03:00
|
|
|
id: Int!
|
2022-08-11 12:09:57 +03:00
|
|
|
slug: String!
|
|
|
|
title: String!
|
|
|
|
desc: String
|
2022-08-17 12:07:32 +03:00
|
|
|
amount: Int
|
2022-08-13 13:05:46 +03:00
|
|
|
publishedAt: DateTime
|
2022-08-11 12:09:57 +03:00
|
|
|
createdAt: DateTime!
|
|
|
|
createdBy: User!
|
|
|
|
}
|
|
|
|
|
2021-12-13 19:51:01 +03:00
|
|
|
type TopicStat {
|
2022-02-03 12:13:53 +03:00
|
|
|
shouts: Int!
|
2022-07-21 14:58:50 +03:00
|
|
|
followers: Int!
|
2022-02-03 12:13:53 +03:00
|
|
|
authors: Int!
|
2022-11-21 11:13:57 +03:00
|
|
|
# viewed: Int
|
2022-08-13 12:48:07 +03:00
|
|
|
reacted: Int!
|
2022-08-17 10:59:17 +03:00
|
|
|
commented: Int
|
2022-08-13 19:19:16 +03:00
|
|
|
rating: Int
|
2021-12-13 19:51:01 +03:00
|
|
|
}
|
|
|
|
|
2021-08-21 02:17:15 +03:00
|
|
|
type Topic {
|
2022-02-03 12:13:53 +03:00
|
|
|
slug: String! # ID
|
|
|
|
title: String
|
|
|
|
body: String
|
|
|
|
pic: String
|
2022-07-21 14:58:50 +03:00
|
|
|
community: Community!
|
2022-07-13 18:53:06 +03:00
|
|
|
stat: TopicStat
|
2022-07-07 16:55:13 +03:00
|
|
|
oid: String
|
2021-08-21 02:17:15 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
type Token {
|
2022-02-03 12:13:53 +03:00
|
|
|
createdAt: DateTime!
|
|
|
|
expiresAt: DateTime
|
|
|
|
id: Int!
|
|
|
|
ownerId: Int!
|
|
|
|
usedAt: DateTime
|
|
|
|
value: String!
|
2021-08-28 13:13:50 +03:00
|
|
|
}
|
2022-08-11 08:53:14 +03:00
|
|
|
|
|
|
|
type Message {
|
|
|
|
author: String!
|
2022-11-02 16:36:10 +03:00
|
|
|
chatId: String!
|
2022-08-11 08:53:14 +03:00
|
|
|
body: String!
|
2022-11-02 16:36:10 +03:00
|
|
|
createdAt: Int!
|
2022-08-11 08:53:14 +03:00
|
|
|
id: Int!
|
2022-11-09 14:46:00 +03:00
|
|
|
replyTo: String
|
2022-11-02 16:36:10 +03:00
|
|
|
updatedAt: Int
|
2022-08-11 08:53:14 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
type Chat {
|
2022-11-08 18:50:28 +03:00
|
|
|
id: String!
|
2022-11-02 16:36:10 +03:00
|
|
|
createdAt: Int!
|
2022-10-04 02:25:11 +03:00
|
|
|
createdBy: User!
|
2022-11-02 16:36:10 +03:00
|
|
|
updatedAt: Int!
|
2022-10-04 02:43:08 +03:00
|
|
|
title: String
|
2022-08-11 08:53:14 +03:00
|
|
|
description: String
|
2022-10-04 02:25:11 +03:00
|
|
|
users: [User]!
|
2022-11-11 10:51:11 +03:00
|
|
|
admins: [User]
|
2022-11-02 12:23:14 +03:00
|
|
|
messages: [Message]!
|
2022-11-02 12:46:25 +03:00
|
|
|
unread: Int
|
2022-11-12 00:27:17 +03:00
|
|
|
private: Boolean
|
2022-08-11 08:53:14 +03:00
|
|
|
}
|