You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
50 lines
1.1 KiB
50 lines
1.1 KiB
package types
|
|
|
|
import (
|
|
"time"
|
|
|
|
"git.aiterp.net/rpdata/api/model/story"
|
|
)
|
|
|
|
// ChapterResolver for the Chapter graphql type
|
|
type ChapterResolver struct{ C story.Chapter }
|
|
|
|
// ID resolves Chapter.id
|
|
func (r *ChapterResolver) ID() string {
|
|
return r.C.ID
|
|
}
|
|
|
|
// StoryID resolves Chapter.storyId
|
|
func (r *ChapterResolver) StoryID() string {
|
|
return r.C.StoryID
|
|
}
|
|
|
|
// Title resolves Chapter.title
|
|
func (r *ChapterResolver) Title() string {
|
|
return r.C.Title
|
|
}
|
|
|
|
// Author resolves Chapter.author
|
|
func (r *ChapterResolver) Author() string {
|
|
return r.C.Author
|
|
}
|
|
|
|
// Source resolves Chapter.source
|
|
func (r *ChapterResolver) Source() string {
|
|
return r.C.Source
|
|
}
|
|
|
|
// CreatedDate resolves Chapter.createdDate
|
|
func (r *ChapterResolver) CreatedDate() string {
|
|
return r.C.CreatedDate.Format(time.RFC3339Nano)
|
|
}
|
|
|
|
// FictionalDate resolves Chapter.fictionalDate
|
|
func (r *ChapterResolver) FictionalDate() string {
|
|
return r.C.FictionalDate.Format(time.RFC3339Nano)
|
|
}
|
|
|
|
// EditedDate resolves Chapter.editedDate
|
|
func (r *ChapterResolver) EditedDate() string {
|
|
return r.C.EditedDate.Format(time.RFC3339Nano)
|
|
}
|