Guest User

Untitled

a guest
Nov 14th, 2018
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.50 KB | None | 0 0
  1. input PagingRequest {
  2. limit: Number
  3. nextToken: String
  4. }
  5.  
  6. type User {
  7. id: ID!
  8. name: String!
  9. email: String
  10. locations(paging: PagingRequest): LocationPagingConnection
  11. reviews(paging: PagingRequest): ReviewPagingConnection
  12. favorites(paging: PagingRequest): LocationPagingConnection
  13. }
  14.  
  15. type Location {
  16. id: ID!
  17. owner: User!
  18. name: String!
  19. longitude: Number
  20. latitude: Number
  21. address: String
  22. averageRating: Number
  23. favoritesCount: Number
  24. reviews(paging: PagingInput): ReviewPagingConnection
  25. }
  26.  
  27. type Review {
  28. id: ID!
  29. owner: User!
  30. location: Location!
  31. content: String!
  32. rating: Number!
  33. }
  34.  
  35. type LocationPagingConnection {
  36. items: [Location]
  37. nextToken: String
  38. }
  39.  
  40. type ReviewPagingConnection {
  41. items: [Review]
  42. nextToken: String
  43. }
  44.  
  45. input GPSInput {
  46. longitude: Number
  47. latitude: Number
  48. radius: Number
  49. }
  50.  
  51. input AddressInput {
  52. street: String
  53. city: String
  54. state: String
  55. zipcode: String
  56. }
  57.  
  58. input LocationInput {
  59. name: String
  60. address: AddressInput
  61. }
  62.  
  63. input ReviewInput {
  64. content: String!
  65. rating: Number!
  66. }
  67.  
  68. type Query {
  69. me: User!
  70. searchForLocation(byGPS: GPSInput, byAddress: AddressInput): LocationPagingConnection
  71. }
  72.  
  73. type Mutation {
  74. addLocation(location: LocationInput): Location
  75. addReview(locationId: ID!, review: ReviewInput): Review
  76. addFavorite(locationId: ID!): Location
  77. }
  78.  
  79. type Subscription {
  80. updatedLocation(locationId: ID!): Location
  81. @aws_subscribe(mutations: [ "addReview", "addFavorite" ])
  82. }
  83.  
  84. schema {
  85. query: Query
  86. mutation: Mutation
  87. subscription: Subscription
  88. }
Add Comment
Please, Sign In to add comment