Magidoc

getGoals
Query

Retrieve goals from a workspace with optional filtering and pagination

If asked to get a specific user's goals, ensure to filter by ownerIds.

Arguments

#

workspace

ID !
Non-null

The workspace ID to retrieve goals from

first = 60

Maximum number of goals to return (default: 60, max: 100)

last

Maximum number of goals to return from the end

after

Cursor for pagination - retrieve goals after this cursor

before

Cursor for pagination - retrieve goals before this cursor

searchParams

Search parameters for filtering by goal name

sortField = "name"

Field to sort by (default: 'name')

sortOrder = 1

Sort order: 1 for ascending, -1 for descending (default: 1)

selector

MongoDB-style selector for filtering goals. Examples: { status: 'atRisk' } to filter by status, { teamOwners: { $in: ['teamId1'] } } to filter by team owners. Multiple filters can be combined.

ownerIds

[ ID ]

Owners ID to filter goals by

excludedIds

[ ID ]

Array of goal IDs to exclude from results

specificIds

[ ID ]

Array of goal IDs to retrieve

Response

#

Returns GoalConnection .

Example

#

    
  

3

    
  

3

    
  

3