

We saw that you can recursively traverse a record ID in this sort of way.
Inside the left side of a SELECT statement though, the current record ID isn't specified so we need a symbol to refer to it. This is what the @ symbol is used for.
And to get the exact same output as the first query, add VALUE to remove the key name, and ONLY to return a single object instead of an array.
The @ symbol is also used when you want to put together a nested query that collects the fields of records as it goes. This syntax is a bit interesting so we'll construct it one step at a time.
First is a query that returns the id and name. As before, you can do this directly from a record ID or via a SELECT statement.
Then add the connected_to field to see the connected records.
To include further levels of depth, we'll need to put a number like {3} after the record ID. However, this query doesn't work because the database doesn't know which path to choose to recurse.
To fix it, add .@ to the path that you want to go down. We'll give this its own alias, next.
The output is a single object that goes down three levels, showing the id, name, and next paths.
Be sure not to put {..} instead of a number as then the query will never end! Or to be precise, it will try to reach the maximum level of depth for recursive queries (256), but the almost endless number of paths will make this impossible to compute.
If you're not sure if a recursive query will go on forever, use a SELECT statement instead of working directly from a record because SELECT allows you to specify a timeout.