api order#21
Conversation
brandonw504
left a comment
There was a problem hiding this comment.
Thanks for also adding the Product model on top of the Order stuff! Right now you've got some errors, make sure you test your code. You'll also need to run the migration, which should appear in the migrations folder. Once you've fixed your compile errors, make sure you test the API with CRUD operations to make sure that everything works the way you expect. Good work so far!
|
Thanks for running the migration! It looks like you still have some other errors with the linting check, if you run |
brandonw504
left a comment
There was a problem hiding this comment.
I realized there are a few other things to change. You'll also need to add Order to index.ts in both resolvers and typeDefs. Make sure you actually test your API on localhost by doing npm run dev.
|
|
||
| type Mutation { | ||
| createOrder(input: CreateOrderInput!): Order | ||
| updateOrderStatus(id: ID!, status: OrderStatus!): Order |
There was a problem hiding this comment.
Add deletion here, since it needs to be defined in your typeDefs and not just in your resolvers.
created the order status for the estore. strings are either "COMPLETED" or "PENDING."