Impact 2024: The Industrial Data and AI Conference for and by Users | Nominate Speakers Now for a Ch...
For `/instances/list` a minimal query would look like this:{ "instanceType": "edge", "filter": { "equals": { "property": ["edge", "type"], "value": ["jca-domain", "EquipmentFacility"] } }} while for `/instances/query` you would do:{ "with": { "myEdges": { "edges": { "filter": { "equals": { "property": ["edge", "type"], "value": ["jca-domain", "EquipmentFacility"] } } } } }, "select": { "myEdges": {} }}
Hi, thanks for a good question! As you have correctly identified, an edge can be used to represent the relationship between a Facility and Equipment. If you wish to attach additional information to the edge, the sources property can be used. However, in many cases, it is sufficient to simply create the edge without defining any additional properties. In these instances, the request payload would be as follows:{ "items": [ { "instanceType": "edge", "space": "jca-domain", "externalId": "edge-1", "type": { // The type should match the type of your relation property "space": "jca-domain", "externalId": "EquipmentFacility" }, "startNode": { "space": "jca-domain", "externalId": "equipment-1" }, "endNode": { "space": "jca-domain", "externalId": "facility-1" } } ], "repl
Great question, Daniel! The structure and naming of these types follow the GraphQL Cursor Connections Specification, which aims to "consistently handle pagination best practices with support for related metadata via a GraphQL server." While we don't currently add a lot of information on the edge types (they only contain the cursor and node fields), we envision that they will be useful for adding extra metadata in the future. One example of metadata that belongs on the edge types is data about a relationship (edge) between two objects (nodes). Say we want to model a time-limited flow between two assets:(a1: Asset) -- [FLOWS_TO { startTime: 1648120612, endTime: 1648125620 }] → (a2: Asset) The query could then look something like this:{ listAsset(externalId: "a1") { edges { node { externalId flowsTo { edges { startTime endTime node { externalId } } pageinfo { endCursor
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
Sorry, we're still checking this file's contents to make sure it's safe to download. Please try again in a few minutes.
Sorry, our virus scanner detected that this file isn't safe to download.