Querying, Filtering, and Sorting
Querying for a type of data is known as a Connection and these connections can accept arguments for filtering, sorting, or specifying arguments for the handling of some data.
Common connection arguments are first, last, sort, and filter. These can be used to tailer your connection query to only the data required.
For example, this query will return the most recent 5 notes which contain the word "Call" and have field values set.
{
research(
first: 5
sort: {
by: CREATED_AT
direction: DESCENDING
}
filter: {
title: {
search: "Call"
}
hasFields: true
}
) {
edges {
node {
id
title
}
}
}
}
These connection arguments don't have to be at the top level of the query. A more complex example could be to retrieve a list of users and find their most recent 5 notes with similar connection arguments.
{
users {
edges {
node {
research(
first: 5
sort: {
by: CREATED_AT
direction: DESCENDING
}
filter: {
title: {
search: "Call"
}
hasFields: true
}
) {
edges {
node {
id
title
}
}
}
}
}
}
}The exact arguments these connection sorts and filters can accept is tied to the Bipsync schema and is unique to your configuration of the Bipsync platform.
Updated 30 days ago
