Apologies for late reply -
Yeah I think there is a decent case for 8base handling recursive queries natively - simply because it is a native feature of many SQL databases, whilst being on the more complex end.
So a recursive query is one which performs a filter function recursively against a set of results until there are none left. It would work similar to the current filter function, however it would then re-apply this this same filter to the result set.
Ie, if you had a ‘recursiveQuery’ argument in a list query, it could look something like:
query {
blogsList(recursiveQuery: {
recursiveResultName: 'previousSet'
filter: {
relatedBlogs: {
some: {
id: {
in: previousSet
}
}
}
}
}) {
items {
id
}
count
}
}
Recursive queries I think could only really occur on tables which have a relation with themselves. In the above example, the Blog table has a field called relatedBlogs, which contains a list of blogs related to the current Blog. A filter method is performed to find all blogs which have a relation with a previous set of blogs, when this new list is found, it then becomes the ‘previousSet’ variable, and a new list of blogs will be returned. This goes on until the filter output equals zero, and the full list of blogs, ie every blog in the previousSet variables is concatenated into a single list, is returned to the user.
The project I’m working on makes alot of use of graph data modelling and so this would be a big help.