Hello Matt,
correct, this isn't supported at the moment, and you're right it should
work in principle. I have recorded an internal development ticket
(TBS-4783) for a future version.
Meanwhile, if that's an option, you could use JavaScript/ADS scripting
for similar purposes, with a similar syntax. ADS includes a function
graph.newURI(type) that will look at the URI construction rules.
leturi = graph.newURI(g.City);
let newCity = g.createCity({
uri: uri,
prefLabel: 'Hagen',
altLabel: 'Das Tor zum Sauerland'
})
The advantage here over GraphQL is that you can actually DO something
with the generated URIs because you can assign them to variables and use
those variables in other places, e.g. to define further references:
someCountry.capital = newCity;
GraphQL would be a bit of a one-way-street where you can create
instances but then would need to make additional queries to process the
newly generated instances. In the case of auto-generated URIs you
wouldn't even know what those generated URIs are.
Holger
On 2022-04-06 2:36 am, Matt Goldberg wrote:
Hello-
I've been working with the GraphQL API to programmatically create and
modify resources. If I create a new resource and do not provide a URI,
I expected that the generated identifier would be a URI created using
the Asset Collection's configured URI Construction Rules in the Manage
tab. However, it created a blank node instead. I couldn't find a way
in the documentation to have it use the URI Construction Rules
instead. Is that an option somewhere, or must the caller be
responsible for generating a URI if a blank node is not desired?
Thanks!
--
You received this message because you are subscribed to the Google
Groups "TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/topbraid-users/a6e70516-dc62-4f82-9d12-b2fca1d97b55n%40googlegroups.com
<https://groups.google.com/d/msgid/topbraid-users/a6e70516-dc62-4f82-9d12-b2fca1d97b55n%40googlegroups.com?utm_medium=email&utm_source=footer>.
--
You received this message because you are subscribed to the Google Groups "TopBraid
Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/topbraid-users/61dd5a4a-2f69-5129-a779-01437283be4c%40topquadrant.com.