On 2/07/2020 17:15, Rob Atkinson wrote:

After some fiddling I can return data from a content tag set

with a query like this

{
  clauseSections(where: {rdfs_label: {pattern: "def"}
  } ) {
    rdfs_label
    topic {
      label
    }
    uri
  }
}

This successfully returns details from the linked topic.

But I cant get a query to work the restricts the subjects by properties of the topics. I cant find examples of syntax for:

The fallback for any type of filter is SPARQL:

https://www.topquadrant.com/graphql/graphql-queries.html#sparql

Did you try that?


1) filtering main object on properties of nested objects
Similar to this? https://www.topquadrant.com/graphql/graphql-queries.html#where
2) filtering if a value is present ( _is_null)

To check for non-existence of a property, you can probably use maxCount 0

{
  concepts(where: {
    hidden: {
        maxCount: 0
      }}) {
    uri
  }
}

3) combining (AND and OR) filters
Use SPARQL for that. GraphQL isn't meant as a complete replacement without "help" - its benefit is simplicity for the average web developer.

Also, I created property shapes for the subject root class and tagging property in order to make this work to retrieve details of , but perhaps there is some way of making this happen (I created and ran SHACL rules to enforce this.. so its repeatable - but have I duplicated something?)

Sounds good. The GraphQL engine is based on the presence of SHACL definitions, so if no such property shapes exist, the engine will not offer GraphQL fields.

Holger









--
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] <mailto:[email protected]>. To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/deda2c9b-08c1-4d51-8dfa-cde898e02c04n%40googlegroups.com <https://groups.google.com/d/msgid/topbraid-users/deda2c9b-08c1-4d51-8dfa-cde898e02c04n%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/13735e1a-b4de-2e79-6823-2ebe54b61fd9%40topquadrant.com.

Reply via email to