I've been playing around with both options.

In GraphQL mutations, there's a "strict" argument to not perform the commit 
if there is a warning or above. Is there a way to make that the default 
behavior so one doesn't have to rely on someone remembering to set it to 
true? 

Thanks.

On Tuesday, April 5, 2022 at 8:01:56 PM UTC-4 Matt Goldberg wrote:

> Interesting, I must have missed that in the documentation. I'll play 
> around with that. Thanks! 
>
> On Tue, Apr 5, 2022, 7:46 PM Holger Knublauch <[email protected]> 
> wrote:
>
>>
>> On 2022-04-06 9:37 am, Matt Goldberg wrote:
>>
>>
>> Agreed, ADS is more flexible. But for simple things it's convenient to be 
>> able to go through GraphQL since it's less work, especially since it is 
>> hooked into SHACL validation and the Teamwork change history. 
>>
>> FYI ADS is also using SHACL validation and the change history. That's how 
>> the Preview button on the Script Editor panel is implemented.
>>
>> Holger
>>
>>
>>
>> I'll either use ADS or generate URIs externally in the meantime.
>>
>> Thanks! 
>> On Tuesday, April 5, 2022 at 7:13:50 PM UTC-4 Holger Knublauch wrote:
>>
>>> 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.
>>> let uri = 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/71bd0b75-7203-4025-bbbb-927d385b3dbbn%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/topbraid-users/71bd0b75-7203-4025-bbbb-927d385b3dbbn%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>> -- 
>>
> You received this message because you are subscribed to a topic in the 
>> Google Groups "TopBraid Suite Users" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/topbraid-users/7Pg-GGGcmR0/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to 
>> [email protected].
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/topbraid-users/6046cf2d-0986-ea9f-bd6f-ab2d74b8fb12%40topquadrant.com
>>  
>> <https://groups.google.com/d/msgid/topbraid-users/6046cf2d-0986-ea9f-bd6f-ab2d74b8fb12%40topquadrant.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/3ff2edfe-bdea-475a-a84a-18f7d2323e0bn%40googlegroups.com.

Reply via email to