Ordering API

Learn how to build ordering API in GraphQL.

We'll cover the following

Building the ordering API

The context function we just built provides an accurate indicator of what our GraphQL inputs should look like. We’re expecting a list of items we want to order and an optional customer reference number. Notably, the items don’t contain any price info, as that should always be looked up from the menu system (to make sure clients aren’t changing the prices). Add the following field to your mutation object in schema.ex file:

Get hands-on with 1200+ tech skills courses.