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.

114 lines
2.5 KiB

  1. # The Query type represents the read entry points into the API.
  2. type Query {
  3. # Find character by either an ID or a nick.
  4. character(id: String, nick: String): Character
  5. # Find characters by either a list of ids, nicks or an author. Only one parameter at a time
  6. characters(ids: [String!], nicks: [String!], author: String): [Character!]!
  7. # Find channel by name
  8. channel(name: String!): Channel
  9. # Find all channels. Specifying `logged: true` restricts the search to only logged.
  10. channels(logged: Boolean): [Channel!]!
  11. # Find log by ID
  12. log(id: String): Log
  13. # Find logs by a list of IDs
  14. logs(input: LogQueryInput): [LogHeader!]!
  15. # Find post by ID
  16. post(id: String!): Post
  17. # Find posts by IDs. It's meant to allow other parts of the UI to link to a cluster of posts, e.g. for a room description for the
  18. # Mapp should it ever become a thing.
  19. posts(ids: [String!]!): [Post!]!
  20. # Find file by ID
  21. file(id: String!): File
  22. # Files get all available files. If includePublic is set, it will return public files as well
  23. files(includePublic: Boolean, mimeTypes: [String!]): [File!]!
  24. # Find story chapter by ID
  25. chapter(id: String!): Chapter
  26. # Find current session
  27. session: Session!
  28. }
  29. # The Mutation type represents write entry points into the API.
  30. type Mutation {
  31. # Add a new character
  32. addCharacter(input: CharacterAddInput!): Character!
  33. # Add nick to character
  34. addCharacterNick(input: CharacterNickInput!): Character!
  35. # Remove nick from character
  36. removeCharacterNick(input: CharacterNickInput!): Character!
  37. # Edit character
  38. editCharacter(input: CharacterEditInput!): Character!
  39. # Remove a character
  40. removeCharacter(id: String!): Character!
  41. # Add a channel
  42. addChannel(input: ChannelAddInput!): Channel!
  43. # Edit a channel
  44. editChannel(input: ChannelEditInput!): Channel!
  45. # Remove a channel
  46. removeChannel(name: String!): Channel!
  47. # Add a new log
  48. addLog(input: LogAddInput!): Log!
  49. # Edit a log
  50. editLog(input: LogEditInput!): Log!
  51. # Remove a log
  52. removeLog(id: String!): Log!
  53. # Add a post
  54. addPost(input: AddPostInput!): Post!
  55. # Edit a post
  56. editPost(input: EditPostInput!): Post!
  57. # Move a post
  58. movePost(input: MovePostInput!): Post!
  59. # Remove a post
  60. removePost(id: String!): Post!
  61. # Edit a file
  62. editFile(input: EditFileInput!): File!
  63. # Remove a file
  64. removeFile(id: String!): File
  65. # Log in
  66. login(username: String!, password: String!): Session!
  67. # Log out
  68. logout(): Session!
  69. }
  70. schema {
  71. query: Query
  72. mutation: Mutation
  73. }