Mutations (1/1)
What are mutations?
    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.
    The syntax for mutations is very similar to queries, with the distinction that you use the keyword. Here’s an example of creating a user. The mutation accepts arguments (name, email, age ) to create the user. The response specifies that id, name, and email of the newly created user should be returned.