Handling Input

The main administrative feature we want is to be able to look at the order history for each of the menu items that we have listed here. This isn’t the kind of thing that should be visible to just anyone, though, so we need to take some steps to secure the UI. You already know how to secure portions of your GraphQL schema, but you’ll learn how to hook that up to the kinds of session mechanisms you use when doing server-driven UIs. It’ll also be a good first intro to handling input that comes from the forms.

When working with normal browser-based interfaces, we’ll need a way to put authentication information into the session cookie that Plug manages. After a successful login, user information will be placed into the cookie, ...

Get Craft GraphQL APIs in Elixir with Absinthe now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.