Introduction to GraphQL queries
GraphQL is a query language for APIs and a server-side runtime. Unlike REST APIs which use multiple endpoints, GraphQL typically uses a single endpoint. It allows clients to request exactly the data they need by specifying fields in a schema. Queries can also accept arguments (e.g., filtering by an ID) to refine the requested data.
# Example: Querying a user by ID
{
user(id: 1) {
username,
email,
phone
}
}