GraphQLRepositoriestargetRelation
entities.targetRelation
Read target relation records with the targetRelation repository, and change them with the target relation mutations. Same records as the REST TargetRelations entity.
Queries
Fields of entities { targetRelation { … } }.
| Kind | Field | Returns |
|---|---|---|
| QUERY | getById(entityId: ID!)Returns the record with the given id, or null when there is none. Deleted records are returned as well. | TargetRelationEntity |
| QUERY | getByIds(entityIds: [ID!]!)Returns the records with the given ids; ids without a record are left out. Deleted records are returned as well. | [TargetRelationEntity!]! |
| QUERY | getAll(limit: Int, offset: Int, filter: TargetRelationFilterInput, orderBy: [TargetRelationOrderByInput!], includeDeleted: Boolean)Returns the records that match the filter, paged with limit and offset. | [TargetRelationEntity!]! |
| QUERY | getByCriteria(filter: TargetRelationFilterInput, orderBy: [TargetRelationOrderByInput!], includeDeleted: Boolean, before: String, after: String, first: Int, last: Int)Returns the records that match the filter as a cursor-paginated connection. | TargetRelationEntityConnection |
| QUERY | getChangedFieldsSinceRevision(id: UUID!, revision: Int!)Returns the ids of the fields of a record that changed after the given revision. Returns an empty list for entities without change tracking. | [UUID!]! |
Mutations
| Kind | Mutation | Does | Returns |
|---|---|---|---|
| MUTATION | createTargetRelation(input: CreateTargetRelationInput!, validationLevel: [ValidationLevel!]) | Create one record | CreateTargetRelationPayload |
| MUTATION | updateTargetRelation(input: UpdateTargetRelationInput!, validationLevel: [ValidationLevel!], sessionIdToUpdate: String) | Update fields | UpdateTargetRelationPayload |
| MUTATION | bulkUpdateTargetRelation(input: [CreateOrUpdateTargetRelationInput!]!, deleteInput: [DeleteTargetRelationInput!], validationLevel: [ValidationLevel!], rollbackMethod: RollbackMethod, match: MatchingInput) | Create or update many; per-item results | BulkUpdateTargetRelationPayload |
| MUTATION | deleteTargetRelation(input: DeleteTargetRelationInput!) | Soft-delete | DeleteTargetRelationPayload |
Types
The types this repository uses, each with its fields and their descriptions. Types several repositories share, such as PageInfo and the filter fields, are in the types index.
TargetRelationEntity object 11 fields: isDeleteProtected, id, isDeleted, …
Link between a group target and a user target that rolls up into it.
| Field | Type | Description |
|---|---|---|
isDeleteProtected | Boolean! | True when the record is protected against deletion because it must always exist in the space. Deleting a record that is not protected can still fail on other checks. Read-only. |
id | ID! | Unique identifier of entity. |
isDeleted | Boolean | Specifies if the entity is considered deleted. |
modified | DateTime | Last modification time. |
created | DateTime | Creation time. |
groupTarget | TargetEntity | Parent group target that aggregates the user target. |
userTarget | TargetEntity | Child user target rolling up into the group target. |
groupTargetId | ID! | Id of the parent group target that aggregates the user target. |
userTargetId | ID! | Id of the user target that rolls up into the group target. |
revision | Int | Revision when entity was lastly changed. |
instancePermissions | [EntityPermsEnum!]! (1 args) | Permissions the current user has on this record, out of the requested ones. |
TargetRelationEntityConnection object pageInfo: PageInfo!, edges: [TargetRelationEntityEdge]!, totalCount: Int
Paginated list of TargetRelation records.
| Field | Type | Description |
|---|---|---|
pageInfo | PageInfo! | Pagination data for this connection. |
edges | [TargetRelationEntityEdge]! | Contains the nodes in this connection. |
totalCount | Int | Total number of items in the connection. |
TargetRelationEntityEdge object node: TargetRelationEntity, cursor: String!
A Relay edge containing a TargetRelationEntity and its cursor.
| Field | Type | Description |
|---|---|---|
node | TargetRelationEntity | The item at the end of the edge |
cursor | String! | A cursor for use in pagination |
TargetRelationFilterInput input AND, OR, NOT, globalSearchQuery, one condition per field
Filter conditions for TargetRelation records. Conditions on different fields are combined with AND; use OR, AND and NOT for other combinations.
| Input field | Type | Description |
|---|---|---|
OR | [TargetRelationFilterInput!] | Matches records that meet at least one of the listed filters. |
AND | [TargetRelationFilterInput!] | Matches records that meet all of the listed filters. |
NOT | TargetRelationFilterInput | Matches records that do not meet this filter. |
globalSearchQuery | String | Search term matched against the fields that the global search covers for this entity. |
id | EntityFilterStringField | Unique identifier of entity. |
isDeleted | Boolean | Specifies if the entity is considered deleted. |
modified | EntityFilterDateTimeField | Last modification time. |
created | EntityFilterDateTimeField | Creation time. |
groupTargetId | EntityFilterStringField | Id of the parent group target that aggregates the user target. |
userTargetId | EntityFilterStringField | Id of the user target that rolls up into the group target. |
revision | EntityFilterNumberField | Revision when entity was lastly changed. |
groupTarget | TargetFilterInput | Parent group target that aggregates the user target. Matches records where a related record meets these conditions. |
userTarget | TargetFilterInput | Child user target rolling up into the group target. Matches records where a related record meets these conditions. |
TargetRelationOrderByInput input Asc or Desc per field
Sorting of TargetRelation records. Set exactly one field in each item; list several items to sort by more fields, in order of priority.
| Input field | Type | Description |
|---|---|---|
id | OrderByEnum | Unique identifier of entity. |
isDeleted | OrderByEnum | Specifies if the entity is considered deleted. |
modified | OrderByEnum | Last modification time. |
created | OrderByEnum | Creation time. |
groupTarget | [TargetOrderByNestedInput!] | Parent group target that aggregates the user target. Sorts by fields of the related record, listed in order of priority. |
userTarget | [TargetOrderByNestedInput!] | Child user target rolling up into the group target. Sorts by fields of the related record, listed in order of priority. |
groupTargetId | OrderByEnum | Id of the parent group target that aggregates the user target. |
userTargetId | OrderByEnum | Id of the user target that rolls up into the group target. |
revision | OrderByEnum | Revision when entity was lastly changed. |
CreateOrUpdateTargetRelationInput input 7 fields: clientMutationId, id, modified, …
Field values of a TargetRelation record to create, or to update when its id is set.
| Input field | Type | Description |
|---|---|---|
clientMutationId | String | Optional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention). |
id | ID | Unique identifier of entity. |
modified | DateTime | Last modification time. |
created | DateTime | Creation time. |
groupTargetId | ID | Id of the parent group target that aggregates the user target. |
userTargetId | ID | Id of the user target that rolls up into the group target. |
revision | Int | Revision when entity was lastly changed. |
CreateTargetRelationInput input 6 fields: clientMutationId, modified, created, …
Field values of a new TargetRelation record.
| Input field | Type | Description |
|---|---|---|
clientMutationId | String | Optional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention). |
modified | DateTime | Last modification time. |
created | DateTime | Creation time. |
groupTargetId | ID! | Id of the parent group target that aggregates the user target. |
userTargetId | ID! | Id of the user target that rolls up into the group target. |
revision | Int | Revision when entity was lastly changed. |
DeleteTargetRelationInput input clientMutationId: String, id: ID!
Id of the TargetRelation record to delete.
| Input field | Type | Description |
|---|---|---|
clientMutationId | String | Optional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention). |
id | ID! | Unique identifier of entity. |
TargetOrderByNestedInput input 26 fields: id, isDeleted, modified, …
Sorting by a field of the related Target record. Set exactly one field in each item.
| Input field | Type | Description |
|---|---|---|
id | OrderByEnum | Unique identifier of entity. |
isDeleted | OrderByEnum | Specifies if the entity is considered deleted. |
modified | OrderByEnum | Last modification time. |
created | OrderByEnum | Creation time. |
calculationType | OrderByEnum | What the target measures: revenue from opportunities won, or the number of leads qualified or created in the target period. |
description | OrderByEnum | Free-text description shown alongside the target. |
isActive | OrderByEnum | When true, the target is currently being tracked; when false, the target is a draft or has been deactivated. |
name | OrderByEnum | Name of the entity and its default text representation. |
ownerId | OrderByEnum | Id of the owning user. |
periodFrom | OrderByEnum | First date of the active target period. Set when isActive is true; recomputed from settings.period when activated. |
periodTo | OrderByEnum | Last date of the active target period. |
targetClientId | OrderByEnum | Id of the assignee user. |
type | OrderByEnum | Kind of target: a User target for targetClient, a group target that is split into or combines user targets, or a Simulated what-if target. |
revision | OrderByEnum | Revision when entity was lastly changed. |
target | OrderByEnum | Target value the user committed to for the current period. |
virtualPeriodFrom | OrderByEnum | Start date of the target period, derived from periodType and periodYear. |
virtualPeriodTo | OrderByEnum | End date of the target period, derived from periodType and periodYear. |
daysLeft | OrderByEnum | Whole days remaining until the target period ends, or zero once the period is past. |
status | OrderByEnum | Progress state of the target: Draft until it is activated, then NotStarted before its period begins, InProgress while the period runs, and Finished once it is marked finished or the period has ended. |
finishedDate | OrderByEnum | Date the target was marked as finished. Empty until the target is closed. |
estimatedTarget | OrderByEnum | Projected end-of-period value extrapolated from progress to date. Used to compare against the committed target. |
periodYear | OrderByEnum | Calendar year the target period belongs to (e.g. 2026). |
periodType | OrderByEnum | Whether the target period follows the calendar year (CalendarYear) or the space's financial year (FinancialYear). Combined with periodYear to determine virtualPeriodFrom / virtualPeriodTo. |
hasParentGroupTarget | OrderByEnum | True when this target is rolled up into a parent group target (e.g. a team-level target aggregating its members). Read-only. |
periodFragmentType | OrderByEnum | Length of the fragments the target period is split into: the whole year (Year), quarters (Quarter) or months (Month). |
periodFragmentIndex | OrderByEnum | Zero-based position of the current fragment within the parent period (e.g. fragment index 2 for the 3rd month in a yearly target split into monthly fragments). |
UpdateTargetRelationInput input 7 fields: clientMutationId, id, modified, …
Id of a TargetRelation record and the field values to change.
| Input field | Type | Description |
|---|---|---|
clientMutationId | String | Optional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention). |
id | ID! | Unique identifier of entity. |
modified | DateTime | Last modification time. |
created | DateTime | Creation time. |
groupTargetId | ID | Id of the parent group target that aggregates the user target. |
userTargetId | ID | Id of the user target that rolls up into the group target. |
revision | Int | Revision when entity was lastly changed. |
BulkUpdateTargetRelationPayload object result: BulkUpdateResults!
Result of the bulkUpdateTargetRelation mutation.
| Field | Type | Description |
|---|---|---|
result | BulkUpdateResults! | Ids of the created, updated and deleted records, and the items that failed. |
CreateTargetRelationPayload object targetRelation: TargetRelationEntity, clientMutationId: String
Result of the createTargetRelation mutation.
| Field | Type | Description |
|---|---|---|
targetRelation | TargetRelationEntity | The created record. |
clientMutationId | String | Optional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention). |
DeleteTargetRelationPayload object targetRelation: TargetRelationEntity, clientMutationId: String
Result of the deleteTargetRelation mutation.
| Field | Type | Description |
|---|---|---|
targetRelation | TargetRelationEntity | The deleted record. |
clientMutationId | String | Optional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention). |
UpdateTargetRelationPayload object targetRelation: TargetRelationEntity, clientMutationId: String
Result of the updateTargetRelation mutation.
| Field | Type | Description |
|---|---|---|
targetRelation | TargetRelationEntity | The updated record. |
clientMutationId | String | Optional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention). |