Query
query Opportunities {
opportunities {
edges {
cursor
node {
actualValue {
__typename
}
bookingLink {
__typename
}
call {
__typename
}
callStatus
closedAt
createdAt
}
}
pageInfo {
endCursor
hasNextPage
hasPreviousPage
startCursor
}
totalCount
}
}Response
{
"data": {
"opportunities": {
"edges": [
{
"cursor": "string",
"node": {
"actualValue": {
"__typename": "Money"
},
"bookingLink": {
"__typename": "BookingLink"
},
"call": {
"__typename": "Call"
},
"callStatus": "cancelled",
"closedAt": "string",
"createdAt": "string"
}
}
],
"pageInfo": {
"endCursor": "string",
"hasNextPage": true,
"hasPreviousPage": true,
"startCursor": "string"
},
"totalCount": "value"
}
}
}Queries
opportunities
List opportunities (booking calls viewed as deals) with filters and pagination.
Read-only. stage is derived at read time from the lead’s call history by
the same pipeline-status rules the dashboard uses, so it cannot be filtered
in SQL: when stage is set, the filter is applied per page after pagination,
so a filtered page may hold fewer than first nodes while hasNextPage is
still true — keep following endCursor.
QUERY
opportunities(after: String, first: Number, fromDate: String, leadId: String, stage: OpportunityStage, toDate: String): OpportunityConnection!Arguments
after
String
first
Number
fromDate
String
Keep calls scheduled on/after this date (ISO 8601).
leadId
String
Keep only opportunities belonging to this lead.
stage
Filter by derived pipeline stage (per-page post-filter, see above).
toDate
String
Keep calls scheduled on/before this date (ISO 8601).
Returns
edges
[OpportunityEdge!]!
pageInfo
totalCount
Number
Query
query Opportunities {
opportunities {
edges {
cursor
node {
actualValue {
__typename
}
bookingLink {
__typename
}
call {
__typename
}
callStatus
closedAt
createdAt
}
}
pageInfo {
endCursor
hasNextPage
hasPreviousPage
startCursor
}
totalCount
}
}Response
{
"data": {
"opportunities": {
"edges": [
{
"cursor": "string",
"node": {
"actualValue": {
"__typename": "Money"
},
"bookingLink": {
"__typename": "BookingLink"
},
"call": {
"__typename": "Call"
},
"callStatus": "cancelled",
"closedAt": "string",
"createdAt": "string"
}
}
],
"pageInfo": {
"endCursor": "string",
"hasNextPage": true,
"hasPreviousPage": true,
"startCursor": "string"
},
"totalCount": "value"
}
}
}