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.

79 lines
1.8 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 log by ID
  8. log(id: String): Log
  9. # Find logs by a list of IDs
  10. logs(input: LogQueryInput): [LogHeader!]!
  11. # Find post by ID
  12. post(id: String!): Post
  13. # 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
  14. # Mapp should it ever become a thing.
  15. posts(ids: [String!]!): [Post!]!
  16. # Find current session
  17. session: Session!
  18. }
  19. # The Mutation type represents write entry points into the API.
  20. type Mutation {
  21. # Add a new character
  22. addCharacter(input: CharacterAddInput!): Character!
  23. # Add nick to character
  24. addCharacterNick(input: CharacterNickInput!): Character!
  25. # Remove nick from character
  26. removeCharacterNick(input: CharacterNickInput!): Character!
  27. # Edit character
  28. editCharacter(input: CharacterEditInput!): Character!
  29. # Remove a character
  30. removeCharacter(id: String!): Character!
  31. # Add a new log
  32. addLog(input: LogAddInput!): Log!
  33. # Edit a log
  34. editLog(input: LogEditInput!): Log!
  35. # Remove a log
  36. removeLog(id: String!): Log!
  37. # Add a post
  38. addPost(input: AddPostInput!): Post!
  39. # Edit a post
  40. editPost(input: EditPostInput!): Post!
  41. # Move a post
  42. movePost(input: MovePostInput!): Post!
  43. # Remove a post
  44. removePost(id: String!): Post!
  45. # Log in
  46. login(username: String!, password: String!): Session!
  47. # Log out
  48. logout(): Session!
  49. }
  50. schema {
  51. query: Query
  52. mutation: Mutation
  53. }