Skip to content

api order#21

Open
bhaveshasasik wants to merge 4 commits into
mainfrom
apiorder
Open

api order#21
bhaveshasasik wants to merge 4 commits into
mainfrom
apiorder

Conversation

@bhaveshasasik
Copy link
Copy Markdown

created the order status for the estore. strings are either "COMPLETED" or "PENDING."

Copy link
Copy Markdown
Contributor

@brandonw504 brandonw504 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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!

@brandonw504
Copy link
Copy Markdown
Contributor

Thanks for running the migration! It looks like you still have some other errors with the linting check, if you run npm run lint you'll see a few minor errors. After that we should be good!

Copy link
Copy Markdown
Contributor

@brandonw504 brandonw504 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/typeDefs/Order.ts

type Mutation {
createOrder(input: CreateOrderInput!): Order
updateOrderStatus(id: ID!, status: OrderStatus!): Order
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add deletion here, since it needs to be defined in your typeDefs and not just in your resolvers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants