Introspection

Any object in EdgeDB has a __type__ link, which points to the schema type that the object is actually implementing. This can be used for introspection queries or to just add the object type information to a query. Let's fetch all media with their ids and corresponding types:

Input

Note that this is different from INTROSPECT as it provides run-time type information for concrete objects, whereas the INTROSPECT expression is resolving types statically. Compare this usage of INTROSPECT to the previous query:

Input