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.

113 lines
2.1 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. # Remove a chapter
  53. removeChapter(input: ChapterRemoveInput!): Chapter!
  54. # Add a new log
  55. addLog(input: LogAddInput!): Log!
  56. # Edit a log
  57. editLog(input: LogEditInput!): Log!
  58. # Remove a log
  59. removeLog(input: LogRemoveInput!): Log!
  60. # Add a post
  61. addPost(input: PostAddInput!): Post!
  62. # Edit a post
  63. editPost(input: PostEditInput!): Post!
  64. # Move a post. All affected posts will be returned.
  65. movePost(input: PostMoveInput!): [Post!]!
  66. # Remove a post
  67. removePost(input: PostRemoveInput!): Post!
  68. }
  69. # A Date represents a RFC3339 encoded date with up to millisecond precision.
  70. scalar Date