Introduction
Query variables let you send values to a GraphQL query separately. This keeps queries clean and easy to reuse.
You want to get data for different users without rewriting the query.
You need to send user input like search terms or filters to a query.
You want to avoid repeating the same query with only small value changes.
You want to keep your queries safe from mistakes by separating data from query structure.