Hi, I’d like to try to programmatically create an entire schema “from scratch” via the API. Browsing the API docs, I think I understand how to create types, but I don’t quite understand how to create relations between types.
For example, from reading the API docs I see two apparently relevant commands:
schema.type/create — am I supposed to create the types first, and then create the relation fields in a subsequent command, and then add the fields to the types in yet another subsequent command? Or is it possible to create the relations on the fly while creating the types, by including relations in the list of type fields?
I’m not sure that makes sense, but another way to approach this would be: it’d be super helpful if I could see some example code of calling the API in order to create types and create relations between those types. I mean not just simplistic examples that show the syntax of each command, but realistic examples based on use cases that show workflow, order of operations, etc.