Example Task Query
The client can request a page of tasks while selecting only the fields needed by the interface.
Task List Query
query ProjectTasks(
$projectId: ID!
$first: Int!
$after: String
) {
project(id: $projectId) {
id
name
tasks(first: $first, after: $after) {
edges {
cursor
node {
id
title
status
assignee {
id
name
}
}
}
pageInfo {
hasNextPage
endCursor
}
}
}
}💡 The query demonstrates nested selection, variables, cursor pagination, and relationship loading while allowing the server to return exactly the fields required by the client.