Added add/edit/remove mutations for Chapter
the build was successful

This commit is contained in:
2018-07-07 17:45:24 +02:00
parent a0cb8d7fa8
commit a7113d5efe
3 changed files with 187 additions and 2 deletions
+10
View File
@@ -113,6 +113,16 @@ type Mutation {
removeFile(id: String!): File
# Add a chapter to a story
addChapter(input: ChapterAddInput!): Chapter!
# Edit a chapter
editChapter(input: ChapterEditInput!): Chapter!
# Remove a chapter
removeChapter(id: String!): Chapter!
# Log in
login(username: String!, password: String!): Session!
+36
View File
@@ -20,4 +20,40 @@ type Chapter {
# The date of edit.
editedDate: String!
}
# Input for addChapter mutation
input ChapterAddInput {
# The story to add a chapter to
storyId: String!
# The title to give the chapter. It can not be left empty
title: String!
# The author to set for the chapter. It will use the logged in user ID, and only
# users with appropriate permissions can post as another author. Even then, it's only
# for importing/moving content. This author name will not be used when logging the
# submission
author: String
# The markdown source for the content
source: String!
# Optionally, assign a fictional date for the chapter
fictionalDate: String
}
# Input for editChapter mutation
input ChapterEditInput {
# The chapter to edit
id: String!
# Change the chapter's title
title: String
# Change the source
source: String
# Set the fictional date for a chapter
fictionalDate: String
}