Guest User

Untitled

a guest
Jun 20th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.35 KB | None | 0 0
  1. type Mutation {
  2. createSession(Session: SessionInput!): Session
  3. @aws_auth(cognito_groups: ["Editors"])
  4. updateSession(SessionId: ID!, Session: SessionInput): Session
  5. @aws_auth(cognito_groups: ["Editors"])
  6. deleteSession(SessionId: ID!): Session
  7. @aws_auth(cognito_groups: ["Editors"])
  8. scheduleSession(SessionId: ID!): UserSchedule
  9. removeSession(SessionId: ID!): UserSchedule
  10. }
  11.  
  12. type Query {
  13. userSchedule: UserSchedule
  14. allSessions(nextToken: String): SessionConnection
  15. getSession(SessionId: ID!): Session
  16. search(text: String!): SessionConnection
  17. }
  18.  
  19. type Session {
  20. SessionId: ID!
  21. Title: String!
  22. StartTime: String!
  23. EndTime: String!
  24. Description: String
  25. SessionType: SessionType!
  26. CreatedBy: String!
  27. }
  28.  
  29. type SessionConnection {
  30. sessions: [Session!]!
  31. nextToken: String
  32. }
  33.  
  34. input SessionInput {
  35. Title: String!
  36. StartTime: String!
  37. EndTime: String!
  38. Description: String
  39. SessionType: SessionType!
  40. }
  41.  
  42. enum SessionType {
  43. Breakout
  44. Workshop
  45. Builder
  46. Brainstorm
  47. }
  48.  
  49. type User {
  50. Username: String!
  51. Email: String!
  52. }
  53.  
  54. type UserSchedule {
  55. User: User!
  56. Sessions: [Session]
  57. LastUpdated: String!
  58. }
  59.  
  60. type Subscription {
  61. onScheduleChange(UserId: ID!): UserSchedule
  62. @aws_subscribe(mutations: [ "scheduleSession", "removeSession" ])
  63. onNewSession: Session
  64. @aws_subscribe(mutations: [ "createSession" ])
  65. }
  66.  
  67. schema {
  68. query: Query
  69. mutation: Mutation
  70. subscription: Subscription
  71. }
Add Comment
Please, Sign In to add comment