Is topic an object property shape or a literal-valued one? (Can you show the shape declarations).

Holger


On 2/07/2020 5:32 pm, Rob Atkinson wrote:

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

=>

{
  "errors": [
    {
      "message": "Validation error of type WrongType: argument 'where.topic' with value 'ObjectValue{objectFields=[ObjectField{name='topic', value=ObjectValue{objectFields=[ObjectField{name='exists', value=ObjectValue{objectFields=[ObjectField{name='label', value=ObjectValue{objectFields=[ObjectField{name='pattern', value=StringValue{value='ID4'}}]}}]}}]}}]}' contains a field not in 'ClauseSection_where_topic': 'exists'",
      "locations": [
        {
          "line": 2,
          "column": 18
        }
      ]
    }
  ]
}





On Thursday, July 2, 2020 at 5:24:02 PM UTC+10 Holger Knublauch wrote:


    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].
    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] <mailto:[email protected]>. To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/23302d9c-5e26-4b11-8449-7491452b402bn%40googlegroups.com <https://groups.google.com/d/msgid/topbraid-users/23302d9c-5e26-4b11-8449-7491452b402bn%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/0a38840d-0289-e4dc-1c1c-9f5206496a12%40topquadrant.com.

Reply via email to