-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add createRealmLineage
mutation to API
#1179
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
768d11d
to
4e62821
Compare
This comment was marked as resolved.
This comment was marked as resolved.
This is supposed to make mounting series easier from external scripts. The existing `mountSeries` API is (a) doing a lot of different things and (b) requires the caller to distinguish between what realms already exist and which still need to be created. This new API is idempotent and more convenient. With this, it would be possible to simplify `mountSeries`, but we can't simply break that API since the Admin UI is using it. So we keep it for now. We might add an alternative API in the future.
4e62821
to
9798996
Compare
Hi @LukasKalbertodt, this PR goes in the right direction. But… this is not really There are following realms in Tobira:
In my script I want to add a new Leaf and mount a Series in a specific path like that:
The base path (or parent realm path) is configured to be /lectures and the sub path (new realms path) would look like:
I would expect, that all paths on the way would be created with pathSegment and name if they aren't exists. But if they exists, at least with the same pathSegment, create the next leaf until the end of list. But the current handling is to throw an exception with message: Invalid input: realm with that path already exists. In this case I have to check the whole path to know, what is my parentRealmPath, on every request. |
I don't understand this part. The new API (
I.e. always pass the whole path. And then it should have exactly the behavior you want: only After having called |
Apparently I tested |
This is supposed to make mounting series easier from external scripts. The existing
mountSeries
API is (a) doing a lot of different things and (b) requires the caller to distinguish between what realms already exist and which still need to be created. This new API is idempotent and more convenient. With this, it would be possible to simplifymountSeries
, but we can't simply break that API since the Admin UI is using it. So we keep it for now. We might add an alternative API in the future.@wsmirnow asked for this. Please let me know if this already helps you! You still have to use the
mountSeries
API but at least you can always pass[]
asnew_realms
by first calling this new API.