Query model does not work on recently uploaded model

I’m using below query to get data from models, it works for eg a model created by an uploaded ifc file on 6th of march, but when I upload the same ifc file to a new model on the same project today I only get null response when trying to query it with the same query? I can see the model at app.speckle.systems so it seems like there is nothing wrong with the uploaded model but I don’t know why I get null response when trying to query data from it?

query ($myQuery: [JSONObject!]) {
  project(id: "PROJECTID") {
    object(id: "REFERENCEDOBJECTID") {
      totalChildrenCount
      children(
        query: $myQuery
        select: ["id", "Tag", "Name", "Text", "speckle_type", "type", "Other", "Dimensions", "ObjectType", "Constraints"]
        limit: 100
        depth: 100
      ) {
        totalCount
        cursor
        objects {
          id
          data
        }
      }
    }
  }
}

The structure of the IFC data has indeed changed recently: 📂 IFC Importer users listen up - We got news!

As part of the parser change, we have improved the data structure to align it with the Next Gen connectors family.

Try this amendment - I can’t dig further without more context.

Ultimately, you shouldn’t need to force depth resolution in the same way as the IFC structure now uses the Collection classes and also the DataObjects, which allows for consistent traversals.

query {
  project(id: "PROJECTID") {
    object(id: "REFERENCEDOBJECTID") {
      totalChildrenCount
      children(
        select: [
          "id"
          "ifcType"
          "properties.Other.Type"
          "properties.Dimensions"
          "properties.Constraints"
          "properties.Fönsterbänkar"
        ]
        query: [
          {
            field: "speckle_type"
            operator: "="
            value: "Objects.Data.DataObject"
          }
        ]
      ) {
        totalCount
        cursor
        objects {
          id
          data
} } } } }

I’m unsure if things are changing again - perhaps @Jedd can offer more insight.

3 Likes