Added graphql for story, started on resolvers, added finders for story

This commit is contained in:
2018-06-22 06:17:41 +02:00
parent 7f49f8c4b5
commit 5a2b8ef1c5
5 changed files with 143 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
# A Chapter is the main content body of a story.
type Chapter {
# The chapter's ID
id: String!
# The chapter's title
title: String!
# The chapter's author
author: String!
# The chapter's source
source: String!
# When the chapter was posted initialy
createdDate: String!
# The in-universe date and time of the chapter
fictionalDate: String!
# The date of edit.
editedDate: String!
}
+51
View File
@@ -0,0 +1,51 @@
# A Story is a piece of content that, unlike wiki articles, are not something that should be ordered by time instead of title. It can
# contain multiple chapters by one or more autohrs
type Story {
# The story's ID
id: String!
# The story's name, which will show up in the lists.
name: String!
# The story's author
author: String!
# Whether other users may add/edit chapters to the story.
open: Boolean!
# Whether users without a direct link can find this story.
listed: Boolean!
# The category of the story
category: StoryCategory!
# The tags for this tory
tags: [Tags!]!
# The date the story was created (RFC3339 format).
createdDate: String!
# The date the story is set in (RFC3339 format).
fictionalDate: String!
# The date of the last major update to the story (RFC3339 format). This being bumped means a new chapter has been added.
fictionalDate: String!
}
# Possible values for Story.category
enum StoryCategory {
# Description and content of a document or item
Document
# News stories
News
# Information about something going on in the background that may or may not inform RP
Background
# General information
Info
# A short story
Story
}
+27
View File
@@ -0,0 +1,27 @@
# A Tag is a means of associating stories that have details in common with one another.
type Tag {
# The tag's kind
kind: TagKind!
# The tag's name
name: String!
}
# Allowed values for Tag.kind
enum TagKind {
# An organization is a catch all term for in-universe corporations, teams, groups, cults, forces, etc...
Organization
# A character tag should have the exact full name of the character.
Character
# A location is anything from a planet to an establishment. This may overlap with an organization, and if so, both
# kinds of tags should be used.
Location
# An event is a plot or a part of a plot.
Event
# None of the above, but it does still tie multiple stories together. The new story/chapter format may obsolete this tag kind.
Series
}