stufflog graphql server
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.

59 lines
1.5 KiB

  1. """
  2. An item that can be required for an issue.
  3. """
  4. type Item {
  5. "The item's unique ID."
  6. id: String!
  7. "Name of the item."
  8. name: String!
  9. "A description of the item."
  10. description: String!
  11. "Item tags."
  12. tags: [String!]!
  13. "Quantity unit. Usually absent, but otherwise most often 'g' or 'ml'"
  14. quantityUnit: String
  15. "URL for the image, if available."
  16. imageUrl: String
  17. }
  18. "Filter for the items query."
  19. input ItemFilter {
  20. "Get these item IDs. Mostly used internally."
  21. itemIds: [String!]
  22. "Limit to items with any of the following tags."
  23. tags: [String!]
  24. }
  25. "Input for the createItem mutation."
  26. input ItemCreateInput {
  27. "Put a name on it."
  28. name: String!
  29. "Describe it for me."
  30. description: String!
  31. "Add a tag or a few"
  32. tags: [String!]!
  33. "Optional: Quanity unit."
  34. quantityUnit: String
  35. "Optional: Upload an image."
  36. image: Upload
  37. }
  38. "Input for the editItem mutation."
  39. input ItemEditInput {
  40. "The item to edit."
  41. itemId: String!
  42. "Update the name."
  43. setName: String
  44. "Update the description."
  45. setDescription: String
  46. "Add new tags. The tags are added after removeTag tags are removed."
  47. addTags: [String!]
  48. "Remove existing tags. If a tag exists both here and in addTags, it will not be removed."
  49. removeTags: [String!]
  50. "Update quantity unit."
  51. setQuantityUnit: String
  52. "Clear quantity unit."
  53. clearQuantityUnit: Boolean
  54. "Update the image URL with a new image."
  55. updateImage: Upload
  56. }