This PR fixes two things I've run into while using the plugin (many thanks for it by the way, has been super useful!).
Occasionally the 'tenant' reference isn't resolved on the user (for instance when calling the local API from a GraphQL resolver), so we can't see its id field. This falls back to just the tenant string in that case.
I wasn't able to update globals with required fields, since the initGlobal function tried to create an empty document first, which failed validation. Now we create the document under the hood with data populated right away.
Hey,
This PR fixes two things I've run into while using the plugin (many thanks for it by the way, has been super useful!).
id
field. This falls back to just thetenant
string in that case.initGlobal
function tried to create an empty document first, which failed validation. Now we create the document under the hood with data populated right away.