feat: Add string-based namespace support in Txns
Description
This PR adds string-based namespace support to the Txn class. Managing transactions manually is something common in many repos that use the dgo client. This new functionality makes upgrading transaction-heavy code (that wants to use string-based namespaces) less cumbersome.
Checklist
- [x] Code compiles correctly and linting passes locally
- [ ] For all code changes, an entry added to the
CHANGELOG.mdfile describing and linking to this PR - [x] Tests added for new functionality, or regression tests for bug fixes added as applicable
I think this would be a great improvement.
With the V2 apis, namespaces are simple and a separate concept from ACL/auth, which is fantastic and exactly what I need. We have some graphs that update continuously, and others that are a monthly dump to be dropped and recreated in full. Namespaces gives me an easy way to acheive this data separation. I do not need different auth rules and user separation across the namespaces, as they are purely used by a single backend service.
The missing parts are to enable namespace selection everywhere, without requiring different logins. So dgo transactions, graphQL admin requests (upload schema etc), graphQL queries and the Ratel/play UI. Happy to add additional info if it helps!
See https://discuss.hypermode.com/t/v25-multitenency/19915/3
Now that I understand that apiv2 currently deprecates json-based mutatations this change is very important, as I can fall back to legacy apis for these, provided I have a way to set namespaces, which this PR provides.