It is one of the root types. mutations are operations used to modify data on the server. While queries are used to fetch data, mutations allow you to create, update, or delete data. Essentially, mutations are how GraphQL handles changes to the underlying data.
Mutations are used for actions like creating new records, updating existing ones, or deleting data.
Similar to queries, mutations return a response based on the operation performed. For instance, after creating a user, the mutation can return the user's ID or details.
Unlike traditional APIs, mutations allow clients to define the exact structure of the response they need, reducing over-fetching or under-fetching.