Guest User

Untitled

a guest
Mar 6th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.81 KB | None | 0 0
  1. type Date {
  2. date: String
  3. }
  4.  
  5. type Result {
  6. success: Boolean!
  7. error: Int
  8. }
  9.  
  10. type PostUser {
  11. name: String!
  12. }
  13.  
  14. type Post {
  15. id: Int!
  16. user: PostUser!
  17. content: String!
  18. date: Date!
  19. }
  20.  
  21. type ReceivedPost {
  22. id: Int!
  23. user: PostUser!
  24. content: String!
  25. own: Boolean!
  26. }
  27.  
  28. type OwnReceivedPost {
  29. id: Int!
  30. user: PostUser!
  31. content: String!
  32. own: Boolean!
  33. sing: String!
  34. }
  35.  
  36. type CreatingPost {
  37. content: String!
  38. }
  39.  
  40. type RevertedPost {
  41. id: Int!
  42. content: String!
  43. date: Date!
  44. sing: String!
  45. }
  46.  
  47. union CommonReceivedPost = ReceivedPost | OwnReceivedPost
  48.  
  49. type PostQuery {
  50. getPosts: CommonReceivedPost
  51. }
  52.  
  53. type PostMutation {
  54. # addPost(post: CreatingPost): Result
  55. removePost(id: Int): Result
  56. # revertPost(post: RevertedPost): Result
  57. }
  58.  
  59. type SecretPost {
  60. id: Int!
  61. user: PostUser!
  62. title: String!
  63. content: String!
  64. date: Date!
  65. }
  66.  
  67. type ReceivedSecretPost {
  68. id: Int!
  69. user: PostUser!
  70. title: String!
  71. content: String!
  72. own: Boolean!
  73. }
  74.  
  75. type OwnReceivedSecretPost {
  76. id: Int!
  77. user: PostUser!
  78. title: String!
  79. content: String!
  80. own: Boolean!
  81. sing: String!
  82. }
  83.  
  84. type CreatingSecretPost {
  85. title: String!
  86. content: String!
  87. }
  88.  
  89. type RevertedSecretPost {
  90. id: Int!
  91. title: String!
  92. content: String!
  93. date: Date!
  94. sing: String!
  95. }
  96.  
  97. union CommonReceivedSecretPost = ReceivedSecretPost | OwnReceivedSecretPost
  98.  
  99. type SecretPostQuery {
  100. getPosts: CommonReceivedSecretPost
  101. }
  102.  
  103. type SecretPostMutation {
  104. addPost(post: CreatingSecretPost): Result
  105. removePost(id: Int): Result
  106. # revertPost(post: RevertedSecretPost): Result
  107. }
  108.  
  109. type Query {
  110. post: PostQuery
  111. secretPost: SecretPostQuery
  112. singIn(email: String, password: String): String
  113. }
  114.  
  115. type Mutation {
  116. post: PostMutation
  117. secretPost: SecretPostMutation
  118. singUp(email: String, password: String, captcha: String): String
  119. }
  120.  
  121. schema {
  122. query: Query
  123. mutation: Mutation
  124. }
Add Comment
Please, Sign In to add comment