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.

158 lines
3.1 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 all distinct tags used in stories
  28. tags: [Tag!]!
  29. # Find story by ID
  30. story(id: String!): Story!
  31. # Find stories
  32. stories(filter: StoriesFilter): [Story!]!
  33. # Find file by ID
  34. file(id: String!): File!
  35. # Find files
  36. files(filter: FilesFilter): [File!]!
  37. # Find changes
  38. changes(filter: ChangesFilter): [Change!]!
  39. # Get information about the token, useful for debugging.
  40. token: Token!
  41. }
  42. type Mutation {
  43. # Add a story
  44. addStory(input: StoryAddInput!): Story!
  45. # Add a story tag
  46. addStoryTag(input: StoryTagAddInput!): Story!
  47. # Remove a story tag
  48. removeStoryTag(input: StoryTagRemoveInput!): Story!
  49. # Edit a story
  50. editStory(input: StoryEditInput!): Story!
  51. # Remove a story
  52. removeStory(input: StoryRemoveInput!): Story!
  53. # Add a chapter to a story
  54. addChapter(input: ChapterAddInput!): Chapter!
  55. # Edit a chapter
  56. editChapter(input: ChapterEditInput!): Chapter!
  57. # Move a chapter
  58. moveChapter(input: ChapterMoveInput!): Chapter!
  59. # Remove a chapter
  60. removeChapter(input: ChapterRemoveInput!): Chapter!
  61. # Add a new log
  62. addLog(input: LogAddInput!): Log!
  63. # Import a log
  64. importLog(input: LogImportInput!): [Log!]!
  65. # Edit a log
  66. editLog(input: LogEditInput!): Log!
  67. # Remove a log
  68. removeLog(input: LogRemoveInput!): Log!
  69. # Add a post
  70. addPost(input: PostAddInput!): Post!
  71. # Edit a post
  72. editPost(input: PostEditInput!): Post!
  73. # Move a post. All affected posts will be returned.
  74. movePost(input: PostMoveInput!): [Post!]!
  75. # Remove a post
  76. removePost(input: PostRemoveInput!): Post!
  77. # Add a new character
  78. addCharacter(input: CharacterAddInput!): Character!
  79. # Add nick to character
  80. addCharacterNick(input: CharacterNickInput!): Character!
  81. # Remove nick from character
  82. removeCharacterNick(input: CharacterNickInput!): Character!
  83. # Edit character
  84. editCharacter(input: CharacterEditInput!): Character!
  85. # Remove a character
  86. removeCharacter(input: CharacterRemoveInput!): Character!
  87. # Add a channel
  88. addChannel(input: ChannelAddInput!): Channel!
  89. # Edit a channel
  90. editChannel(input: ChannelEditInput!): Channel!
  91. }
  92. type Subscription {
  93. """
  94. Changes subscribes to the changes matching the following keys.
  95. """
  96. changes(keys: [ChangeKeyInput!]!): Change!
  97. }
  98. # A Date represents a RFC3339 encoded date with up to millisecond precision.
  99. scalar Date