Guest User

Untitled

a guest
Sep 11th, 2018
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.96 KB | None | 0 0
  1. # import DateTime, CartItemSubscriptionPayload, ShippingInfoSubscriptionPayload, SupplierProductSubscriptionPayload from "./generated/prisma.graphql"
  2. scalar Upload
  3.  
  4. type Query {
  5. me: User
  6. file(id: ID!): File
  7. files: [File!]!
  8. mainCategories: [MainCategory!]!
  9. getAgentFacebookPages: [FacebookPagePayload!]!
  10. supplierProduct(id: ID!): SupplierProduct!
  11. supplierProducts: [SupplierProduct!]!
  12. agentSearchSupplierProducts: [SupplierProduct!]!
  13. agentProduct(id: ID!): AgentProduct!
  14. getStore(id: ID!): AgentStore!
  15. getCart(storeId: ID!): Cart!
  16. getShippingInfo: [ShippingInfo!]!
  17.  
  18. getUserSupplierProducts: [SupplierProduct!]!
  19.  
  20. getAgentUserOrders: [PurchaseOrder!]!
  21.  
  22. getUserSupplierOrder(orderId: ID!): SupplierOrder!
  23. getUserSupplierOrders(orderBy: SupplierOrderOrderByInput): [SupplierOrder!]!
  24.  
  25. getCustomerUserOrder(id: ID): PurchaseOrder!
  26. getCustomerUserOrders(storeId: ID!): [PurchaseOrder!]!
  27. }
  28.  
  29. type Mutation {
  30. uploadFile(file: Upload!): File!
  31. uploadFiles(files: [Upload!]!): [File!]!
  32. renameFile(id: ID!, name: String!): File
  33. deleteFile(id: ID!): File
  34.  
  35. surveySubscribe(email: String!, name: String!, mobile: String!): Survey!
  36. signup(email: String!, password: String!, role: String!): AuthPayload!
  37. signin(email: String!, password: String!): AuthPayload!
  38.  
  39. customerSignup(email: String!, password: String!): AuthPayload!
  40.  
  41. createUserPersonalInfo(
  42. firstName: String!
  43. lastName: String!
  44. phone: String!
  45. ): PersonalInfo!
  46.  
  47. signupWithFacebook(facebookToken: String!, role: String!): AuthPayload!
  48. signinWithFacebook(facebookToken: String!): AuthPayload!
  49.  
  50. createPersonalInfo(
  51. firstName: String!
  52. lastName: String!
  53. phone: String!
  54. ): PersonalInfo!
  55.  
  56. createSupplier(supplierSupplierInfo: SupplierInfoInput!): Supplier!
  57.  
  58. createSupplierProduct(
  59. files: [Upload!]!
  60. name: String!
  61. tags: [String!]!
  62. detail: String!
  63. inventory: Int!
  64. minInventory: Int!
  65. retailPrice: Int!
  66. wholesalePrice: Int!
  67. wholesaleRecommendPrice: Int!
  68. categoryId: String!
  69. ): SupplierProduct!
  70.  
  71. createAgentStore(name: String!): AgentStore!
  72. addSupplierProductToAgentStore(id: String!, price: Int!): AgentProduct!
  73.  
  74. addToCart(storeId: ID!, itemId: ID!, quantity: Int!): Cart!
  75. deleteCartItem(cartId: ID!, itemId: ID!): CartItem!
  76.  
  77. addressToCart(
  78. cartId: ID!
  79. firstName: String!
  80. lastName: String!
  81. mobile: String!
  82. address: String!
  83. city: String!
  84. state: String!
  85. country: String!
  86. postCode: String!
  87. ): Cart!
  88.  
  89. updateCartShipping(cartId: ID!, shippingId: ID!): Cart!
  90.  
  91. paymentCharges(token: String!, cartId: ID!): PurchaseOrder!
  92.  
  93. createShipping(
  94. firstName: String!
  95. lastName: String!
  96. mobile: String!
  97. address: String!
  98. city: String!
  99. state: String!
  100. country: String!
  101. postCode: String!
  102. ): ShippingInfo!
  103.  
  104. supplierConfirmOrder(id: ID!): SupplierOrder!
  105. supplierShippingOrder(
  106. id: ID!
  107. trackingNumber: String!
  108. provider: String!
  109. image: Upload!
  110. ): SupplierOrder!
  111.  
  112. postItemToFacebook(id: ID!, caption: String!, accessToken: String!): Boolean!
  113. }
  114.  
  115. type AuthPayload {
  116. token: String!
  117. user: User!
  118. }
  119.  
  120. type FacebookPagePayload {
  121. id: String!
  122. name: String!
  123. access_token: String!
  124. category: String!
  125. picture: PagePicture
  126. country_page_likes: Int!
  127. }
  128.  
  129. type PagePicture {
  130. data: PictureData!
  131. }
  132.  
  133. type PictureData {
  134. url: String!
  135. }
  136.  
  137. type User {
  138. id: ID!
  139. email: String!
  140. role: Role
  141. personalInfo: PersonalInfo
  142. userSupplier: Supplier
  143. userAgent: Agent
  144. userCustomer: Customer
  145. externalProvider: ExternalProvider
  146. }
  147.  
  148. input SupplierInfoInput {
  149. kind: SupplierKind!
  150. corporateName: String!
  151. identityNumber: String!
  152. supplierInfoAddress: AddressInput!
  153. }
  154.  
  155. input AddressInput {
  156. address: String!
  157. city: String!
  158. state: String!
  159. country: String!
  160. postCode: String!
  161. }
  162.  
  163. type Subscription {
  164. cart: CartSubscriptionPayload
  165. cartItem(where: CartItemSubscriptionWhereInput): CartItemSubscriptionPayload
  166. shippingInfo: ShippingInfoSubscriptionPayload
  167. supplierProduct: SupplierProductSubscriptionPayload
  168. }
Add Comment
Please, Sign In to add comment