Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

CONNECT EAP

Subgraph entities

  • Last UpdatedJul 29, 2026
  • 2 minute read

The v3 subgraph entities feature enables you to query on entities in a different subgraph.

When to use subgraphEntities

Use subgraphEntities when you want to query entities outside of the domain graph. Use entities when you want to query the domain graph.

Note: The domain graph (with subgraphId of null/whitespace) should be queried using entities. subgraphEntities is exclusively for non-domain subgraphs with a non-null subgraphId.

Filtering on subgraph entities

To retrieve the subgraph entities, you must specify the non-null ID of the subgraph. All entity filters are supported except for filteredContains.

subgraphEntities(subgraphId: String!)

Field reference

SubgraphEntities

Subgraph entities support the same fields as entities (see Fields).

The only filter not currently supported in subgraphEntities is the filteredContains filter and relationship filters including a subgraphId. All other entity filters (see Entity filtering) are supported.

For instance, a simple id equals filter on entities would be:

entities(input: { filter: { where: { id: { eq: "Entity1"} } } } )

To use the same filter on subgraphEntities, add the subgraphId parameter and change entities to subgraphEntities:

subgraphEntities(subgraphId: "_visualizations" input: { filter: { where: { id: { eq: "Entity1"} } } } )

Inbound relationships

Subgraph entities currently only support inbound relationships from the same subgraph. That means that you can only view relationships to a particular subgraph entity from within that same subgraph.

Subgraph entities also do not support event inbound relationships since events currently cannot have a relationship to a subgraph entity.

Examples

query {

subgraphEntities(subgraphId: "_hierarchies"

input: {

filter: {

where: {

id: {

eq: "PI.AF.Hierarchy"

}

}

}

}

) {

items {

id

name

description

subgraphId

classId

className

dataSources

version

createdDate

createdBy

modifiedDate

modifiedBy

aliases

securityTags

properties {

id

... on StringProperty {

stringValue

}

... on BooleanProperty {

booleanValue

}

... on StringArrayProperty {

stringValues

}

}

}

}

}

You should get the following response back:

{

"data": {

"subgraphEntities": {

"items": [

{

"id": "PI.AF.Hierarchy",

"name": "PI AF Hierarchy",

"description": "Common and default hierarchy from PI Asset Framework via PI to CONNECT Agent",

"subgraphId": "_hierarchies",

"classId": 0,

"className": "Unassigned",

"dataSources": [],

"version": 4,

"createdDate": "2026-06-24T15:18:29.0748321Z",

"createdBy": "system",

"modifiedDate": "2026-07-01T15:17:29.9419888Z",

"modifiedBy": "system",

"aliases": [

"PI",

"AF",

"PI Default",

"PI Common",

"PI.Data",

"PI.Server",

"PI.AF.Server",

"PI.AF.Database",

"PI.AF",

"PI.AF.Element",

"PI.AF.Hierarchy",

"PI.AF.Element.Child"

],

"securityTags": [],

"properties": [

{

"id": "knowledgeGraphSchemaVersion",

"stringValue": "V3"

},

{

"id": "leafLevelIsRecursive",

"booleanValue": true

},

{

"id": "hierarchyLevels"

},

{

"id": "compatibleSchemaVersions",

"stringValues": [

"V3"

]

}

]

}

]

}

}

}

In This Topic