0.4.9-drafts

This commit is contained in:
2025-02-09 17:18:01 +03:00
parent dce05342df
commit 37a9a284ef
13 changed files with 468 additions and 37 deletions

View File

@@ -1,4 +1,4 @@
input ShoutInput {
input DraftInput {
slug: String
title: String
body: String

View File

@@ -3,10 +3,15 @@ type Mutation {
rate_author(rated_slug: String!, value: Int!): CommonResult!
update_author(profile: ProfileInput!): CommonResult!
# editor
create_shout(inp: ShoutInput!): CommonResult!
update_shout(shout_id: Int!, shout_input: ShoutInput, publish: Boolean): CommonResult!
delete_shout(shout_id: Int!): CommonResult!
# draft
create_draft(input: DraftInput!): CommonResult!
update_draft(draft_id: Int!, input: DraftInput!): CommonResult!
delete_draft(draft_id: Int!): CommonResult!
# publication
publish_shout(shout_id: Int!): CommonResult!
publish_draft(draft_id: Int!): CommonResult!
unpublish_draft(draft_id: Int!): CommonResult!
unpublish_shout(shout_id: Int!): CommonResult!
# follower
follow(what: FollowingEntity!, slug: String!): AuthorFollowsResult!

View File

@@ -51,6 +51,7 @@ type Query {
# editor
get_my_shout(shout_id: Int!): CommonResult!
get_shouts_drafts: CommonResult!
load_drafts: CommonResult!
# topic
get_topic(slug: String!): Topic

View File

@@ -100,12 +100,37 @@ type Shout {
deleted_at: Int
version_of: Shout # TODO: use version_of somewhere
draft: Draft
media: [MediaItem]
stat: Stat
score: Float
}
type Draft {
id: Int!
shout: Shout
created_at: Int!
updated_at: Int
deleted_at: Int
created_by: Author!
updated_by: Author
deleted_by: Author
authors: [Author]
topics: [Topic]
media: [MediaItem]
lead: String
description: String
subtitle: String
layout: String
lang: String
seo: String
body: String
title: String
slug: String
cover: String
cover_caption: String
}
type Stat {
rating: Int
commented: Int