shop.api.graphql 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. type Query {
  2. activeCustomer: Customer
  3. activeOrder: Order
  4. availableCountries: [Country!]!
  5. eligibleShippingMethods: [ShippingMethodQuote!]!
  6. me: CurrentUser
  7. nextOrderStates: [String!]!
  8. order(id: ID!): Order
  9. orderByCode(code: String!): Order
  10. productCategories(languageCode: LanguageCode, options: ProductCategoryListOptions): ProductCategoryList!
  11. productCategory(id: ID!, languageCode: LanguageCode): ProductCategory
  12. product(id: ID!, languageCode: LanguageCode): Product
  13. products(languageCode: LanguageCode, options: ProductListOptions): ProductList!
  14. search(input: SearchInput!): SearchResponse!
  15. }
  16. type Mutation {
  17. addItemToOrder(productVariantId: ID!, quantity: Int!): Order
  18. removeItemFromOrder(orderItemId: ID!): Order
  19. adjustItemQuantity(orderItemId: ID!, quantity: Int!): Order
  20. transitionOrderToState(state: String!): Order
  21. setOrderShippingAddress(input: CreateAddressInput!): Order
  22. setOrderShippingMethod(shippingMethodId: ID!): Order
  23. addPaymentToOrder(input: PaymentInput!): Order
  24. setCustomerForOrder(input: CreateCustomerInput!): Order
  25. login(username: String!, password: String!, rememberMe: Boolean): LoginResult!
  26. logout: Boolean!
  27. "Regenerate and send a verification token for a new Customer registration. Only applicable if `authOptions.requireVerification` is set to true."
  28. refreshCustomerVerification(emailAddress: String!): Boolean!
  29. "Register a Customer account with the given credentials"
  30. registerCustomerAccount(input: RegisterCustomerInput!): Boolean!
  31. "Update an existing Customer"
  32. updateCustomer(input: UpdateCustomerInput!): Customer!
  33. "Create a new Customer Address"
  34. createCustomerAddress(input: CreateAddressInput!): Address!
  35. "Update an existing Address"
  36. updateCustomerAddress(input: UpdateAddressInput!): Address!
  37. "Delete an existing Address"
  38. deleteCustomerAddress(id: ID!): Boolean!
  39. "Verify a Customer email address with the token sent to that address. Only applicable if `authOptions.requireVerification` is set to true."
  40. verifyCustomerAccount(token: String!, password: String!): LoginResult!
  41. "Update the password of the active Customer"
  42. updateCustomerPassword(currentPassword: String!, newPassword: String!): Boolean
  43. "Requests a password reset email to be sent"
  44. requestPasswordReset(emailAddress: String!): Boolean
  45. "Resets a Customer's password based on the provided token"
  46. resetPassword(token: String!, password: String!): LoginResult!
  47. }
  48. input RegisterCustomerInput {
  49. emailAddress: String!
  50. title: String
  51. firstName: String
  52. lastName: String
  53. password: String
  54. }
  55. input UpdateCustomerInput {
  56. title: String
  57. firstName: String
  58. lastName: String
  59. phoneNumber: String
  60. emailAddress: String
  61. }
  62. input PaymentInput {
  63. method: String!
  64. metadata: JSON!
  65. }
  66. # generated by generateListOptions function
  67. input ProductCategoryListOptions
  68. # generated by generateListOptions function
  69. input OrderListOptions
  70. # generated by generateListOptions function
  71. input ProductListOptions