Remove todos - Mutation
In this part of the tutorial, you will learn how to remove existing todos by using GraphQL Mutations.
Let's define a GraphQL query to do a mutation in todos.
mutation delete($id:Int!) {action: delete_todos(where: {id: {_eq: $id}}) {returning {id}}}
Try this mutation in GraphiQL against the application database to see what the response looks like.
Let's now integrate this GraphQL mutation into our Flutter app.
Did you find this page helpful?
Start with GraphQL on Hasura for Free
- Build apps and APIs 10x faster
- Built-in authorization and caching
- 8x more performant than hand-rolled APIs