Comment by mjirv
7 years ago
I'm confused by this:
> In EdgeQL, sets are flat, i.e. a set (including an empty one) cannot be an element of another set
It seems like in the last example, they're returning a set (of movies) that contains other sets (directors, cast, reviews). Am I misunderstanding? I guess it would be helpful to see what the output looks like for these examples.
There are good examples in the tutorial: https://edgedb.com/docs/tutorial/queries#ref-tutorial-querie...
The last query is still returning a flat set of Movie objects. The shape selector describes _related_ data that is also needed to be fetched by the query. So, the query actually returns multiple sets that can be reconstructed by the client into a graph of objects (or serialized into JSON).