What does it mean to have a
schema name and a
type key in one declaration?
Yes they can.
“schema name” is used when creating a new table (e.g. a type that does not extend any other type)
“type key” is used when your type is extendable OR extends an extendable type
In the example Kavi has provided, it says ‘extendable’ AND has ‘type key’. Do you need to use ‘type key’ even if you specify the current type as extendable? It covers the first part of your premise (‘type is extendable’) by adding the word ‘extendable’ and isn’t doing the second part (‘extends an extendable type’).
@rileysiebel could you explain the benefits of having a type key for an extendable type that does not extend anything?
Where is the data physically stored when using
Is it in the parent table, or is there a behind-the-scenes join between multiple tables that happens?
If it is stored in the parent table, is the type key used to identify the child type records from the parent type records?
It is stored in the same table and the type key is used to identify the child type records. So that means you cannot used the same id for two children type records that extends the same type…
“They are stored in the same table” is an implementation detail that is not guaranteed to always be the case. The API is that ‘typeKey’ is required when defining types that are extendable or extend an extendable type.