Guest User

Untitled

a guest
Apr 17th, 2019
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.44 KB | None | 0 0
  1. Po e paraqes se qfar operacione jane te mundshme ne back-end qe e kom implementu per front-end'in.
  2. Queries dhe mutations: http://prntscr.com/nd7aio / http://prntscr.com/nd7ap7 / http://prntscr.com/nd7ax0
  3.  
  4. Detajisht qka kerkon dhe kthen qdo resolver:
  5.  
  6. - graphql.schema
  7.  
  8. enum AccountType {
  9. MEMBER
  10. ADMIN
  11. }
  12.  
  13. type Aggregate {
  14. count: Int!
  15. }
  16.  
  17. type App {
  18. id: ID!
  19. createdBy: User!
  20. appCategory: AppCategory!
  21. appVersions: [AppVersion!]!
  22. stories(first: Int): [Story!]!
  23. name: String!
  24. description: String
  25. company: String!
  26. logo: File!
  27. platform: Platform!
  28. }
  29.  
  30. type AppCategory {
  31. id: ID!
  32. name: String!
  33. }
  34.  
  35. input AppFilterInput {
  36. first: Int
  37. skip: Int
  38. appName_contains: String
  39. appCategory: String
  40. storyCategories: [ID!]
  41. storyElements: [ID!]
  42. orderBy: ORDER_BY
  43. }
  44.  
  45. type AppVersion {
  46. id: ID!
  47. name: String!
  48. }
  49.  
  50. input AppVersionLinkInput {
  51. appVersion: ID!
  52. type: LinkType!
  53. }
  54.  
  55. type AuthData {
  56. userId: ID!
  57. token: String!
  58. expiresIn: Int!
  59. }
  60.  
  61. type BasicInfo {
  62. success: Boolean!
  63. error: String
  64. }
  65.  
  66. enum CONNECTION_TYPE {
  67. usersConnection
  68. appCategoriesConnection
  69. storyCategoriesConnection
  70. storyElementsConnection
  71. }
  72.  
  73. input Dict {
  74. key: String
  75. value_str: String
  76. value_int: Int
  77. }
  78.  
  79. type File {
  80. id: ID!
  81. filename: String!
  82. mimetype: String!
  83. encoding: String!
  84. url: String!
  85. }
  86.  
  87. input FileInput {
  88. base64: String!
  89. mimetype: String!
  90. }
  91.  
  92. type Job {
  93. id: ID!
  94. name: String!
  95. }
  96.  
  97. type JSON_OBJECT {
  98. repr: String!
  99. }
  100.  
  101. type Library {
  102. id: ID!
  103. createdBy: User!
  104. stories: [Story!]!
  105. name: String!
  106. }
  107.  
  108. input LibraryFilterInput {
  109. storyCategories: [String!]
  110. storyElements: [String!]
  111. }
  112.  
  113. enum LinkType {
  114. connect
  115. disconnect
  116. }
  117.  
  118. type Mutation {
  119. login(email: String!, password: String!): AuthData!
  120. signUp(
  121. full_name: String!
  122. email: String!
  123. password: String!
  124. job: ID!
  125. profile_photo: FileInput
  126. ): AuthData!
  127. verifyForgotPassword(token: String!): TokenValidation!
  128. resetPassword(
  129. token: String!
  130. new_password: String!
  131. repeat_new_password: String!
  132. ): BasicInfo!
  133. forgetPassword(email: String!): BasicInfo!
  134. editProfile(
  135. full_name: String
  136. job: ID
  137. email: String
  138. password: String
  139. profile_photo: FileInput
  140. ): User!
  141. createApp(
  142. id: ID
  143. name: String!
  144. description: String!
  145. platform: Platform!
  146. logo: FileInput!
  147. appVersion: String!
  148. appCategory: String!
  149. company: String!
  150. ): App!
  151. editApp(
  152. id: ID!
  153. name: String
  154. description: String
  155. platform: Platform
  156. logo: FileInput
  157. appVersions: [AppVersionLinkInput!]
  158. appCategory: ID
  159. company: String
  160. ): App!
  161. createAppCategory(name: String!): AppCategory!
  162. editAppCategory(id: ID!, name: String!): AppCategory!
  163. deleteAppCategory(id: ID!): AppCategory!
  164. createAppVersion(name: String!): AppVersion!
  165. appVersionToApp(app: ID!, appVersion: ID!, type: LinkType!): App!
  166. appVersionToStory(story: ID!, appVersion: ID!, type: LinkType!): Story!
  167. editAppVersion(id: ID!, name: String!): AppVersion
  168. deleteAppVersion(id: ID!): AppVersion!
  169. uploadFile(file: FileInput!): File!
  170. createLibrary(name: String!): Library!
  171. editLibrary(id: ID!, name: String, stories: [StoryLinkType!]): Library!
  172. createStory(
  173. app: ID!
  174. video: FileInput!
  175. thumbnail: FileInput
  176. appVersions: [ID!]!
  177. storyCategories: [ID!]!
  178. storyElements: [ID!]!
  179. ): Story!
  180. editStory(
  181. id: ID!
  182. app: ID
  183. video: FileInput
  184. thumbnail: FileInput
  185. appVersions: [AppVersionLinkInput!]
  186. storyCategories: [StoryCategoryLinkType!]
  187. storyElements: [StoryElementLinkType!]
  188. ): Story!
  189. storyToLibrary(story: ID!, library: ID!, type: LinkType!): Library!
  190. storyToApp(story: ID!, app: ID!, type: LinkType!): App!
  191. createStoryCategory(name: String!): StoryCategory!
  192. storyCategoryToStory(storyCategory: ID!, story: ID!, type: LinkType!): Story!
  193. editStoryCategory(id: ID!, name: String!): StoryCategory!
  194. deleteStoryCategory(id: ID!): StoryCategory!
  195. createStoryElement(name: String!): StoryElement!
  196. storyElementToStory(story: ID!, storyElement: ID!, type: LinkType!): Story!
  197. editStoryElement(id: ID!, name: String!): StoryElement!
  198. deleteStoryElement(id: ID!): StoryElement!
  199. createJob(name: String!): Job!
  200. editJob(id: ID!, name: String!): Job!
  201. deleteJob(id: ID!): Job!
  202. }
  203.  
  204. type ObjectConnection {
  205. pageInfo: PageInfo!
  206. nodes: JSON_OBJECT!
  207. aggregate: Aggregate!
  208. }
  209.  
  210. enum ORDER_BY {
  211. createdAt_ASC
  212. createdAt_DESC
  213. }
  214.  
  215. type PageInfo {
  216. hasNextPage: Boolean!
  217. hasPreviousPage: Boolean!
  218. }
  219.  
  220. enum Platform {
  221. IOS
  222. ANDROID
  223. }
  224.  
  225. type Query {
  226. getLoggedInUser: User
  227. app(id: ID!, stories_first: Int): App
  228. apps(appFilterInput: AppFilterInput): [App!]!
  229. appVersions: [AppVersion!]!
  230. appCategories: [AppCategory!]!
  231. getObjectConnection(
  232. connection_type: CONNECTION_TYPE!
  233. fields: [String!]!
  234. filterBy: [Dict!]
  235. where: [Dict!]
  236. ): ObjectConnection!
  237. story(id: ID!): Story
  238. stories(storiesFilterInput: StoriesFilterInput): [Story!]!
  239. storyCategories: [StoryCategory!]!
  240. storyElements: [StoryElement!]!
  241. library(id: ID!): Library
  242. libraries(libraryFilterInput: LibraryFilterInput): [Library!]!
  243. jobs: [Job!]!
  244. users(userFilterInput: UserFilterInput): [User!]!
  245. countApps: Int!
  246. countStories: Int!
  247. countUsers: Int!
  248. }
  249.  
  250. input StoriesFilterInput {
  251. first: Int
  252. skip: Int
  253. app: ID
  254. inLibrary: ID
  255. storyName_contains: String
  256. appCategory: ID
  257. storyCategories: [ID!]
  258. storyElements: [ID!]
  259. appVersions: [ID!]
  260. }
  261.  
  262. type Story {
  263. id: ID!
  264. app: App!
  265. appVersions: [AppVersion!]!
  266. storyCategories: [StoryCategory!]!
  267. storyElements: [StoryElement!]!
  268. libraries: [Library!]!
  269. video: Video!
  270. thumbnail: File!
  271. }
  272.  
  273. type StoryCategory {
  274. id: ID!
  275. name: String!
  276. }
  277.  
  278. input StoryCategoryLinkType {
  279. storyCategory: ID!
  280. type: LinkType!
  281. }
  282.  
  283. type StoryElement {
  284. id: ID!
  285. name: String!
  286. }
  287.  
  288. input StoryElementLinkType {
  289. storyElement: ID!
  290. type: LinkType!
  291. }
  292.  
  293. input StoryLinkType {
  294. story: ID!
  295. type: LinkType!
  296. }
  297.  
  298. type TokenValidation {
  299. valid: Boolean!
  300. }
  301.  
  302. type User {
  303. id: ID!
  304. email: String!
  305. password: String!
  306. full_name: String!
  307. job: Job!
  308. role: AccountType!
  309. profile_photo: File
  310. apps: [App!]!
  311. libraries: [Library!]!
  312. }
  313.  
  314. input UserFilterInput {
  315. first: Int
  316. skip: Int
  317. full_name_contains: String
  318. }
  319.  
  320. type Video {
  321. id: ID!
  322. file: File!
  323. }
Add Comment
Please, Sign In to add comment