Queries
projects
Retrieves all projects that match the specified filter criteria from a specified hub.
Template for Query:
query GetProjects($hubId: String!, $filter: ProjectFilterInput, $pagination: PaginationInput) {
projects(hubId: $hubId, filter: $filter, pagination: $pagination) {
# Projects Fields
}
}
Template for Query Variables:
{
"hubId" : "<SOME-STRING-TYPE-SCALAR-VALUE>",
"filter" : "<SOME-PROJECTFILTER-INPUT-TYPE-VALUE>",
"pagination" : "<SOME-PAGINATION-INPUT-TYPE-VALUE>"
}
Arguments
hubId* String! non-null | The ID of the hub that contains the projects. |
filter | Specifies how to filter a list of projects. You can filter by ID or by name. |
pagination | Specifies how to split the response into multiple pages. |
* Required
Possible Returns
Value Type | Description |
---|---|
Projects! non-null |
Contains a list of projects returned in response to a query. |
Example
Example 1
This example retrieves all projects in a hub. The optional pagination
parameter and filter
parameter are not used in the example because the number of projects is low.
Query:
query GetProjects ($hubId : String!) {
projects (hubId: $hubId) {
results {
name
id
hub {
name
}
}
}
Show More
Query Variables:
{
"hubId": "a.YnVzaW5lc3M6YXV0b2Rlc2syMDA2"
}
Response:
{
"data": {
"projects": {
"results": [
{
"name": "Default Project",
"id": "a.YnVzaW5lc3M6YXV0b2Rlc2syMDA2I0QyMDIxMTIwNzQ5ODU1NTY5",
"hub": {
"name": "L2-Forge-Data-Team"
}
},
{
"name": "Assets",
"id": "a.YnVzaW5lc3M6YXV0b2Rlc2syMDA2I0QyMDIxMTIwNzQ5ODU1OTQ0",
"hub": {
"name": "L2-Forge-Data-Team"
}
}
]
}
}
}
Show More