Queries
hub
Retrieves an object representing a hub.
A Hub is a container of projects, shared resources, and users with a common context.
Template for Query:
query GetHub($hubId: String!) {
hub(hubId: $hubId) {
# Hub Fields
}
}
Template for Query Variables:
{
"hubId" : "<SOME-STRING-TYPE-SCALAR-VALUE>"
}
Arguments
hubId* String! non-null | The ID of the hub to return. |
* Required
Possible Returns
Value Type | Description |
---|---|
Hub | Represents a hub. A hub is a container of projects, shared resources, and users with a common context. |
Example
Example 1
This example retrieves information about a hub by its ID. The ID used in this example is taken from the example used in the query hubs.
Query:
query GetHub($hubId : String!) {
hub(hubId : $hubId) {
id
name
projects {
results {
id
name
}
}
}
}
Show More
Query Variables:
{
"hubId": "a.YnVzaW5lc3M6YXV0b2Rlc2syMDA2"
}
Response:
{
"data": {
"hub": {
"id": "a.YnVzaW5lc3M6YXV0b2Rlc2syMDA2",
"name": "L2-Forge-Data-Team",
"projects": {
"results": [
{
"id": "a.YnVzaW5lc3M6YXV0b2Rlc2syMDA2I0QyMDIxMTIwNzQ5ODU1NTY5",
"name": "Default Project"
},
{
"id": "a.YnVzaW5lc3M6YXV0b2Rlc2syMDA2I0QyMDIxMTIwNzQ5ODU1OTQ0",
"name": "Assets"
}
]
}
}
}
}
Show More
Example 2
Get users belongs to hub.
Query:
query hub ($hubId: String!) {
hub (hubId: $hubId) {
id
name
users{
results{
firstName
}
pagination{
cursor
}
}
}
}
Show More
Query Variables:
{
"hubId": "a.YnVzaW5lc3M6YXV0b2Rlc2syMDA2"
}
Response:
{
"data": {
"hub": {
"id": "a.YnVzaW5lc3M6YXV0b2Rlc2syMDA2",
"name": "L2-Forge-Data-Team",
"users": {
"results": [
{
"firstName": "Aditi"
},
{
"firstName": "Ashish"
},
{
"firstName": "Ashutosh"
},
],
"pagination": {
"cursor": null
}
}
}
}
}
Show More