Introspection

All of the schema information in EdgeDB is stored in the schema module and is accessible via introspection queries.

All the introspection types are themselves extending Object, so they are also subject to introspection as object types. So the following query will give a list of all the types used in introspection:

Copy
SELECT name := schema::ObjectType.name
FILTER name LIKE 'schema::%';

There’s also a couple of ways of getting the introspection type of a particular expression. Any Object has a __type__ link to the schema::ObjectType. For scalars there’s the INTROSPECT and TYPEOF operators that can be used to get the type of an expression.

Finally, the command DESCRIBE can be used to get information about EdgeDB types in a variety of human-readable formats.

Light
Dark
System