After looking through the tutorial at Databases and multi-tenancy - Fauna Docs I noticed on Step 4 that to work with a child database you have to create a new shell and supply the secret for the child database. This gives the shell the context for future queries and commands.
I was wondering, is it possible to have this ‘new context’ switch from within a parent UDF?
I’d love to be able to call a parent function supplying it with a child database secret and have It query on my behalf.
Also, a key/token with the “admin” role can perform read-only queries in child databases, but a database-specific or scoped key is required to perform writes in child databases.
Reading data in a child database with a key for the parent is not possible with FQL v10. You will need to configure your client to query the child db with the appropriate key.