This commit is contained in:
@@ -13,7 +13,7 @@ enum ReactionStatus {
|
||||
}
|
||||
|
||||
enum ReactionKind {
|
||||
# collabs
|
||||
# collabs
|
||||
AGREE
|
||||
DISAGREE
|
||||
ASK
|
||||
@@ -29,7 +29,6 @@ enum ReactionKind {
|
||||
DISLIKE
|
||||
}
|
||||
|
||||
|
||||
enum FollowingEntity {
|
||||
TOPIC
|
||||
AUTHOR
|
||||
@@ -37,17 +36,14 @@ enum FollowingEntity {
|
||||
REACTIONS
|
||||
}
|
||||
|
||||
|
||||
enum InviteStatus {
|
||||
PENDING
|
||||
ACCEPTED
|
||||
REJECTED
|
||||
}
|
||||
|
||||
|
||||
# Типы
|
||||
|
||||
|
||||
type AuthorFollowings {
|
||||
unread: Int
|
||||
topics: [String]
|
||||
@@ -77,6 +73,7 @@ type Author {
|
||||
last_seen: Int
|
||||
updated_at: Int
|
||||
deleted_at: Int
|
||||
seo: String
|
||||
# synthetic
|
||||
stat: AuthorStat # ratings inside
|
||||
communities: [Community]
|
||||
@@ -292,81 +289,79 @@ type Result {
|
||||
communities: [Community]
|
||||
}
|
||||
|
||||
|
||||
# Мутации
|
||||
|
||||
type Mutation {
|
||||
# author
|
||||
rate_author(rated_slug: String!, value: Int!): Result!
|
||||
update_profile(profile: ProfileInput!): Result!
|
||||
# author
|
||||
rate_author(rated_slug: String!, value: Int!): Result!
|
||||
update_profile(profile: ProfileInput!): Result!
|
||||
|
||||
# editor
|
||||
create_shout(inp: ShoutInput!): Result!
|
||||
update_shout(shout_id: Int!, shout_input: ShoutInput, publish: Boolean): Result!
|
||||
delete_shout(shout_id: Int!): Result!
|
||||
# editor
|
||||
create_shout(inp: ShoutInput!): Result!
|
||||
update_shout(shout_id: Int!, shout_input: ShoutInput, publish: Boolean): Result!
|
||||
delete_shout(shout_id: Int!): Result!
|
||||
|
||||
# follower
|
||||
follow(what: FollowingEntity!, slug: String!): Result!
|
||||
unfollow(what: FollowingEntity!, slug: String!): Result!
|
||||
# follower
|
||||
follow(what: FollowingEntity!, slug: String!): Result!
|
||||
unfollow(what: FollowingEntity!, slug: String!): Result!
|
||||
|
||||
# topic
|
||||
create_topic(input: TopicInput!): Result!
|
||||
update_topic(input: TopicInput!): Result!
|
||||
delete_topic(slug: String!): Result!
|
||||
# topic
|
||||
create_topic(input: TopicInput!): Result!
|
||||
update_topic(input: TopicInput!): Result!
|
||||
delete_topic(slug: String!): Result!
|
||||
|
||||
# reaction
|
||||
create_reaction(reaction: ReactionInput!): Result!
|
||||
update_reaction(id: Int!, reaction: ReactionInput!): Result!
|
||||
delete_reaction(id: Int!): Result!
|
||||
# reaction
|
||||
create_reaction(reaction: ReactionInput!): Result!
|
||||
update_reaction(id: Int!, reaction: ReactionInput!): Result!
|
||||
delete_reaction(id: Int!): Result!
|
||||
|
||||
# collab
|
||||
create_invite(slug: String, author_id: Int): Result!
|
||||
remove_author(slug: String, author_id: Int): Result!
|
||||
remove_invite(invite_id: Int!): Result!
|
||||
accept_invite(invite_id: Int!): Result!
|
||||
reject_invite(invite_id: Int!): Result!
|
||||
# collab
|
||||
create_invite(slug: String, author_id: Int): Result!
|
||||
remove_author(slug: String, author_id: Int): Result!
|
||||
remove_invite(invite_id: Int!): Result!
|
||||
accept_invite(invite_id: Int!): Result!
|
||||
reject_invite(invite_id: Int!): Result!
|
||||
}
|
||||
|
||||
|
||||
# Запросы
|
||||
|
||||
type Query {
|
||||
# author
|
||||
get_author(slug: String, author_id: Int): Author
|
||||
get_author_id(user: String!): Author
|
||||
load_authors_all(limit: Int, offset: Int): [Author]
|
||||
get_author_followers(slug: String, user: String, author_id: Int): [Author]
|
||||
get_author_followed(slug: String, user: String, author_id: Int): [Author]
|
||||
load_authors_by(by: AuthorsBy, limit: Int, offset: Int): [Author]
|
||||
# author
|
||||
get_author(slug: String, author_id: Int): Author
|
||||
get_author_id(user: String!): Author
|
||||
load_authors_all(limit: Int, offset: Int): [Author]
|
||||
get_author_followers(slug: String, user: String, author_id: Int): [Author]
|
||||
get_author_followed(slug: String, user: String, author_id: Int): [Author]
|
||||
load_authors_by(by: AuthorsBy, limit: Int, offset: Int): [Author]
|
||||
|
||||
# community
|
||||
get_community: Community
|
||||
get_communities_all: [Community]
|
||||
# community
|
||||
get_community: Community
|
||||
get_communities_all: [Community]
|
||||
|
||||
# editor
|
||||
get_shouts_drafts: [Shout]
|
||||
# editor
|
||||
get_shouts_drafts: [Shout]
|
||||
|
||||
# follower
|
||||
get_my_followed: Result # { authors topics communities }
|
||||
get_shout_followers(slug: String, shout_id: Int): [Author]
|
||||
# follower
|
||||
get_my_followed: Result # { authors topics communities }
|
||||
get_shout_followers(slug: String, shout_id: Int): [Author]
|
||||
|
||||
# reaction
|
||||
load_reactions_by(by: ReactionBy!, limit: Int, offset: Int): [Reaction]
|
||||
# reaction
|
||||
load_reactions_by(by: ReactionBy!, limit: Int, offset: Int): [Reaction]
|
||||
|
||||
# reader
|
||||
get_shout(slug: String, shout_id: Int): Shout
|
||||
load_shouts_followed(follower_id: Int!, limit: Int, offset: Int): [Shout] # userReactedShouts
|
||||
load_shouts_by(options: LoadShoutsOptions): [Shout]
|
||||
load_shouts_search(text: String!, limit: Int, offset: Int): [Shout]
|
||||
load_shouts_feed(options: LoadShoutsOptions): [Shout]
|
||||
load_shouts_unrated(limit: Int, offset: Int): [Shout]
|
||||
load_shouts_random_top(options: LoadShoutsOptions): [Shout]
|
||||
load_shouts_drafts: [Shout]
|
||||
# reader
|
||||
get_shout(slug: String, shout_id: Int): Shout
|
||||
load_shouts_followed(follower_id: Int!, limit: Int, offset: Int): [Shout] # userReactedShouts
|
||||
load_shouts_by(options: LoadShoutsOptions): [Shout]
|
||||
load_shouts_search(text: String!, limit: Int, offset: Int): [Shout]
|
||||
load_shouts_feed(options: LoadShoutsOptions): [Shout]
|
||||
load_shouts_unrated(limit: Int, offset: Int): [Shout]
|
||||
load_shouts_random_top(options: LoadShoutsOptions): [Shout]
|
||||
load_shouts_drafts: [Shout]
|
||||
|
||||
# topic
|
||||
get_topic(slug: String!): Topic
|
||||
get_topics_all: [Topic]
|
||||
get_topics_random(amount: Int): [Topic]
|
||||
get_topics_by_author(slug: String, user: String, author_id: Int): [Topic]
|
||||
get_topics_by_community(slug: String, community_id: Int): [Topic]
|
||||
# topic
|
||||
get_topic(slug: String!): Topic
|
||||
get_topics_all: [Topic]
|
||||
get_topics_random(amount: Int): [Topic]
|
||||
get_topics_by_author(slug: String, user: String, author_id: Int): [Topic]
|
||||
get_topics_by_community(slug: String, community_id: Int): [Topic]
|
||||
}
|
||||
|
Reference in New Issue
Block a user