Frugal-Foods/Frugal-Foods-BE

GraphQL: Store's Items Query

Closed this issue · 0 comments

As a user of the API, I want to be able to retrieve a list of a store's items based on the search string passed in.
{
storeItems(search: "bananas") {
id - comes from store items table
price - comes from store items table
storeId - comes from stores table
itemName - comes from item table and store items table (joins)
storeName #comes from stores table & store items table (joins)
photoUrl - comes from item table & store_item table (joins)
itemId
}
}

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

  • id: A unique identifier for the store item
  • price: The price of the store item
  • storeId: The unique identifier for the store
  • itemName: The name of the item
  • storeName: The name of the store
  • photoUrl - the url for the photo associated with that store's item
  • itemId - the unique identifier for the item

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

  • Query readme updated
  • Expected Response updated