Open ibrahimbutt opened 6 years ago
I hard coded a a call from the client side using the createOrder mutation. I'm able to create an order, but for some reason I keep getting responses that 'discountCards' is required.
I'm at a loss because it doesn't seem required in your code, or in graphiql. I'm able to create orders with the required fields + discountCards.
from the console after I attempt to make the request without any discountCards:
[GraphQL error]: Message: Order validation failed: discountCards: Path discountCards
is required., Location: [object Object], Path: createOrder
@is343 I've fixed discountCards
being required. See PR #21.
New issue regarding stringified array of 'menuItem' objects. The backend is only including the first object, and leaving off the rest of them.
For example: submitted stringified array: -> [{"name":"Chicken Curry","price":16,"category":"adult","foodId":"5b1a9b55595cd90c6a9ce49f","qty":2},{"name":"Soup","price":2,"category":"soup","foodId":"5b1c9e8f17c12677ecbf9261","qty":1},{"name":"Chicken Curry","price":16,"category":"child","foodId":"5b1c9ee017c12677ecbf9262","qty":3}]
but upon inspection of the db, the created order only includes one item: -> "menuItems": [ { "foodId": "5b1a9b55595cd90c6a9ce49f", "name": "Chicken Curry", "price": 16, "category": "adult", "qty": 2 } ],
@is343 fixed in #29.
Ensure queries and mutations are working as expected as backend features are added/removed, without having to do the manual work.