Chapter 5Making a Change with Mutations

It’s easy to focus on GraphQL’s data-fetching capabilities; the flexibility it gives clients when crafting queries is certainly its most striking feature, but it’s not a read-only data platform. GraphQL also supports mutations, which allow users of the API to modify server-side data.

If you’re familiar with REST APIs, you can think of GraphQL mutations as roughly analogous to POST, PUT, and DELETE operations. Unlike REST, however, the responses from GraphQL mutations can be tailored, just as with GraphQL query operations.

In this chapter, we’re going to explore how GraphQL mutations can be used by adding menu-item management features to our PlateSlate application. You’ll learn how to add a ...

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.