I have the following trivial structure.
Table Tasks with foreign key teamId. And Teams table with a name column.
I have a Relay compliant GraphQL and if I wanted to get the Tasks with the Teams I would do something like that.
{
taskNodes {
Tasks: nodes {
id,
description
Team: teamByTeamId {
name
}
}
}
}
And if I wanted to sort by the task description
{
taskNodes(orderBy: DESCRIPTION) {
Tasks: nodes {
id,
description
Team: teamByTeamId {
name
}
}
}
}
But I want to sort by the Team name column. How how could you do that in GraphQL?