Latest Poppulo platform GraphQL API
Sorting is often used when a Query is returning a list of results to the client. Sorting ensures a consistent ordering of the data for the client.
An optional sortBy
input type is used to specify the field to sort by and the direction of the sort.
Example Query
# I want to sort by the group name in descending order
query {
exampleQuery(sortBy:{ field: groupName, order: DESCENDING }) {
edges {
node {
status
group {
name
}
}
}
}
}
Sorting is supported on a query by query basis. Please refer to the specific Query operation in the GraphQL API Reference for details.
Filtering allows for reducing the set of results returned to a client by a Query - and is effectively a form of searching.
An optional filter
input type is used to specify which field(s) to filter on and which filtering operations to apply.
eq
: short for equal, must match the given data exactlyin
: short for in list, must be an element of the listNote: Specific filter fields and operators are documented on the relevant Query operations that support filtering.
# I want all the values that have a status that equals REQUIRED
query {
exampleQuery(filter:{ status: { eq: REQUIRED }}) {
edges {
node {
status
group {
name
}
}
}
}
}
Filtering is supported on a query by query basis. Please refer to the specific Query operation in the GraphQL API Reference for details.