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.

103 lines
1.9 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 post
  55. addPost(input: PostAddInput!): Post!
  56. # Edit a post
  57. editPost(input: PostEditInput!): Post!
  58. # Move a post. All affected posts will be returned.
  59. movePost(input: PostMoveInput!): [Post!]!
  60. # Remove a post
  61. removePost(input: PostRemoveInput!): Post!
  62. }
  63. # A Date represents a RFC3339 encoded date with up to millisecond precision.
  64. scalar Date