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.

166 lines
3.2 KiB

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