Clone Git Project

Hi everyone :grinning_face:,

I need help with the development of your app.
I cloned the git project: (GitHub - specklesystems/speckle-demo-app: Dev Guides: Vue.js App communicating with a Speckle Server)
But I can’t get it to work, could you help me.

Thanks in advance :grin:

Hey @Mathilde

Quite a lot might be out of date from that example application - it is not impossible it isn’t working for you, but we could get it to work for you.

What are you hoping to use this for, perhaps we can point at something newer?

Hi @jonathon

The first step is to get your app up and running.
The second step is to edit the code so that when I search for a project in the database, I can select it and display it directly in my page.

If you have any advice for this second step, I’m interested. :grin:

Ok, cool. If this is framed in personal experimentation and learning, it would be perfectly good.

The version of Vue used in the tutorial and the other non-speckly bits are all deprecated. So, you may have difficulty installing dependencies, which will be a blocker.

I will put this example on the list, but I need a refresher ASAP.

What comes to mind is one of the hackathon entries last year and then a presentation code-along at the 2023 SpeckleCon - which depiste being a while ago are both more current than that example.

@vwb contributed to both so while I scramble about looking for resources perhaps he has some close to hand…?

@jonathon
It will be perfect,

If it’s easier for you, we can schedule a meeting to talk about this topic.

I would love to know more about what Artelia needs from your data and how Speckle might help, so of course, I am happy to talk about that - a meeting about an expired tutorial may be overkill.

I have created the Viewer part, now I want to understand the GraphQL part to visualize all the projects.

The best link for that is not the older GraphQL explorer but the newer Speckle GraphQl

This is a very interactive exploration of the entire API, and clicking on the data you are interested in builds the query for you.

Explorations can be bookmarked or shared by link, e.g. User Projects and Model sources

2 Likes

Hello @jonathon

I have several projects in which there are models.
I want to retrieve all the data from the models (id, name, materials…)

Here is the request I made :

query UserProjects ( $limit: Int!) {
  activeUser {
    projects( limit: $limit) {
      items {
        id
        name
        role
       
        updatedAt
        description
       
        models {
          items {
                id
                name
            updatedAt
            previewUrl
            createdAt
            description
            author {
              id
            }
          
          }
          }
       
      }
      totalCount
    }
  }
 
}

But I can only see the models. Can you help me ?

You can get part way there, but the data is here.

If you add

 versions(limit: $versionsLimit2) {
              items {
                referencedObject
                totalChildrenCount
                sourceApplication
              }
            }

I will assemble a list of these referencedObjects which are ids to then pass into subsequent queries

query Object($objectId: String!, $projectId: String!) {
  project(id: $projectId) {
    object(id: $objectId) {
      id
      speckleType
      children {
        objects {
          id
          data
        }
      }
    }
  }
}

passing the ids into $objectId