March 2018
Intermediate to advanced
304 pages
6h 59m
English
To support mutation operations, we need to define a root mutation type, just as we did for queries. This will be used as the entry point for GraphQL mutation operations, and it will define—based on the mutation fields that we add—the complete list of capabilities users of our API will have available to modify data.
We define the root mutation type by using the mutation macro in our schema:
| | mutation do |
| | # Mutation fields will go here |
| | end |
This might strike you as somewhat similar to our use of the query macro when we did the initial build-out of the PlateSlate Absinthe schema, and that’s by design. Both macros—query and mutation—are used to define the ...
Read now
Unlock full access