Advertisement
Guest User

Untitled

a guest
May 11th, 2021
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.68 KB | None | 0 0
  1. # SCHEMA
  2. directive @embedded on OBJECT
  3. directive @collection(name: String!) on OBJECT
  4. directive @index(name: String!) on FIELD_DEFINITION
  5. directive @resolver(
  6. name: String
  7. paginated: Boolean! = false
  8. ) on FIELD_DEFINITION
  9. directive @relation(name: String) on FIELD_DEFINITION
  10. directive @unique(index: String) on FIELD_DEFINITION
  11. scalar Date
  12.  
  13. scalar Long
  14.  
  15. type Mutation {
  16. updateUser(
  17. id: ID!
  18. data: UserInput!
  19. ): User
  20. createUser(data: UserInput!): User!
  21. deleteTicket(id: ID!): Ticket
  22. updateTicket(
  23. id: ID!
  24. data: TicketInput!
  25. ): Ticket
  26. deleteUser(id: ID!): User
  27. createTicket(data: TicketInput!): Ticket!
  28. }
  29.  
  30. type Query {
  31. findTicketByID(id: ID!): Ticket
  32. findUserByID(id: ID!): User
  33. allTickets(
  34. _size: Int
  35. _cursor: String
  36. ): TicketPage!
  37. findUserByName(name: String!): User
  38. }
  39.  
  40. type Ticket {
  41. _id: ID!
  42. row2: [String!]!
  43. row1: [String!]!
  44. row3: [String!]!
  45. owner: User!
  46. _ts: Long!
  47. }
  48.  
  49. input TicketInput {
  50. owner: TicketOwnerRelation
  51. row1: [String!]!
  52. row2: [String!]!
  53. row3: [String!]!
  54. }
  55.  
  56. input TicketOwnerRelation {
  57. create: UserInput
  58. connect: ID
  59. disconnect: Boolean
  60. }
  61.  
  62. type TicketPage {
  63. data: [Ticket]!
  64. after: String
  65. before: String
  66. }
  67.  
  68. scalar Time
  69.  
  70. type User {
  71. _id: ID!
  72. _ts: Long!
  73. name: String!
  74. ticket: Ticket
  75. }
  76.  
  77. input UserInput {
  78. name: String!
  79. ticket: UserTicketRelation
  80. }
  81.  
  82. input UserTicketRelation {
  83. create: TicketInput
  84. connect: ID
  85. }
  86.  
  87.  
  88. # UPDATE TICKET
  89. mutation($row1: [String!]!, $row2: [String!]!,
  90. $row3: [String!]!, $id: ID!) {
  91. updateTicket(id: $id,
  92. data: {
  93. row1: $row1,
  94. row2: $row2,
  95. row3: $row3
  96. }) {
  97. up
  98. }
  99. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement