Re: [topbraid-users] Materialized inferred values in GraphQL queries

2024-02-06 Thread Holger Knublauch
Correct, filtering on inferred values is very inefficient, because there is no 
general "inverse" of sh:values rules.

Best to be avoided by asserting the inferences or querying the asserted triples 
that are the base of the rules.

What sort of inferences do you need to query? Maybe there is a way to optimize 
those...

Holger


> On 6 Feb 2024, at 5:12 pm, Davide Sottara  wrote:
> 
> Hi Holger, Michael,
> I have a related question. In the following query:
> 
> query myQuery($id : ID, $value: String) {
>myClass(
>   uri: $id
>   inferred: $value
>) {
>  label
>}
> }
> 
> if "inferred" is a property with an inference rule, is it possible that the 
> inference 
> is executed for all instances of myClass, before the filtering by $id (and 
> $value)?
> More generally, is there any kind of query planning in the GraphQL engine, 
> and/or how does it integrate with the inference rules?
> 
> We can always refactor our queries and/or materialize the triples, but any 
> insight 
> on the engine inner workings would surely help.
> 
> Thank you!!
> On Monday, February 5, 2024 at 5:25:33 PM UTC-6 Michael Panzer wrote:
>> We have not already done this, but will give it a try.
>> 
>> Michael
>> 
>> On Monday, February 5, 2024 at 10:49:19 AM UTC-6 Holger Knublauch wrote:
>>> Quite possibly yes. For these properties, the engine will look both for 
>>> asserted and inferred values.
>>> 
>>> Have you tried removing the sh:values rules (temporarily) and run the same 
>>> queries, comparing the execution time?
>>> If you assert them anyway, would it make sense for you to have these 
>>> sh:values rules disabled for the runtime system?
>>> 
>>> Holger
>>> 
>>> 
>>> 
 On 5 Feb 2024, at 5:08 pm, Michael Panzer > wrote:
 
>>> 
 Hi,
 
 does anybody know if, given a sh:values rule that is materialized, the 
 GraphQL engine still does on-the-fly inferencing of values (even though 
 the triples are in the graph)?
 
 My hunch is that it does. We are seeing very slow performance from GraphQL 
 queries and trying to narrow down if this is related to inferred values.
 
 Cheers
 Michael
 
>>> 
 -- 
 The topics of this mailing list include TopBraid EDG and related 
 technologies such as SHACL.
 To post to this group, send email to topbrai...@googlegroups.com <>
 --- 
 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 topbraid-user...@googlegroups.com <>.
 To view this discussion on the web visit 
 https://groups.google.com/d/msgid/topbraid-users/bf448cae-0bfa-4837-ae62-6b949e1b7c1an%40googlegroups.com
  
 .
>>> 
> 
> 
> -- 
> The topics of this mailing list include TopBraid EDG and related technologies 
> such as SHACL.
> To post to this group, send email to topbraid-users@googlegroups.com
> --- 
> 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 topbraid-users+unsubscr...@googlegroups.com 
> .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/topbraid-users/869a599d-37ab-418f-96bb-e859f8d45913n%40googlegroups.com
>  
> .

-- 
The topics of this mailing list include TopBraid EDG and related technologies 
such as SHACL.
To post to this group, send email to topbraid-users@googlegroups.com
--- 
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 topbraid-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/topbraid-users/8FF33F0F-710D-4198-934D-234397A4E807%40topquadrant.com.


Re: [topbraid-users] Materialized inferred values in GraphQL queries

2024-02-06 Thread Davide Sottara
Hi Holger, Michael,
I have a related question. In the following query:

query myQuery($id : ID, $value: String) {
   myClass(
  uri: $id
  inferred: $value
   ) {
 label
   }
}

if "inferred" is a property with an inference rule, is it possible that the 
inference 
is executed for all instances of myClass, before the filtering by $id (and 
$value)?
More generally, is there any kind of query planning in the GraphQL engine, 
and/or how does it integrate with the inference rules?

We can always refactor our queries and/or materialize the triples, but any 
insight 
on the engine inner workings would surely help.

Thank you!!
On Monday, February 5, 2024 at 5:25:33 PM UTC-6 Michael Panzer wrote:

> We have not already done this, but will give it a try.
>
> Michael
>
> On Monday, February 5, 2024 at 10:49:19 AM UTC-6 Holger Knublauch wrote:
>
>> Quite possibly yes. For these properties, the engine will look both for 
>> asserted and inferred values.
>>
>> Have you tried removing the sh:values rules (temporarily) and run the 
>> same queries, comparing the execution time?
>> If you assert them anyway, would it make sense for you to have these 
>> sh:values rules disabled for the runtime system?
>>
>> Holger
>>
>>
>> On 5 Feb 2024, at 5:08 pm, Michael Panzer  wrote:
>>
>> Hi,
>>
>> does anybody know if, given a sh:values rule that is materialized, the 
>> GraphQL engine still does on-the-fly inferencing of values (even though the 
>> triples are in the graph)?
>>
>> My hunch is that it does. We are seeing very slow performance from 
>> GraphQL queries and trying to narrow down if this is related to inferred 
>> values.
>>
>> Cheers
>> Michael
>>
>> -- 
>> The topics of this mailing list include TopBraid EDG and related 
>> technologies such as SHACL.
>> To post to this group, send email to topbrai...@googlegroups.com
>> --- 
>> 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 topbraid-user...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/topbraid-users/bf448cae-0bfa-4837-ae62-6b949e1b7c1an%40googlegroups.com
>>  
>> 
>> .
>>
>>
>>

-- 
The topics of this mailing list include TopBraid EDG and related technologies 
such as SHACL.
To post to this group, send email to topbraid-users@googlegroups.com
--- 
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 topbraid-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/topbraid-users/869a599d-37ab-418f-96bb-e859f8d45913n%40googlegroups.com.


Re: [topbraid-users] ADS adding a givernance role as viewer

2024-02-06 Thread Kasia Kryczka
Hi Holger,

This is perfect.

Thank you!

Kasia

On Tuesday, February 6, 2024 at 12:33:23 PM UTC+1 Holger Knublauch wrote:

> I don't see a function that would construct a urn:x-tb-role:XY URI, but 
> you can just use
>
> graph.namedGraph('urn:x-tb-role:' + xy)
>
> and yes, the graph.add below looks fine with that value.
>
> tbs.addGovernanceRole is doing something else.
>
> Holger
>
>
> On 6 Feb 2024, at 12:02 pm, Kasia Kryczka  wrote:
>
> graph.transaction( uri + '.tch','Adding Permission', () => {
> graph.add(graph.namedNode(uri + '.tch'),'
> http://topbraid.org/teamwork#editor', tbs.userURI('test'));
> graph.add(graph.namedNode(uri + '.tch'),'
> http://topbraid.org/teamwork#viewer', ... 
> and here I want to add 
> urn:x-tb-role:TTT-BBB-CC etc. 
>
> });
>
> Could you please let me know how to add this ? 
>
> Is tbs.addGovernanceRole right method? or maybe there is sth else ?
>
> Thanks,
>
> Kasia
>
> -- 
> The topics of this mailing list include TopBraid EDG and related 
> technologies such as SHACL.
> To post to this group, send email to topbrai...@googlegroups.com
> --- 
> 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 topbraid-user...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/topbraid-users/90747260-6f61-4a12-8f30-8be3b698aaecn%40googlegroups.com
>  
> 
> .
>
>
>

-- 
The topics of this mailing list include TopBraid EDG and related technologies 
such as SHACL.
To post to this group, send email to topbraid-users@googlegroups.com
--- 
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 topbraid-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/topbraid-users/b933c379-3ce2-4260-b938-090875a0df7an%40googlegroups.com.


Re: [topbraid-users] ADS adding a givernance role as viewer

2024-02-06 Thread Holger Knublauch
I don't see a function that would construct a urn:x-tb-role:XY URI, but you can 
just use

graph.namedGraph('urn:x-tb-role:' + xy)

and yes, the graph.add below looks fine with that value.

tbs.addGovernanceRole is doing something else.

Holger


> On 6 Feb 2024, at 12:02 pm, Kasia Kryczka  wrote:
> 
> graph.transaction( uri + '.tch','Adding Permission', () => {
> graph.add(graph.namedNode(uri + 
> '.tch'),'http://topbraid.org/teamwork#editor', tbs.userURI('test'));
> graph.add(graph.namedNode(uri + 
> '.tch'),'http://topbraid.org/teamwork#viewer', ... 
> and here I want to add 
> 
> urn:x-tb-role:TTT-BBB-CC etc. <>
> 
> 
> });
> 
> Could you please let me know how to add this ? 
> 
> Is tbs.addGovernanceRole right method? or maybe there is sth else ?
> 
> Thanks,
> 
> Kasia
> 
> -- 
> The topics of this mailing list include TopBraid EDG and related technologies 
> such as SHACL.
> To post to this group, send email to topbraid-users@googlegroups.com
> --- 
> 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 topbraid-users+unsubscr...@googlegroups.com 
> .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/topbraid-users/90747260-6f61-4a12-8f30-8be3b698aaecn%40googlegroups.com
>  
> .

-- 
The topics of this mailing list include TopBraid EDG and related technologies 
such as SHACL.
To post to this group, send email to topbraid-users@googlegroups.com
--- 
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 topbraid-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/topbraid-users/C7FABDEA-6F86-4291-A079-A9E72F9D91CA%40topquadrant.com.


[topbraid-users] ADS adding a givernance role as viewer

2024-02-06 Thread Kasia Kryczka
graph.transaction( uri + '.tch','Adding Permission', () => {
graph.add(graph.namedNode(uri + '.tch'),
'http://topbraid.org/teamwork#editor', tbs.userURI('test'));
graph.add(graph.namedNode(uri + '.tch'),
'http://topbraid.org/teamwork#viewer', ... 
and here I want to add 
urn:x-tb-role:TTT-BBB-CC etc. 

});

Could you please let me know how to add this ? 

Is tbs.addGovernanceRole right method? or maybe there is sth else ?

Thanks,

Kasia

-- 
The topics of this mailing list include TopBraid EDG and related technologies 
such as SHACL.
To post to this group, send email to topbraid-users@googlegroups.com
--- 
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 topbraid-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/topbraid-users/90747260-6f61-4a12-8f30-8be3b698aaecn%40googlegroups.com.