product.api.graphql 946 B

123456789101112131415161718192021222324
  1. type Query {
  2. products(languageCode: LanguageCode, take: Int, skip: Int): ProductList!
  3. product(id: ID!, languageCode: LanguageCode): Product
  4. }
  5. type Mutation {
  6. "Create a new Product"
  7. createProduct(input: CreateProductInput): Product!
  8. "Update an existing Product"
  9. updateProduct(input: UpdateProductInput): Product!
  10. "Add an OptionGroup to a Product"
  11. addOptionGroupToProduct(productId: ID!, optionGroupId: ID!): Product!
  12. "Remove an OptionGroup from a Product"
  13. removeOptionGroupFromProduct(productId: ID!, optionGroupId: ID!): Product!
  14. "Create a set of ProductVariants based on the OptionGroups assigned to the given Product"
  15. generateVariantsForProduct(productId: ID!): [ProductVariant!]!
  16. "Update existing ProductVariants"
  17. updateProductVariants(input: [UpdateProductVariantInput!]!): [ProductVariant]!
  18. }
  19. type ProductList implements PaginatedList {
  20. items: [Product!]!
  21. totalItems: Int!
  22. }