Frugal-Foods/Frugal-Foods-BE

GraphQL: Update User Store Item Mutation

Closed this issue · 0 comments

As a user of the API, I want to be able to update a User Store Item

mutation {
userStoreItem: updateUserStoreItem(input: {id: 1, storeId: 1, quantity: 3}) {
id
storeId
storeName
quantity
}
}
Optional attributes should be utilized in order to make this patch request able to update only quantity and nothing else, or update store id without affecting the quantity.

The endpoint should return the list of User Store Items in JSON format, with each store containing the following fields:

  • id: A unique identifier for the user store item
  • store id: The unique identifier of the store
  • store name: The name of the store
  • quantity: The quantity of the item

Documentation: Update the README file so that the changes are reflected:

  • Mutation readme updated
  • Expected Response updated