GraphQL API and utilities for the rpdata project
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.

139 lines
2.7 KiB

  1. schema {
  2. query: Query
  3. mutation: Mutation
  4. }
  5. type Query {
  6. # Find character by either an ID or a nick.
  7. character(id: String, nick: String): Character!
  8. # Find characters
  9. characters(filter: CharactersFilter): [Character!]!
  10. # Find channel by name
  11. channel(name: String!): Channel!
  12. # Find channels
  13. channels(filter: ChannelsFilter): [Channel!]!
  14. # Find post by ID.
  15. post(id: String!): Post!
  16. # Find posts
  17. posts(filter: PostsFilter): [Post!]!
  18. # Find log by ID
  19. log(id: String!): Log!
  20. # Find logs
  21. logs(filter: LogsFilter): [Log!]!
  22. # Find story chapter by ID
  23. chapter(id: String!): Chapter!
  24. # Find all distinct tags used in stories
  25. tags: [Tag!]!
  26. # Find story by ID
  27. story(id: String!): Story!
  28. # Find stories
  29. stories(filter: StoriesFilter): [Story!]!
  30. # Find file by ID
  31. file(id: String!): File!
  32. # Find files
  33. files(filter: FilesFilter): [File!]!
  34. # Get information about the token, useful for debugging.
  35. token: Token!
  36. }
  37. type Mutation {
  38. # Add a story
  39. addStory(input: StoryAddInput!): Story!
  40. # Add a story tag
  41. addStoryTag(input: StoryTagAddInput!): Story!
  42. # Remove a story tag
  43. removeStoryTag(input: StoryTagRemoveInput!): Story!
  44. # Edit a story
  45. editStory(input: StoryEditInput!): Story!
  46. # Remove a story
  47. removeStory(input: StoryRemoveInput!): Story!
  48. # Add a chapter to a story
  49. addChapter(input: ChapterAddInput!): Chapter!
  50. # Edit a chapter
  51. editChapter(input: ChapterEditInput!): Chapter!
  52. # Move a chapter
  53. moveChapter(input: ChapterMoveInput!): Chapter!
  54. # Remove a chapter
  55. removeChapter(input: ChapterRemoveInput!): Chapter!
  56. # Add a new log
  57. addLog(input: LogAddInput!): Log!
  58. # Edit a log
  59. editLog(input: LogEditInput!): Log!
  60. # Remove a log
  61. removeLog(input: LogRemoveInput!): Log!
  62. # Add a post
  63. addPost(input: PostAddInput!): Post!
  64. # Edit a post
  65. editPost(input: PostEditInput!): Post!
  66. # Move a post. All affected posts will be returned.
  67. movePost(input: PostMoveInput!): [Post!]!
  68. # Remove a post
  69. removePost(input: PostRemoveInput!): Post!
  70. # Add a new character
  71. addCharacter(input: CharacterAddInput!): Character!
  72. # Add nick to character
  73. addCharacterNick(input: CharacterNickInput!): Character!
  74. # Remove nick from character
  75. removeCharacterNick(input: CharacterNickInput!): Character!
  76. # Edit character
  77. editCharacter(input: CharacterEditInput!): Character!
  78. # Remove a character
  79. removeCharacter(input: CharacterRemoveInput!): Character!
  80. # Add a channel
  81. addChannel(input: ChannelAddInput!): Channel!
  82. # Edit a channel
  83. editChannel(input: ChannelEditInput!): Channel!
  84. }
  85. # A Date represents a RFC3339 encoded date with up to millisecond precision.
  86. scalar Date