After a mutation, you have to do a new query. Or use a method to return the UIDs created in that mutation. No mutation operation will return the inserted data.
A product always has a name string and some properties which are basically arbitrary JSON. I add “uid” key to props JSON so that I could identify the root node UID and set product.props to that value.
First thing - it pollutes predicate namespace with all the keys present in props JSON. Second - expand doesn’t work without a type hence I can’t retrieve the original props JSON.
I came up with a hack to just prepend all keys in props with prop. but that seems messy.
Is there any better way to store arbitrary JSONs for props and retrieving them back while having the ability to query over props?