graph2: Added clearFictionalDate option to editChapter mutation input
the build failed

This commit is contained in:
2018-09-19 22:19:39 +02:00
parent 260c2e7f76
commit 8388ee2446
2 changed files with 7 additions and 0 deletions
+4
View File
@@ -55,6 +55,10 @@ func (r *mutationResolver) EditChapter(ctx context.Context, input input.ChapterE
return models.Chapter{}, errors.New("Unauthorized")
}
if input.ClearFictionalDate != nil && *input.ClearFictionalDate == true {
input.FictionalDate = &time.Time{}
}
return chapters.Edit(chapter, input.Title, input.Source, input.FictionalDate)
}
+3
View File
@@ -56,6 +56,9 @@ input ChapterEditInput {
# Set the fictional date for a chapter
fictionalDate: Date
# Remove the fictional date for a chapter
clearFictionalDate: Boolean
}
# Input for removeChapter mutation