EdgeQL Tutorial

Shapes

Subtopics

Sometimes it is not enough to fetch the data as-is, but it is necessary to add something extra to it. This can be done by adding a computable field to the shape. Let's fetch all text posts and how long they are:

Input
Run
Output
Press the 'Run' button to evaluate the input

We can even incorporate a comparison to the average post length in our computable. There are several ways to do this, so in this example we'll use a DETACHED construct to denote that the Text we're referring to in the subquery is supposed to be treated as the original unmodified set in the database rather than the object we're adding the data to:

Input
Run
Output
Press the 'Run' button to evaluate the input