This object allows users to fetch data within a single Shibumi app.
Fields
name (String!)
The app’s human-readable name.
apiName (String!)
The app’s api name. This name uniquely identifies the app.
workItem (WorkItem) Query information about a specific work item.
Example:
{
app(apiName: "App_1__app") {
workItem(type: "Program__t" id: "1") {
id
url
startDate: attribute(apiName: "Start_Date__c")
savings: metric(apiName: "Savings__m" dataset: "actual__d" dates: ["2020-12-31"])
association(apiName: "associated_item__q") {
id
}
backreference(apiName: "another_association__a" first: 10) {
nodes {
id
}
}
}
}
}
{
"app": {
"workItem": {
id: "678",
url: "https://app.shibumi.com/shibumi/12345678-1234-1234-1234-123456789012/workItem-summary?id=12345678-1234-1234-1234-123456789012",
startDate: "2020-01-01",
"savings": [1000000.0],
"association": {
"id": "123"
},
"backreference": {
"nodes": [
{
"id": "234"
},
{
"id": "345"
}
]
}
}
}
}
Argument | Type | Description |
---|---|---|
type | String! |
The api name of the work item’s template |
id | ID! |
The item’s auto number. |
workItems ([WorkItem]!) Query information about a list of specific work items.
Argument | Type | Description |
---|---|---|
items | [WorkItemReference! ]!) |
The type / id of items to fetch. |
Example:
{
app(apiName: "App_1__app") {
workItems(items: [
{type: "Program__t" id: "1"}
{type: "Program__t" id: "2"}
]) {
id
url
startDate: attribute(apiName: "Start_Date__c")
savings: metric(apiName: "Savings__m" dataset: "actual__d" dates: ["2020-12-31"])
association(apiName: "associated_item__q") {
id
}
backreference(apiName: "another_association__a" first: 10) {
nodes {
id
}
}
}
}
}
{
"app": {
"workItems": [
{
"id": "678",
"url": "https://app.shibumi.com/shibumi/12345678-1234-1234-1234-123456789012/workItem-summary?id=12345678-1234-1234-1234-123456789012",
"startDate": "2020-01-01",
"savings": [1000000.0],
"association": {
"id": "123"
},
"backreference": {
"nodes": [
{
"id": "234"
},
{
"id": "345"
}
]
}
},
null
]
}
}
templates ([Template!]!) This query allows users to fetch information about their templates’ structure. In particular, the following types of information are exposed:
- Hierarchy structure
- Custom attribute configuration
The hierachy structure identifies which types can potentially appear as parents or children of other types. Both the potential parent types, and the potential child types, can be fetched for each template. Additionally, the set of all possible ancestor types (types that can appear anywhere above a type in the hierarchy), and the set of all possible descendant types (types that can appear anywhere below a type in the hierarchy) can be queried.
The custom attribute configuration lists all the fields, or attributes, that can be set on an instance of a template. It also includes additional information about each attribute, such as its data type, or the options for picklist fields.
Example:
{
app(apiName: "App_1__app") {
templates {
name
apiName
parents {
name
}
children {
name
}
ancestors {
name
}
descendants {
name
}
attributes {
name
apiName
type
}
}
}
}
{
"data": {
"app": {
"templates": [
{
"ancestors": [],
"apiName": "Program__t",
"attributes": [
{
"apiName": "id",
"name": "ID",
"type": "text"
},
{
"apiName": "name",
"name": "Name",
"type": "text"
},
{
"apiName": "Team__c",
"name": "Team",
"type": "text"
},
{
"apiName": "Value__c",
"name": "Value",
"type": "number"
},
{
"apiName": "Expected_Savings__m",
"name": "Expected Savings",
"type": "metric"
},
{
"apiName": "Expected_Costs__c",
"name": "Expected Costs",
"type": "metric"
}
],
"children": [
{
"name": "Work Stream"
}
],
"descendants": [
{
"name": "Work Stream"
}
],
"name": "Program",
"parents": []
},
{
"ancestors": [
{
"name": "Program"
}
],
"apiName": "Work_Stream__t",
"attributes": [
{
"apiName": "id",
"name": "ID",
"type": "text"
},
{
"apiName": "name",
"name": "Name",
"type": "text"
}
],
"children": [],
"descendants": [],
"name": "Program",
"parents": [
{
"name": "Program"
}
]
}
]
}
}
}
template (Template)
Query information about a specific template.
Argument | Type | Description |
---|---|---|
apiName | String! |
Fetch information about the template with this api name. |
Example
{
app(apiName: "App_1__app") {
template(apiName: "Program__t") {
name
apiName
attribute(apiName: "Expected_Savings__m") {
name
apiName
type
}
}
}
}
{
"data": {
"app": {
"template": {
"apiName": "Program__t",
"attributes": [
{
"apiName": "Expected_Savings__m",
"name": "Expected Savings",
"type": "metric"
}
],
"name": "Program"
}
}
}
}